Open whoizit opened 1 year ago
https://github.com/swaywm/sway
this configuration works for me on Sway:
"vim.autoSwitchInputMethod.defaultIM": "0", "vim.autoSwitchInputMethod.obtainIMCmd": "/home/user/.config/sway/get-im.sh", "vim.autoSwitchInputMethod.switchIMCmd": "/home/user/.config/sway/set-im.sh {im}", "vim.autoSwitchInputMethod.enable": true,
❯ cat ~/.config/sway/get-im.sh #!/bin/sh source $(dirname "$0")/.env swaymsg -t get_inputs | jq -r "[.[] | select(.identifier == \"$KEYBOARD\")][0] | .xkb_active_layout_index"
❯ cat ~/.config/sway/set-im.sh #!/bin/sh source $(dirname "$0")/.env swaymsg input "$KEYBOARD" xkb_switch_layout "$1"
❯ cat ~/.config/sway/.env # swaymsg -t get_inputs KEYBOARD='6700:8484:SEM_USB_Keyboard'
What is sway?
Add it to README?
https://github.com/swaywm/sway
this configuration works for me on Sway: