From e50a4795e96563fcda8ac44f3d0076bcce9d1f3b Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Mon, 28 Jul 2025 10:22:25 +0100 Subject: [PATCH 1/3] Add dunstctl history-pop shortcut --- .config/i3/config | 1 + 1 file changed, 1 insertion(+) diff --git a/.config/i3/config b/.config/i3/config index fda6ecc..b05bf57 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -73,6 +73,7 @@ bindsym $mod+f exec --no-startup-id firefox bindsym $mod+u exec --no-startup-id autorandr -c bindsym $mod+Shift+f exec --no-startup-id firefox --private-window bindsym $mod+Shift+z exec --no-startup-id i3lock --color 000000 +bindsym $mod+F12 exec --no-startup-id dunstctl history-pop # ===== # start a terminal From 5b0f3bb46a6a2e5ae405d351951ccf7949873382 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Mon, 28 Jul 2025 10:24:08 +0100 Subject: [PATCH 2/3] Update keyboard config change to be without shift --- .config/i3/config | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.config/i3/config b/.config/i3/config index b05bf57..02ed682 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -92,9 +92,6 @@ bindsym $mod+o exec --no-startup-id "keepmenu" # .desktop file. It is a wrapper around dmenu, so you need that installed. # bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop -bindsym $mod+Shift+F11 exec --no-startup-id "pactl set-default-sink 0 && sh ~/.scripts/audio/get-sink-name.sh > ~/.cache/scripts/get-sink-name.txt" -bindsym $mod+Shift+F12 exec --no-startup-id "pactl set-default-sink 1 && sh ~/.scripts/audio/get-sink-name.sh > ~/.cache/scripts/get-sink-name.txt" - # change focus bindsym $mod+h focus left bindsym $mod+j focus down @@ -191,8 +188,8 @@ bindsym $mod+Shift+9 move container to workspace number $ws9 bindsym $mod+Shift+0 move container to workspace number $ws10 # keyboard layouts -bindsym $mod+Shift+F1 exec --no-startup-id setxkbmap -layout us -bindsym $mod+Shift+F2 exec --no-startup-id setxkbmap -layout gb +bindsym $mod+F1 exec --no-startup-id setxkbmap -layout us +bindsym $mod+F2 exec --no-startup-id setxkbmap -layout gb # reload the configuration file bindsym $mod+Mod1+r reload From b319fb07f017e172b3ce8f13965f410debe6e5e4 Mon Sep 17 00:00:00 2001 From: Ethan Lane Date: Mon, 28 Jul 2025 10:45:44 +0100 Subject: [PATCH 3/3] Add toggle keyboard script --- .config/i3/config | 5 +---- scripts/system/toggle-keyboard.sh | 13 +++++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) create mode 100755 scripts/system/toggle-keyboard.sh diff --git a/.config/i3/config b/.config/i3/config index 02ed682..f93e916 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -74,6 +74,7 @@ bindsym $mod+u exec --no-startup-id autorandr -c bindsym $mod+Shift+f exec --no-startup-id firefox --private-window bindsym $mod+Shift+z exec --no-startup-id i3lock --color 000000 bindsym $mod+F12 exec --no-startup-id dunstctl history-pop +bindsym $mod+F1 exec --no-startup-id "sh /home/vylpes/scripts/system/toggle-keyboard.sh" # ===== # start a terminal @@ -187,10 +188,6 @@ bindsym $mod+Shift+8 move container to workspace number $ws8 bindsym $mod+Shift+9 move container to workspace number $ws9 bindsym $mod+Shift+0 move container to workspace number $ws10 -# keyboard layouts -bindsym $mod+F1 exec --no-startup-id setxkbmap -layout us -bindsym $mod+F2 exec --no-startup-id setxkbmap -layout gb - # reload the configuration file bindsym $mod+Mod1+r reload # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) diff --git a/scripts/system/toggle-keyboard.sh b/scripts/system/toggle-keyboard.sh new file mode 100755 index 0000000..6856ade --- /dev/null +++ b/scripts/system/toggle-keyboard.sh @@ -0,0 +1,13 @@ +layout=$(setxkbmap -query | awk '/layout/{print $2}') +new=$layout + +if [ $layout = "us" ]; +then + setxkbmap -layout gb; + new="gb"; +else + setxkbmap -layout us; + new="us"; +fi + +echo "Keyboard layout changed from $layout to $new"