aboutsummaryrefslogtreecommitdiff
path: root/bspwm
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2023-10-01 20:05:37 +0200
committerSébastien Dailly <sebastien@dailly.me>2023-10-01 20:05:37 +0200
commit05aea491fec4dd9a68ca90150543e03a32bf6985 (patch)
treedb2a710f0b703def82fd59e3cabc94942aa1e522 /bspwm
parent18d0291fb3b51797efd67389687b97122d710c89 (diff)
Update the bspwm scripts. Added a theme for rofi
Diffstat (limited to 'bspwm')
-rwxr-xr-xbspwm/.config/bspwm/bspwmrc1
-rwxr-xr-xbspwm/scripts/bspwm/desktops.sh3
-rwxr-xr-xbspwm/scripts/bspwm/macropad.sh44
3 files changed, 3 insertions, 45 deletions
diff --git a/bspwm/.config/bspwm/bspwmrc b/bspwm/.config/bspwm/bspwmrc
index af3ef6c..88add64 100755
--- a/bspwm/.config/bspwm/bspwmrc
+++ b/bspwm/.config/bspwm/bspwmrc
@@ -12,7 +12,6 @@ run polybar bspwm
run ~/scripts/bspwm/desktops.sh
run ~/scripts/bspwm/border_colors.sh
run ~/scripts/bspwm/wallpaper.sh
-run ~/scripts/bspwm/macropad.sh
#compton -i .8 --focus-exclude '_NET_WM_NAME@:s = "rofi"' --blur-background --blur-kern '3,3,0.1,1,1,1,1,1,1,1' &
diff --git a/bspwm/scripts/bspwm/desktops.sh b/bspwm/scripts/bspwm/desktops.sh
index 27b285f..d63b0aa 100755
--- a/bspwm/scripts/bspwm/desktops.sh
+++ b/bspwm/scripts/bspwm/desktops.sh
@@ -1,5 +1,8 @@
#!/bin/sh
+set -u
+#set -e
+
# Execute an application when creating the desktop
#
run_desktop() {
diff --git a/bspwm/scripts/bspwm/macropad.sh b/bspwm/scripts/bspwm/macropad.sh
deleted file mode 100755
index dabdaa0..0000000
--- a/bspwm/scripts/bspwm/macropad.sh
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-
-# This script listen the events from BSPWM and report to the macropad the
-# layout to use.
-
-# The script only listen the for the changes in the selected window, and send
-# to the macropad the appropriate layout depending of the class.
-
-# The function send the code over the socket — this works fine when I use the
-# VNC connection over SSH, as long as a reverse proxy is used.
-# Use for example this configuration in the ssh/config file to open the socket :
-# RemoteForward 9999 localhost:9999
-#
-
-last_call=
-
-send_layout() {
- if [ "$last_call" != "$1" ]; then
- echo $1
- last_call="$1"
- echo $1 | socat - TCP4:localhost:9999
- fi
-}
-
-bspc subscribe node | while read -r event monitor_id desktop_id name;
-do
- case $event in
- node_focus)
- # Read the class for the selected window
- class=$(xprop -id $(bspc query --nodes -d -n focused) | grep ^WM_CLASS | cut -d= -f2)
- case "$class" in
- *"Firefox-esr"*)
- send_layout "Firefox"
- ;;
- *"Qqsp"*)
- send_layout "Num pad"
- ;;
- *)
- # Do not match
- #echo $class;
- ;;
- esac;
- esac;
-done