commit 93598221eef40e77677914a3b3d0e64da6fdac27
parent 4ebb00b1b9766007ec180ddfdbaae1d8b8d3f049
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Wed, 26 Jun 2024 20:50:26 +0200
feat: use sov as workspace indicator
Diffstat:
1 file changed, 31 insertions(+), 10 deletions(-)
diff --git a/sway/.config/sway/config b/sway/.config/sway/config
@@ -128,16 +128,26 @@ input "type:touchpad" {
# Workspaces:
#
# Switch to workspace
- bindsym $mod+1 workspace number 1
- bindsym $mod+2 workspace number 2
- bindsym $mod+3 workspace number 3
- bindsym $mod+4 workspace number 4
- bindsym $mod+5 workspace number 5
- bindsym $mod+6 workspace number 6
- bindsym $mod+7 workspace number 7
- bindsym $mod+8 workspace number 8
- bindsym $mod+9 workspace number 9
- bindsym $mod+0 workspace number 10
+ bindsym --no-repeat $mod+1 workspace number 1; exec "echo 1 > /tmp/sovpipe"
+ bindsym --no-repeat $mod+2 workspace number 2; exec "echo 1 > /tmp/sovpipe"
+ bindsym --no-repeat $mod+3 workspace number 3; exec "echo 1 > /tmp/sovpipe"
+ bindsym --no-repeat $mod+4 workspace number 4; exec "echo 1 > /tmp/sovpipe"
+ bindsym --no-repeat $mod+5 workspace number 5; exec "echo 1 > /tmp/sovpipe"
+ bindsym --no-repeat $mod+6 workspace number 6; exec "echo 1 > /tmp/sovpipe"
+ bindsym --no-repeat $mod+7 workspace number 7; exec "echo 1 > /tmp/sovpipe"
+ bindsym --no-repeat $mod+8 workspace number 8; exec "echo 1 > /tmp/sovpipe"
+ bindsym --no-repeat $mod+9 workspace number 9; exec "echo 1 > /tmp/sovpipe"
+ bindsym --no-repeat $mod+0 workspace number 10; exec "echo 1 > /tmp/sovpipe"
+ bindsym --release $mod+1 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
+ bindsym --release $mod+2 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
+ bindsym --release $mod+3 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
+ bindsym --release $mod+4 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
+ bindsym --release $mod+5 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
+ bindsym --release $mod+6 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
+ bindsym --release $mod+7 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
+ bindsym --release $mod+8 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
+ bindsym --release $mod+9 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
+ bindsym --release $mod+0 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
@@ -149,6 +159,16 @@ input "type:touchpad" {
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10
+ bindsym --release $mod+Shift+1 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
+ bindsym --release $mod+Shift+2 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
+ bindsym --release $mod+Shift+3 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
+ bindsym --release $mod+Shift+4 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
+ bindsym --release $mod+Shift+5 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
+ bindsym --release $mod+Shift+6 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
+ bindsym --release $mod+Shift+7 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
+ bindsym --release $mod+Shift+8 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
+ bindsym --release $mod+Shift+9 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
+ bindsym --release $mod+Shift+0 exec "sleep 0.5 && echo 0 > /tmp/sovpipe"
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
#
@@ -247,5 +267,6 @@ include /etc/sway/config.d/*
default_border pixel
exec ~/.startup.sh
+exec rm -f /tmp/sovpipe && mkfifo /tmp/sovpipe && tail -f /tmp/sovpipe | sov &