Open
Description
My use case is that I alternate between US and US Dvorak. For both, I have a setxkbmap
option and I then reload ~/.xmodmaprc
. I use this rather unfortunate line:
kbdcfg.add_primary_layout("Dvorak", "DV", "-option\" compose:ralt dvorak && xmodmap ~/.xmodmaprc && echo \"")
This is to "hack" into the os.execute
that is done by the code.
A much more elegant solution would be to have a add_primary_layout
with named arguments name
, icon
, full_command
, cmd_argument
, with the last two optional, although one of the two should be there. For instance:
kbdcfg.add_primary_layout_opt { name = "Dvorak", icon = "DV",
full_command = "setxkbmap -option compase:ralt dvorak && xmodmap ~/.xmodmaprc" }
xbdcfg.add_primary_layout_opt { name = "US", icon = "US", cmd_argument = "us" }
Alternatively, we could specify the command when creating kbdcfg
as:
cmd = "setxkbmap -option compose:ralt \"{}\" && xmodap ~/.xmodmaprc"
… but this does not provide the same flexibility.
Metadata
Metadata
Assignees
Labels
No labels