Compare commits

...

3 commits

2 changed files with 15 additions and 7 deletions

View file

@ -73,6 +73,8 @@ 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
bindsym $mod+F1 exec --no-startup-id "sh /home/vylpes/scripts/system/toggle-keyboard.sh"
# =====
# start a terminal
@ -91,9 +93,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
@ -189,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+Shift+F1 exec --no-startup-id setxkbmap -layout us
bindsym $mod+Shift+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)

View file

@ -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"