Skip to content

@windelicato /~\.config\bspwm\rules
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
rulec / ruled replacement
#!/bin/bash
readarray -t PROPS < <(xwinfo -its $1)
INST=${PROPS[0]}
TYPE=${PROPS[1]}
STATE=(${PROPS[2]})
RULE=()
# Sane defaults
case "$TYPE" in
dock|desktop|notification) RULE+=("manage=off") ;;
toolbar|utility) RULE+=("focus=off") ;;
desktop) RULE+=("lower=on") ;;
esac
for s in $STATE; do
case $s in
sticky) RULE+=("sticky=on") ;;
fullscreen) RULE+=("fullscreen=on") ;;
esac
done
# Custom rules
case "$INST" in
mpv|skype|transmission)
RULE+=("floating=on") ;;
conky)
RULE+=("sticky=on manage=off") ;;
astime)
RULE+=("sticky=on") ;;
feh)
RULE+=("floating=on manage=off") ;;
BSPWM_FRAME|bspwm_frame)
RULE+=("frame=on") ;;
esac
echo "${RULE[*]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.