My Qtile window manager configuration
git clone https://github.com/m-col/qtile-config
Files | Refs | Readme

Commit 081da40fe20b9ee6dd6cdafcdac3e7b1b5b92923
Parent: a697c7466142effd5459898ba697d702379f5335
Author: mcol <mcol@posteo.net>
Date: 2022-10-10 21:03:11 +0100
Committer: mcol <mcol@posteo.net>
Committed: 2022-10-10 21:03:11 +0100

update cmd_ methods on custom widget

wayland.py Modified

@@ -139,7 +139,7 @@
         return
 
     wlr_output.set_custom_mode(1920, 1080, 0)
-    # Lastly, while cmd_reconfigure_screens will be fired right after this hook, as it
+    # Lastly, while reconfigure_screens will be fired right after this hook, as it
     # gets subscribed to this hook right after the config is loaded, the backend doesn't
     # get a change to actually apply the mode, so let's flush it.
     qtile.core.flush()

config.py Modified

@@ -490,17 +490,17 @@
             with open(self.wob, "a") as f:
                 f.write(str(self.volume) + "\n")
 
-    def cmd_increase_vol(self):
+    def increase_vol(self):
         subprocess.run("amixer -c PCH set PCM 3%+".split(), capture_output=True)
         self.volume = self.get_volume()
         self._update_drawer(wob=IS_WAYLAND)
 
-    def cmd_decrease_vol(self):
+    def decrease_vol(self):
         subprocess.run("amixer -c PCH set PCM 3%-".split(), capture_output=True)
         self.volume = self.get_volume()
         self._update_drawer(wob=IS_WAYLAND)
 
-    def cmd_mute(self):
+    def mute(self):
         subprocess.run("amixer -c PCH set PCM toggle".split(), capture_output=True)
         self.volume = self.get_volume()
         self._update_drawer(wob=False)
@@ -704,8 +704,7 @@
     # Keep Static windows on top
     for window in qtile.windows_map.values():
         if isinstance(window, base.Static):
-            if hasattr(window, "cmd_bring_to_front"):
-                window.bring_to_front()
+            window.bring_to_front()
 
 
 reconfigure_screens = True