From c114324dfcb56c2a2002e3ba3180613cc186c338 Mon Sep 17 00:00:00 2001 From: JGH Date: Tue, 10 Feb 2026 07:54:04 +0000 Subject: [PATCH 1/3] Add keybinding for launching Visual Studio Code --- i3/config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/i3/config b/i3/config index bf22adf..df7a4ef 100644 --- a/i3/config +++ b/i3/config @@ -13,6 +13,7 @@ bindsym $mod+b exec ~/.config/MyI3Config/settings/browser.sh bindsym $mod+e exec ~/.config/MyI3Config/settings/filemanager.sh bindsym $mod+Ctrl+c exec ~/.config/MyI3Config/settings/calculator.sh bindsym $mod+Ctrl+Return exec --no-startup-id rofi -show drun +bindsym $mod+v exec code # ---------------------------------------- # Window management @@ -122,4 +123,4 @@ bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle # ---------------------------------------- # Startup (handled by script) # ---------------------------------------- -exec --no-startup-id ~/.config/MyI3Config/scripts/startup.sh \ No newline at end of file +exec --no-startup-id ~/.config/MyI3Config/scripts/startup.sh From 8ff612389371ffdd8f8074bb2a4216703cb5cb8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Hallenbarter?= Date: Tue, 10 Feb 2026 09:23:11 +0000 Subject: [PATCH 2/3] added mod + space for toggeling keyboard layouts --- scripts/keyboard-setup.sh | 8 +++----- scripts/layout-toggle.sh | 16 ++++------------ 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/scripts/keyboard-setup.sh b/scripts/keyboard-setup.sh index c04c95c..4814bd6 100755 --- a/scripts/keyboard-setup.sh +++ b/scripts/keyboard-setup.sh @@ -1,10 +1,8 @@ #!/bin/bash if [ -n "$SWAYSOCK" ]; then - # Sway - swaymsg input "*" xkb_layout "ch" - swaymsg input "*" xkb_variant "de" + swaymsg input type:keyboard xkb_layout "us,ch" + swaymsg input type:keyboard xkb_variant "workman,de" else - # i3 - setxkbmap -layout ch -variant de + setxkbmap -layout us,ch -variant workman,de fi \ No newline at end of file diff --git a/scripts/layout-toggle.sh b/scripts/layout-toggle.sh index baca734..7ff6aaa 100755 --- a/scripts/layout-toggle.sh +++ b/scripts/layout-toggle.sh @@ -1,19 +1,11 @@ #!/bin/bash -# Toggle between CH and US layouts +# layout-toggle.sh + if [ -n "$SWAYSOCK" ]; then - # Sway: get current layout and toggle - current=$(swaymsg -t get_inputs | jq -r '.[] | select(.type=="keyboard") | .xkb_active_layout_name' | head -1) - if [ "$current" = "Swiss" ] || [ "$current" = "ch" ]; then - swaymsg input "*" xkb_layout "us" - swaymsg input "*" xkb_variant "workman" - else - swaymsg input "*" xkb_layout "ch" - swaymsg input "*" xkb_variant "de" - fi + swaymsg input type:keyboard xkb_switch_layout next else - # i3: get current layout and toggle - current=$(setxkbmap -query | grep layout | awk '{print $2}') + current=$(setxkbmap -query | awk '/layout/{print $2}') if [ "$current" = "ch" ]; then setxkbmap -layout us -variant workman else From 49274b6f97e215c85669403b1c0258dc9ad91ec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Hallenbarter?= Date: Tue, 10 Feb 2026 10:34:00 +0000 Subject: [PATCH 3/3] removed redudant files --- i3/layout-toggle.sh | 9 --------- i3/overlay-menu.sh | 10 ---------- 2 files changed, 19 deletions(-) delete mode 100755 i3/layout-toggle.sh delete mode 100755 i3/overlay-menu.sh diff --git a/i3/layout-toggle.sh b/i3/layout-toggle.sh deleted file mode 100755 index 7a32589..0000000 --- a/i3/layout-toggle.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# Toggle between Swiss German (CH_DE) and US Workman layouts -CURRENT=$(setxkbmap -query | grep layout | awk '{print $2}') -if [ "$CURRENT" = "ch" ]; then - setxkbmap -layout us -variant workman -else - setxkbmap -layout ch -variant de -fi - diff --git a/i3/overlay-menu.sh b/i3/overlay-menu.sh deleted file mode 100755 index c4bb616..0000000 --- a/i3/overlay-menu.sh +++ /dev/null @@ -1,10 +0,0 @@ -# Get screen resolution -res_w=$(xdpyinfo | awk '/dimensions/{print $2}' | cut -d'x' -f1) -res_h=$(xdpyinfo | awk '/dimensions/{print $2}' | cut -d'x' -f2) - -# Compute margins if needed -w_margin=$((res_w / 4)) -h_margin=$((res_h / 4)) - -# Launch wlogout with margins -wlogout -T $h_margin -B $h_margin \ No newline at end of file