dotfiles/.config/dmenu-wl/dmenu_bspwm_monitor

40 lines
1 KiB
Text
Raw Normal View History

2020-08-17 20:04:10 +02:00
#!/usr/bin/env zsh
2020-03-04 03:51:39 +01:00
2020-08-17 20:04:10 +02:00
if [[ -f $HOME/.zsh_alias ]]; then
source $HOME/.zsh_alias
fi
local dmenu_string="Wrong parameter"
2020-03-04 03:51:39 +01:00
case $1 in
"goto")
dmenu_string="Switch to monitor: " ;;
"swap")
dmenu_string="Swap monitor with monitor: " ;;
"movenode")
dmenu_string="Move node to monitor: " ;;
"movenodefollow")
dmenu_string="Move and follow node to monitor: " ;;
"movedesktop")
dmenu_string="Move desktop to monitor: " ;;
"movedesktopfollow")
dmenu_string="Move and follow desktop to monitor: " ;;
esac
2020-08-17 20:04:10 +02:00
local monitor=$(bspc query -M --names | dmenu -i -fn $(font-name) -nb "#282a36" -nf "#f8f8f2" -sb "#44475a" -sf "#f8f8f2" -p "$dmenu_string")
2020-03-04 03:51:39 +01:00
case $1 in
"goto")
bspc monitor -f $monitor ;;
"swap")
bspc monitor -s $monitor ;;
"movenode")
bspc node -m $monitor ;;
"movenodefollow")
bspc node -m $monitor --follow ;;
"movedesktop")
bspc desktop -m $monitor ;;
"movedesktopfollow")
bspc desktop -m $monitor --follow ;;
esac