Small library for generating claude-code like unicde block mascots, and providing animations when they do stuff
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: arms default inline with eyes, individual left/right offsets

- Arms now render on the same row as the eyes by default
- --leftarm and --rightarm offsets move each arm up (positive) or
down (negative) relative to eye row, enabling expressions/animation
like celebrating (both up) or waving (asymmetric)

+12 -5
+12 -5
src/main.rs
··· 38 38 /// How far up the eyes are from the baseline (halfway up body). Positive = higher, negative = lower. [default: random -2..2] 39 39 #[arg(long, allow_hyphen_values = true)] 40 40 mood: Option<i32>, 41 + 42 + /// Vertical offset of left arm from eye row. Positive = higher, negative = lower. [default: 0] 43 + #[arg(long, default_value_t = 0, allow_hyphen_values = true)] 44 + leftarm: i32, 45 + 46 + /// Vertical offset of right arm from eye row. Positive = higher, negative = lower. [default: 0] 47 + #[arg(long, default_value_t = 0, allow_hyphen_values = true)] 48 + rightarm: i32, 41 49 } 42 50 43 51 fn parse_hex_color(hex: &str) -> (u8, u8, u8) { ··· 119 127 let eye_left = width / 3; 120 128 let eye_right = width - 1 - (width / 3); 121 129 122 - // Arm row: single row at the vertical middle of the body 123 - let arm_row = height / 2; 130 + // Arm rows: default inline with eyes, individually offset 131 + let left_arm_row = (eye_row as i32 - args.leftarm).clamp(0, height as i32 - 1) as usize; 132 + let right_arm_row = (eye_row as i32 - args.rightarm).clamp(0, height as i32 - 1) as usize; 124 133 125 134 let arm_pad = armsize; 126 135 let total_width_chars = arm_pad + width + arm_pad; ··· 129 138 130 139 // -- Body rows (with arms and eyes) -- 131 140 for row in 0..height { 132 - let has_arms = row == arm_row; 133 - 134 141 for col in 0..total_width_chars { 135 142 let in_left_arm = col < arm_pad; 136 143 let in_right_arm = col >= arm_pad + width; ··· 143 150 } else { 144 151 output.push_str(&body_block); 145 152 } 146 - } else if (in_left_arm || in_right_arm) && has_arms { 153 + } else if (in_left_arm && row == left_arm_row) || (in_right_arm && row == right_arm_row) { 147 154 output.push_str(&body_block); 148 155 } else { 149 156 output.push_str(space);