diff options
author | Vikas Kushwaha <dev@vikas.rocks> | 2025-02-07 18:03:41 +0530 |
---|---|---|
committer | Vikas Kushwaha <dev@vikas.rocks> | 2025-02-07 18:03:41 +0530 |
commit | 5940d14ddbdb6f68869f48351083875b11b6abf7 (patch) | |
tree | 9a5cc0f1268933ca0d5a1a7d2882e93766c25250 /.local/bin/fcode | |
parent | 18507fd21b7a7709133d8f3049c683e1abffcda2 (diff) |
preview updates
Diffstat (limited to '.local/bin/fcode')
-rwxr-xr-x | .local/bin/fcode | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/.local/bin/fcode b/.local/bin/fcode index 8da7a17..073bec4 100755 --- a/.local/bin/fcode +++ b/.local/bin/fcode @@ -3,9 +3,6 @@ # fzf-unicode: get a list of emojis or unicode charecters using fzf # place your charecter files in plain text in ~/.local/share/chars/* -FZF_HIST="$HOME/.local/share/fzf/unicode_history" -mkdir -pv ~/.local/share/fzf - if [ "$OPENFLAG" = 0 ]; then notify-send fzf-unicode "$*" chosen="$(printf '%s\n' "$@" | cut -d\ -f1 | tr -d '\n')" @@ -14,6 +11,11 @@ if [ "$OPENFLAG" = 0 ]; then exit fi +[ -z "$FZF_HISTDIR" ] && + export FZF_HISTDIR="${XDG_STATE_HOME:-$HOME/.local/state}/fzf" +mkdir -pv "$FZF_HISTDIR" +export FZF_HIST="$FZF_HISTDIR/unicode_history" + cut -d ';' -f1 ~/.local/share/chars/* | fzf -m --history="$FZF_HIST" \ --header="Copy Emojis to Clipboard" --header-first \ |