Add language toggle between SE and US in Sway, additionally, set Ghostty to the default terminal.
This commit is contained in:
parent
060aa3fed8
commit
f0f10ab09b
2 changed files with 15 additions and 1 deletions
10
linux_home/.config/sway/toggle_keyboard_layout.sh
Executable file
10
linux_home/.config/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