From 459541ed89d97b3b58148fa3d02b76759c93ff2a Mon Sep 17 00:00:00 2001 From: Oleksandr Kulkov Date: Tue, 29 Nov 2022 01:11:25 +0100 Subject: [PATCH] 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. --- src/modules/hyprland/language.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/modules/hyprland/language.cpp b/src/modules/hyprland/language.cpp index ad0cdb8..13e30ec 100644 --- a/src/modules/hyprland/language.cpp +++ b/src/modules/hyprland/language.cpp @@ -85,7 +85,6 @@ void Language::initLanguage() { try { 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(0, searcher.find_first_of("\n\t"));