Created
November 20, 2024 15:15
-
-
Save dector/049ab8204b4162f510cd5bc91ccd5ddf to your computer and use it in GitHub Desktop.
toogle_kbd script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/fish | |
set current (gdbus introspect --session --dest org.gnome.Shell --object-path /me/madhead/Shyriiwook --only-properties | grep currentLayout | string match -g -r ".*= '([a-z+]+)'") | |
# echo "Current kbd: $current" | |
if test $current = "us+symbolic" | |
gdbus call --session --dest org.gnome.Shell --object-path /me/madhead/Shyriiwook --method me.madhead.Shyriiwook.activate 'ua' | |
else if test $current = "ua" | |
gdbus call --session --dest org.gnome.Shell --object-path /me/madhead/Shyriiwook --method me.madhead.Shyriiwook.activate 'us+symbolic' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment