From 628a78dbc91f774468666f4b7c755852c87858b1 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Thu, 4 Jan 2024 23:30:08 +0100 Subject: [PATCH] Fix strachpad global keybinds & remove discord scratchpad --- home/qtile/src/core/groups.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/home/qtile/src/core/groups.py b/home/qtile/src/core/groups.py index 22d20b1..a1e61f2 100644 --- a/home/qtile/src/core/groups.py +++ b/home/qtile/src/core/groups.py @@ -15,24 +15,23 @@ def __init__(self, name: str, key: str): super().__init__(name) self.setup_keys() - def setup_keys(self): - move = Key([mod], self.key, lazy.group[self.name].toscreen()) - switch = Key( - [mod, "shift"], self.key, - lazy.window.togroup(self.name, switch_group=True), - ) - + @classmethod + def setup_single_keys(cls): toggle_term = Key( [mod, "shift"], "space", lazy.group["scratchpad"].dropdown_toggle("term"), ) - toggle_discord = Key( - [mod, "shift"], "d", - lazy.group["scratchpad"].dropdown_toggle("discord"), + keys.append(toggle_term) + + def setup_keys(self): + move = Key([mod], self.key, lazy.group[self.name].toscreen()) + switch = Key( + [mod, "shift"], self.key, + lazy.window.togroup(self.name, switch_group=True), ) - keys.extend((move, switch, toggle_term, toggle_discord)) + keys.extend((move, switch)) _scratchpads = [ @@ -63,6 +62,7 @@ def setup_keys(self): ) ] +_Group.setup_single_keys() groups = _scratchpads + [ _Group(lb, k) for lb, k in zip( "ζπδωλσς", [ @@ -78,4 +78,3 @@ def setup_keys(self): ] ) ] -