mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Don't search "Keyboard at" from hyprland/language
The current output form of `hyprctl devices` is like this: ``` Keyboard at 6f80ad70: ITE Tech. Inc. ITE Device(8910) Keyboard rules: r "", m "", l "us,ru", v "", o "grp:alt_shift_toggle" active keymap: Russian main: no ``` That is, `Keyboard at` goes _before_ the keyboard name, so looking for `Keyboard at` only makes it skip to the keyboard _after_ the one that the user specified.
This commit is contained in:
parent
da3d9533d1
commit
459541ed89
@ -85,7 +85,6 @@ void Language::initLanguage() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
auto searcher = INPUTDEVICES.substr(INPUTDEVICES.find(KEEBNAME) + KEEBNAME.length());
|
auto searcher = INPUTDEVICES.substr(INPUTDEVICES.find(KEEBNAME) + KEEBNAME.length());
|
||||||
searcher = searcher.substr(searcher.find("Keyboard at"));
|
|
||||||
searcher = searcher.substr(searcher.find("keymap:") + 7);
|
searcher = searcher.substr(searcher.find("keymap:") + 7);
|
||||||
searcher = searcher.substr(0, searcher.find_first_of("\n\t"));
|
searcher = searcher.substr(0, searcher.find_first_of("\n\t"));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user