super + enter to switch keyboard layouts
This commit is contained in:
@@ -191,3 +191,14 @@ bind("SUPER + SUPER_R", hl.dsp.workspace.toggle_special(), {device = {inclusive
|
||||
-- Global back and forward binds
|
||||
bind('ALT + SLASH', hl.dsp.send_shortcut({mods = 'ALT', key = 'LEFT'}))
|
||||
bind('ALT + EQUAL', hl.dsp.send_shortcut({mods = 'ALT', key = 'RIGHT'}))
|
||||
|
||||
-- Switch keyboard layouts
|
||||
bind('SUPER + RETURN', function()
|
||||
if hl.get_config('input.kb_variant') == 'dvorak' then
|
||||
hl.config({input = {kb_variant = ''}})
|
||||
hl.exec_cmd('notify-send -i input-keyboard "Keyboard layout changed" "QWERTY"')
|
||||
else
|
||||
hl.config({input = {kb_variant = 'dvorak'}})
|
||||
hl.exec_cmd('notify-send -i input-keyboard "Keyboard layout changed" "Dvorak"')
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user