sxbm_dmenu: remove $sxbm var

if someone installed it as something different, it's just going to be a
simple search and replace.
This commit is contained in:
NRK
2022-11-12 10:21:26 +06:00
parent 929602ffc9
commit 15abf3c12a

View File

@ -9,21 +9,19 @@
# Change "dmenu" to "rofi -dmenu" if you wish to use rofi
# NOTE: i do not use rofi, and haven't tested if it works or not
prompt="dmenu -i -l 24"
# Change this if you have renamed sxbm to something else
sxbm="sxbm"
bm_open() {
link_num="$("$sxbm" ls -c "$@" | $prompt | cut -d ")" -f 1)"
[ -n "$link_num" ] && "$sxbm" open "$link_num"
link_num="$(sxbm ls -c "$@" | $prompt | cut -d ")" -f 1)"
[ -n "$link_num" ] && sxbm open "$link_num"
}
bm_yank() {
link="$("$sxbm" ls -c "$@" | $prompt | cut -d " " -f 2)"
link="$(sxbm ls -c "$@" | $prompt | cut -d " " -f 2)"
[ -n "$link" ] && echo "$link" | xclip -in -selection clipboard
}
bm_add() {
"$sxbm" add "$@" 2>&1 | xargs -I{} $prompt -p {}
sxbm add "$@" 2>&1 | xargs -I{} $prompt -p {}
}
case "$1" in