diff options
author | Vikas Kushwaha <dev@vikas.rocks> | 2025-06-13 08:37:31 +0530 |
---|---|---|
committer | Vikas Kushwaha <dev@vikas.rocks> | 2025-06-13 08:37:31 +0530 |
commit | 28ea0e3cbe1c0f980a05d6fb13a428bcab2ea1c5 (patch) | |
tree | b44f5301c4f60b1dae51a91e72b614996ee074ce /.local/bin/fcode | |
parent | 311a468de08231c3dd2327473b79066a25e67462 (diff) |
Diffstat (limited to '.local/bin/fcode')
-rwxr-xr-x | .local/bin/fcode | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/.local/bin/fcode b/.local/bin/fcode index 073bec4..2c8041d 100755 --- a/.local/bin/fcode +++ b/.local/bin/fcode @@ -4,9 +4,8 @@ # place your charecter files in plain text in ~/.local/share/chars/* if [ "$OPENFLAG" = 0 ]; then - notify-send fzf-unicode "$*" chosen="$(printf '%s\n' "$@" | cut -d\ -f1 | tr -d '\n')" - echo "$chosen" | xclip -selection clipboard + printf "%s" "$chosen" | xclip -selection clipboard notify-send "'$chosen' copied to clipboard." exit fi @@ -16,10 +15,10 @@ fi mkdir -pv "$FZF_HISTDIR" export FZF_HIST="$FZF_HISTDIR/unicode_history" -cut -d ';' -f1 ~/.local/share/chars/* | +cat ~/.local/share/chars/* | fzf -m --history="$FZF_HIST" \ --header="Copy Emojis to Clipboard" --header-first \ --preview 'printf "%s\n" {+} | cut -d\ -f1 | tr -d "\n"' \ --preview-window=nohidden,up,1 \ --bind 'ctrl-/:change-preview-window(down|up)' \ - --bind 'enter:execute(echo {q} >> $FZF_HIST; OPENFLAG=0 fzf-unicode {+})' + --bind "enter:execute(echo {q} >> \"$FZF_HIST\"; OPENFLAG=0 \"$0\" {+})" |