clipmenu: Add support for CM_LAUNCHER=fzf

Closes #122.
This commit is contained in:
Chris Down 2020-03-30 17:18:29 +01:00
parent 9c16837227
commit 5110fed19c

View file

@ -28,6 +28,12 @@ EOF
exit 0
fi
# Blacklist of non-dmenu launchers
if [[ "$CM_LAUNCHER" != fzf ]]; then
set -- -l "${CM_HISTLENGTH}" "$@"
fi
# rofi supports dmenu-like arguments through the -dmenu flag
[[ "$CM_LAUNCHER" == rofi ]] && set -- -dmenu "$@"
@ -43,7 +49,7 @@ if [[ "$CM_LAUNCHER" == rofi-script ]]; then
exit
fi
else
chosen_line=$(list_clips | "$CM_LAUNCHER" -l "${CM_HISTLENGTH}" "$@")
chosen_line=$(list_clips | "$CM_LAUNCHER" "$@")
fi
[[ $chosen_line ]] || exit 1