Move sway from linux_home to nix style dir in root

This commit is contained in:
Martin Larsson 2025-01-23 16:55:30 +01:00
parent 8cb53fd6bd
commit ef5a1892d8
7 changed files with 0 additions and 0 deletions

10
sway/toggle_keyboard_layout.sh Executable file
View 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