diff options
author | ThanosApollo <[email protected]> | 2022-10-03 15:26:26 +0300 |
---|---|---|
committer | ThanosApollo <[email protected]> | 2022-10-03 15:26:26 +0300 |
commit | 780e1518d1fd0fa6cb13a79109d9e9401a015866 (patch) | |
tree | 438ec406d28b970b79645baa64e4ca0357ee6e02 /.config | |
parent | 3f1291e51a6363acad76a681184a682dade74025 (diff) |
Add mouse keys
Diffstat (limited to '.config')
-rw-r--r-- | .config/qtile/config.py | 4 | ||||
-rw-r--r-- | .config/qtile/keys.py | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/.config/qtile/config.py b/.config/qtile/config.py index 24cedcd..d61aa70 100644 --- a/.config/qtile/config.py +++ b/.config/qtile/config.py @@ -22,7 +22,7 @@ my_keys = MyKeys(mod="mod4", keys = my_keys.init_keys() dgroups_key_binder = simple_key_binder("mod4") - +mouse = my_keys.init_mouse() ## Groups and layouts groups = [] group_names = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0",] @@ -249,6 +249,8 @@ def init_screens(): return [Screen(top=bar.Bar(widgets=init_widgets_screen1(), size=33, opacity=0.8)), Screen(top=bar.Bar(widgets=init_widgets_screen2(), size=26, opacity=0.8))] + + screens = init_screens() follow_mouse_focus = True diff --git a/.config/qtile/keys.py b/.config/qtile/keys.py index 76625a1..9b9438b 100644 --- a/.config/qtile/keys.py +++ b/.config/qtile/keys.py @@ -2,7 +2,7 @@ from libqtile.config import Key from libqtile.command import lazy - +from libqtile.config import Click, Drag @@ -163,3 +163,11 @@ class MyKeys(): ), ] return my_keys + + def init_mouse(self): + mouse_keys = [ + Drag([self.mod], "Button1", lazy.window.set_position_floating(), start=lazy.window.get_position()), + Drag([self.mod], "Button3", lazy.window.set_size_floating(), start=lazy.window.get_size()), + Click([self.mod], "Button2", lazy.window.bring_to_front()), + ] + return mouse_keys |