From 4e37da400c12d7a73a00d8dd7979c7fe6109b894 Mon Sep 17 00:00:00 2001 From: ThanosApollo Date: Mon, 3 Oct 2022 08:38:00 +0300 Subject: Update widgets --- .config/qtile/config.py | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) (limited to '.config/qtile/config.py') diff --git a/.config/qtile/config.py b/.config/qtile/config.py index 199d043..3ed23bd 100644 --- a/.config/qtile/config.py +++ b/.config/qtile/config.py @@ -122,19 +122,42 @@ def init_widgets_list(): background = my_colors["black"], ), widget.Notify( + font = "sansmono", + fontsize = "14", ), + # widget.Pomodoro( + # font = 'sansmono', + # fontsize = 17, + # color_inactive = my_colors['blue'], + # length_pomodori = 35, + # ), + # widget.Sep( + # linewidth = 1, + # padding = 10, + # foreground = my_colors["black2"], + # background = my_colors["black"] + # ), + widget.TextBox( + font="FontAwesome", + text= '|' + str(subprocess.check_output("uname -r", shell=True).strip()).replace('b','') + '|', + foreground=my_colors["grey2"], + background=my_colors["black"], + padding = 0, + fontsize=14 + ), widget.Sep( linewidth = 1, padding = 10, foreground = my_colors["black2"], background = my_colors["black"] ), - widget.Pomodoro( + widget.Volume( font = 'sansmono', - fontsize = 17, - color_inactive = my_colors['blue'], - length_pomodori = 35, + fontsize = 15, + fmt = 'Vol: {}', + foreground = my_colors['cyan'], + ), widget.Sep( linewidth = 1, @@ -142,20 +165,6 @@ def init_widgets_list(): foreground = my_colors["black2"], background = my_colors["black"] ), - # widget.TextBox( - # font="FontAwesome", - # text= '|' + str(subprocess.check_output("uname -r", shell=True).strip()).replace('b','') + '|', - # foreground=my_colors["blue"], - # background=my_colors["black"], - # padding = 0, - # fontsize=14 - # ), - # widget.Sep( - # linewidth = 1, - # padding = 10, - # foreground = my_colors["black2"], - # background = my_colors["black"] - # ), widget.Memory( measure_mem="G", fontsize=15, -- cgit v1.2.3 From 550424987e5c8aecb72421e7c75856c13758edcd Mon Sep 17 00:00:00 2001 From: ThanosApollo Date: Mon, 3 Oct 2022 15:06:30 +0300 Subject: Update qtile keys --- .config/qtile/config.py | 5 +++-- .config/qtile/keys.py | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to '.config/qtile/config.py') diff --git a/.config/qtile/config.py b/.config/qtile/config.py index 3ed23bd..24cedcd 100644 --- a/.config/qtile/config.py +++ b/.config/qtile/config.py @@ -17,7 +17,8 @@ def start_once(): ## Keybindings my_keys = MyKeys(mod="mod4", browser="qutebrowser", - term="alacritty") + term="alacritty", + editor = "emacsclient -c -a 'emacs'") keys = my_keys.init_keys() dgroups_key_binder = simple_key_binder("mod4") @@ -53,7 +54,7 @@ layouts = [ # layout.MonadWide(**layout_theme), # layout.Matrix(**layout_theme), # layout.Bsp(**layout_theme), - # layout.Floating(**layout_theme), + layout.Floating(**layout_theme), # layout.RatioTile(**layout_theme), layout.Max(**layout_theme) ] diff --git a/.config/qtile/keys.py b/.config/qtile/keys.py index 8667d2e..76625a1 100644 --- a/.config/qtile/keys.py +++ b/.config/qtile/keys.py @@ -7,10 +7,12 @@ from libqtile.command import lazy class MyKeys(): - def __init__(self,mod,browser,term): + def __init__(self,mod,browser,term,editor): self.mod = mod self.browser = browser self.term = term + self.editor = editor + def init_keys(self): my_keys = [ @@ -52,8 +54,8 @@ class MyKeys(): desc='Shutdown Qtile' ), Key([self.mod, "shift"], "e", - lazy.spawn("emacsclient -c -a 'emacs'"), - desc='Doom Emacs' + lazy.spawn(self.editor), + desc='Launch editor' ), ### Switch focus of monitors Key([self.mod], "period", -- cgit v1.2.3 From 780e1518d1fd0fa6cb13a79109d9e9401a015866 Mon Sep 17 00:00:00 2001 From: ThanosApollo Date: Mon, 3 Oct 2022 15:26:26 +0300 Subject: Add mouse keys --- .config/qtile/config.py | 4 +++- .config/qtile/keys.py | 10 +++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to '.config/qtile/config.py') 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 -- cgit v1.2.3