simplify sway side
This commit is contained in:
@@ -2193,7 +2193,6 @@ class EditorWrapper(object):
|
|||||||
check_key(self.panel, "keyboard-layout", {})
|
check_key(self.panel, "keyboard-layout", {})
|
||||||
settings = self.panel["keyboard-layout"]
|
settings = self.panel["keyboard-layout"]
|
||||||
defaults = {
|
defaults = {
|
||||||
"keyboard-device-sway": "",
|
|
||||||
"keyboard-device-hyprland": "",
|
"keyboard-device-hyprland": "",
|
||||||
"root-css-name": "root-executor",
|
"root-css-name": "root-executor",
|
||||||
"css-name": "executor",
|
"css-name": "executor",
|
||||||
@@ -2221,9 +2220,9 @@ class EditorWrapper(object):
|
|||||||
|
|
||||||
self.kl_combo_device = builder.get_object("device")
|
self.kl_combo_device = builder.get_object("device")
|
||||||
if sway:
|
if sway:
|
||||||
from i3ipc import Connection
|
# from i3ipc import Connection
|
||||||
i3 = Connection()
|
# i3 = Connection()
|
||||||
inputs = i3.get_inputs()
|
# inputs = i3.get_inputs()
|
||||||
self.kl_combo_device.append("", voc["all"])
|
self.kl_combo_device.append("", voc["all"])
|
||||||
# for i in inputs:
|
# for i in inputs:
|
||||||
# if i.type == "keyboard":
|
# if i.type == "keyboard":
|
||||||
@@ -2273,9 +2272,7 @@ class EditorWrapper(object):
|
|||||||
|
|
||||||
def update_keyboard_layout(self):
|
def update_keyboard_layout(self):
|
||||||
settings = self.panel["keyboard-layout"]
|
settings = self.panel["keyboard-layout"]
|
||||||
if sway:
|
if hyprland:
|
||||||
settings["keyboard-device-sway"] = self.kl_combo_device.get_active_id()
|
|
||||||
elif hyprland:
|
|
||||||
settings["keyboard-device-hyprland"] = self.kl_combo_device.get_active_id()
|
settings["keyboard-device-hyprland"] = self.kl_combo_device.get_active_id()
|
||||||
settings["tooltip-text"] = self.kl_tooltip_text.get_text()
|
settings["tooltip-text"] = self.kl_tooltip_text.get_text()
|
||||||
settings["root-css-name"] = self.kl_root_css_name.get_text()
|
settings["root-css-name"] = self.kl_root_css_name.get_text()
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
<property name="can-focus">False</property>
|
<property name="can-focus">False</property>
|
||||||
<property name="halign">start</property>
|
<property name="halign">start</property>
|
||||||
<property name="label" translatable="yes"><span size="small"><b>Note:</b> on sway switching layouts for a certain keyboard device does not work.
|
<property name="label" translatable="yes"><span size="small"><b>Note:</b> on sway switching layouts for a certain keyboard device does not work.
|
||||||
We will be switching for just 'type:keyboard' ¯\_(•_•)_/¯</span></property>
|
We will be switching for devices of 'type:keyboard' ¯\_(•_•)_/¯</span></property>
|
||||||
<property name="use-markup">True</property>
|
<property name="use-markup">True</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
|
Reference in New Issue
Block a user