Move sway from linux_home to nix style dir in root
This commit is contained in:
parent
8cb53fd6bd
commit
ef5a1892d8
7 changed files with 0 additions and 0 deletions
10
sway/toggle_keyboard_layout.sh
Executable file
10
sway/toggle_keyboard_layout.sh
Executable file
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/zsh
|
||||
|
||||
# Toggle between US (0) and Swedish (1) layouts
|
||||
current=$(swaymsg -t get_inputs | jq -r '.[] | select(.type=="keyboard") | .xkb_active_layout_index' | head -n 1)
|
||||
|
||||
if [ "$current" -eq 0 ]; then
|
||||
swaymsg input '*' xkb_switch_layout 1
|
||||
else
|
||||
swaymsg input '*' xkb_switch_layout 0
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue