dotwryn/zsh/linux/dmenu_stuff

18 lines
362 B
Plaintext
Raw Normal View History

2019-12-31 00:48:29 +00:00
#!/bin/zsh
# Make a new dmenu shortcut
DMENU_CUSTOM_BIN="$HOME/.local/custom_dmenu";
[ ! -d $DMENU_CUSTOM_BIN ] && mkdir $DMENU_CUSTOM_BIN;
function new_dmenu_command() {
local DMENU_BIN="$HOME/.local/custom_dmenu";
# fail withouut both arguments
2020-01-06 18:10:17 +00:00
[ ! $2 ] && return 1;
2019-12-31 00:48:29 +00:00
echo "${@:2}"
echo "${@:2}" > $DMENU_BIN/$1 2>/dev/null
chmod +x $DMENU_BIN/$1
}