dotfiles/bin/executable_kde-rofi-rbw-autotype

15 lines
460 B
Plaintext
Raw Normal View History

2023-07-28 09:18:09 -04:00
#!/bin/sh
current_layout=$(dbus-send --print-reply=literal --dest=org.kde.keyboard \
/Layouts org.kde.KeyboardLayouts.getLayout | xargs | tr " " ":")
trap reset_layout 1 2 3 6 15
reset_layout() {
dbus-send --type=method_call --dest=org.kde.keyboard /Layouts org.kde.KeyboardLayouts.setLayout "$current_layout"
}
dbus-send --type=method_call --dest=org.kde.keyboard /Layouts org.kde.KeyboardLayouts.setLayout uint32:0
rofi-rbw --typer=dotool
reset_layout