dotfiles/misc/bin/externalrules
2024-01-08 09:03:17 -05:00

28 lines
461 B
Bash
Executable File

#!/usr/bin/env bash
# Originally created by - https://github.com/gh0stzk
wid=$1
class=$2
instance=$3
consequences=$4
outcome() {
eval "$consequences"
[ "$state" ] || echo "$1"
}
case "$class" in
floaterm)
outcome "state=floating center=on"
;;
updating)
outcome "state=floating sticky=on center=on"
;;
mpv)
outcome "state=pseudo_tiled focus=on rectangle=849x477+0+0 center=on"
;;
virt-manager)
outcome "state=floating center=on"
;;
esac