added binfiles from chrysostomus/bspwm-scripts, fixed eaten space

This commit is contained in:
2021-09-23 11:28:28 +02:00
parent 8950439dc2
commit 89420117a1
36 changed files with 848 additions and 1 deletions

60
bin/bspcp Executable file
View File

@@ -0,0 +1,60 @@
#!/bin/sh
i=1
case $1 in
dsktp) # Add or remove a desktop
case $2 in
add)
current=$(bspc query -D | wc -l)
if [ "$current" -lt "10" ]; then
new=$((current + 1))
bspc monitor -a $new
else
notify-send "You already have ten desktops" "Are those really necessary? Consider closing unneeded windows." -i warning
fi
;;
rm)
current=$(bspc query -D | wc -l)
if [ "$current" -gt "4" ]; then
bspc monitor -r $(bspc query -D | sed -n ${current}p)
else
notify-send "You currently have four desktops" "That can be considered a bare minimum. You should not remove more." -i warning
fi
;;
esac
;;
empty)
nextFreeDesktop=$(bspc query -D -d next.free)
if [ -z "$nextFreeDesktop" ]
then
nextFreeDesktop=$(( $(bspc query -D | wc -l) + 1 ))
bspc monitor -a $nextFreeDesktop
fi
case $2 in
move)
bspc window -d $nextFreeDesktop
;;
next)
bspc rule -a \* -o desktop=$nextFreeDesktop follow=true
;;
esac
;;
tile) # Force every existing window to tile (the opposite is dumb IMHO)
for window in $(bspc query -N -d focused)
do
bspc node $window -t tiled
done
;;
float) # Force every existing window to float and place the windows
for window in $(bspc query -N -d focused)
do
bspc node $window -t floating
let i++
done
;;
*)
exit
;;
esac