aboutsummaryrefslogtreecommitdiff
path: root/bspwm/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'bspwm/scripts')
-rwxr-xr-xbspwm/scripts/bspwm/desktops.sh3
-rwxr-xr-xbspwm/scripts/bspwm/macropad.sh44
2 files changed, 3 insertions, 44 deletions
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