From 05aea491fec4dd9a68ca90150543e03a32bf6985 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Sun, 1 Oct 2023 20:05:37 +0200 Subject: Update the bspwm scripts. Added a theme for rofi --- bspwm/scripts/bspwm/desktops.sh | 3 +++ bspwm/scripts/bspwm/macropad.sh | 44 ----------------------------------------- 2 files changed, 3 insertions(+), 44 deletions(-) delete mode 100755 bspwm/scripts/bspwm/macropad.sh (limited to 'bspwm/scripts') 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 -- cgit v1.2.3