2020-04-07 16:05:34 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
wid=$1
|
|
|
|
class=$2
|
|
|
|
instance=$3
|
|
|
|
consequences=$4
|
|
|
|
|
|
|
|
title=$(xtitle "$wid")
|
2020-04-11 16:28:12 +00:00
|
|
|
|
|
|
|
# notify-send "$title" "$1 | $2 | $3 | $4"
|
2020-04-07 16:05:34 +00:00
|
|
|
|
2020-12-30 12:07:04 +00:00
|
|
|
#place floating windows
|
|
|
|
#adapted from https://github.com/baskerville/bspwm/issues/263
|
|
|
|
floats=$(bspc query -N -n .floating -d .focused | wc -l)
|
|
|
|
xdotool windowmove --sync $wid $(( 50 + 50 * floats )) $(( 50 + 50 * floats ))
|
|
|
|
|
2020-04-07 16:05:34 +00:00
|
|
|
case "$title" in
|
|
|
|
WM_FORCE_FLOATING)
|
|
|
|
echo "state=floating"
|
|
|
|
;;
|
2020-10-27 12:45:23 +00:00
|
|
|
WM_FORCE_TILED)
|
|
|
|
echo "state=tiled"
|
|
|
|
;;
|
2020-04-07 16:05:34 +00:00
|
|
|
WM_FORCE_FULLSCREEN)
|
|
|
|
echo "state=fullscreen"
|
|
|
|
;;
|
|
|
|
esac
|
2020-12-30 12:07:04 +00:00
|
|
|
|
|
|
|
# case $state in
|
|
|
|
# floating)
|
|
|
|
# if [ -z "$desktop" ] || [ "$desktop" = "$(bspc query -D -d --names)" ] && [ -z "$rectangle" ]; then
|
|
|
|
# rule="${rule}$(centerfloat) center=false "
|
|
|
|
# fi
|
|
|
|
# ;;
|
|
|
|
# esac
|