From 2d002ad89c520538b0530f4655e9a08cbff232d9 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Fri, 28 Aug 2020 17:23:53 +0200 Subject: [PATCH] Add bspwm external rules, make emacs question window floating --- .config/bspwm/bspwmrc | 2 ++ .config/bspwm/rules | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100755 .config/bspwm/rules diff --git a/.config/bspwm/bspwmrc b/.config/bspwm/bspwmrc index eb4109c..38516c4 100755 --- a/.config/bspwm/bspwmrc +++ b/.config/bspwm/bspwmrc @@ -32,6 +32,8 @@ bspc config pointer_modifier mod4 #--- Rules ---# +bspc config external_rules_command "$HOME/.config/bspwm/rules" + # Reset all rules bspc rule -r * diff --git a/.config/bspwm/rules b/.config/bspwm/rules new file mode 100755 index 0000000..730a25a --- /dev/null +++ b/.config/bspwm/rules @@ -0,0 +1,17 @@ +#! /bin/sh + +WID=$1 +CLASS=$2 +INSTANCE=$3 +CONSEQUENCES=$4 + +name() { + xprop -id "$WID" WM_NAME | sed 's/"//g;s/.*= //' +} + +case "$CLASS" in + Emacs) + [ "$(name)" = "Question" ] && echo "state=floating" + exit + ;; +esac