diff options
author | EuAndreh <eu@euandre.org> | 2022-11-17 23:44:35 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2022-11-17 23:44:35 -0300 |
commit | b93719de16a478ea9d68d6dacc2f77d594b6c4ca (patch) | |
tree | 18bc22cc671a6c74bba54eeab358bf0eed9a0109 /bin | |
parent | bin/menu: Use ad-hoc function to replace clipmenu(1) (diff) | |
download | dotfiles-b93719de16a478ea9d68d6dacc2f77d594b6c4ca.tar.gz dotfiles-b93719de16a478ea9d68d6dacc2f77d594b6c4ca.tar.xz |
bin/menu: Wrap actions with remembering
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/menu | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -81,7 +81,12 @@ DATA() { } show() { - dmenu -i -l 20 -fn Monospace-18 -p "$1:" + set -- dmenu -i -l 20 -fn Monospace-18 -p "$1:" + if [ -z "${RAW:-}" ]; then + remembering -p "menu-$1" -- "$@" + else + "$@" + fi } pass_list() { @@ -133,7 +138,7 @@ case "$ACTION" in clipboard) # For a potential improved version, see: # https://github.com/cdown/clipmenu/pull/162 - CHOICE="$(clip_list | show 'clipboard:' | cksum)" + CHOICE="$(clip_list | RAW=1 show 'clipboard:' 1 | cksum)" if [ -n "$CHOICE" ]; then copy < "$CLIP_DIR"/"$CHOICE" notify-send -t 5000 -u low -- 'copied to clipboard' |