Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposed methods don't work for Fedora 35 #32

Open
CptnGreen opened this issue Mar 23, 2022 · 2 comments
Open

Proposed methods don't work for Fedora 35 #32

CptnGreen opened this issue Mar 23, 2022 · 2 comments

Comments

@CptnGreen
Copy link

CptnGreen commented Mar 23, 2022

Found a solution based on the last method with get-im/set-im scripts but using gsettings instead of gdbus:

get-im.sh

#!/bin/bash

# "mru" stands for "most recently used"
gsettings get \
	org.gnome.desktop.input-sources mru-sources \
	| awk -F "), " ' { print $1 } ' \
	| awk -F\' ' { print $4 } '

set-im.sh

#!/bin/bash

gsettings set \
	org.gnome.desktop.input-sources sources "[('xkb', '$1')]"

# here you have your own list of languages which you can get via 
# `gsettings get org.gnome.desktop.input-sources sources`
gsettings set \
	org.gnome.desktop.input-sources sources "[('xkb', 'us'), ('xkb', 'ru')]"

Trick is that gsettings holds active that single option you pass to it in the first set command.

Hope this helps somebody.
Please consider appending to docs.

@daipeihust
Copy link
Owner

you can create a pull request

@ahmafi
Copy link

ahmafi commented Aug 26, 2023

I have tried this, and it works, but when I switch from normal mode to insert mode with cw or any other shortcut for changing the text, the cursor doesn't get changed from block cursor to line cursor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants