dotfiles/misc/bin/externalrules

41 lines
746 B
Bash
Executable File

#!/usr/bin/env bash
# Originally created by - https://github.com/gh0stzk
wid=$1
class=$2
instance=$3
consequences=$4
title="$(xdotool getwindowname "$wid")"
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=floating focus=on rectangle=849x477+0+0 center=on"
;;
virt-manager)
outcome "state=floating center=on"
;;
ranger)
outcome "state=floating rectangle=900x700+0+0 center=on"
;;
esac
case "$title" in
"Steam Settings")
outcome "state=floating center=on"
;;
"Prism Launcher: Staff Client Modloader")
outcome "state=fullscreen"
;;
esac