Last active
March 28, 2025 23:50
-
-
Save tombh/5d96587dabebff7e59d801a845acbf92 to your computer and use it in GitHub Desktop.
Revisions
-
tombh revised this gist
Mar 28, 2025 . 1 changed file with 5 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,24 +4,19 @@ # Usage: `chmod a+x emoji.bash`, then run the script whenever you to pick emojis export EMOJI_CHAR_PATH="/tmp/unicode_result-$USER.txt" touch "$EMOJI_CHAR_PATH" function _unicode_search { local type=$1 local char local args args=( -format '%(emoji l:auto) %(name)' -compact emoji all ) char=$(uni "${args[@]}" | fzf | cut -d' ' -f1) echo -n "$char" >"$EMOJI_CHAR_PATH" echo -n "$char" @@ -42,9 +37,10 @@ function emoji_picker { -o "initial_window_height=15c" \ -o "font_size=20" \ bash -c \ "./emoji.bash _unicode_search" wtype "$(cat "$EMOJI_CHAR_PATH")" } subcommand=${1:-emoji_picker} "$subcommand" -
tombh revised this gist
Mar 28, 2025 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ # Dependencies: `uni`, `wl-copy`, `kitty`, `wtype`, `fzf` # `uni` project: https://github.com/source-foundry/uni # Usage: `chmod a+x emoji.bash`, then run the script whenever you to pick emojis export EMOJI_CHAR_PATH="/tmp/unicode_result-$USER.txt" @@ -45,4 +45,6 @@ function emoji_picker { "_unicode_search emoji" wtype "$(cat "$EMOJI_CHAR_PATH")" } emoji_picker -
tombh revised this gist
Mar 28, 2025 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ # Dependencies: `uni`, `wl-copy`, `kitty`, `wtype`, `fzf` # `uni` project: https://github.com/source-foundry/uni # Call `emoji_picker()` to use. -
tombh revised this gist
Mar 28, 2025 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,7 @@ # Dependencies: `uni`, `wl-copy`, `kitty`, `wtype`, `fzf` # Call `emoji_picker()` to use. export EMOJI_CHAR_PATH="/tmp/unicode_result-$USER.txt" function _unicode_search { -
tombh created this gist
Mar 7, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,45 @@ # Dependencies: `uni`, `wl-copy`, `kitty`, `wtype`, `fzf` export EMOJI_CHAR_PATH="/tmp/unicode_result-$USER.txt" function _unicode_search { local type=$1 local char local args [ "$type" = "" ] && args=( -format '%(char l:auto)%(wide_padding) %(name)' -compact print all ) [ "$type" = "emoji" ] && args=( -format '%(emoji l:auto) %(name)' -compact emoji all ) # `nix-env -iA nixpkgs.uni` char=$(uni "${args[@]}" | fzf | cut -d' ' -f1) echo -n "$char" >"$EMOJI_CHAR_PATH" echo -n "$char" } function unicode_search { local type=$1 local char && char=$(_unicode_search "$type") echo "$char" | wl-copy --trim-newline echo "Copied $char to clipboard" } function emoji_picker { kitty \ --title "Emoji Picker" \ -o "remember_window_size=no" \ -o "initial_window_width=45c" \ -o "initial_window_height=15c" \ -o "font_size=20" \ bash -c \ "_unicode_search emoji" wtype "$(cat "$EMOJI_CHAR_PATH")" }