diff options
author | Thanos Apollo <[email protected]> | 2023-11-01 12:07:59 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-11-01 12:07:59 +0200 |
commit | 5c2cd97f53cc08da40a8a12d1f12c0267e40f5d0 (patch) | |
tree | 99b3d1612d1ab3231489ff25897f6cced934a1d2 | |
parent | e7eeb03a7d65670e8c5b3d50e23314fdae840549 (diff) |
cqtile:(widgets) Add battery widget, update fontsize to 14
-rw-r--r-- | .config/qtile/config.py | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/.config/qtile/config.py b/.config/qtile/config.py index be3b9b8..cad1991 100644 --- a/.config/qtile/config.py +++ b/.config/qtile/config.py @@ -1,5 +1,6 @@ import os import subprocess +import socket from libqtile import layout, bar, widget, hook from libqtile.config import Group, Screen from libqtile.dgroups import simple_key_binder @@ -9,6 +10,9 @@ from libqtile.config import Click, Drag from colors import dracula +# var +hostname = socket.gethostname() + # Groups and layouts groups = [] group_names = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", ] @@ -78,7 +82,6 @@ def init_widgets_defaults(): widget_defaults = init_widgets_defaults() - def init_widgets_list(): """My widget list.""" widgets_list = [ @@ -120,30 +123,6 @@ def init_widgets_list(): foreground=dracula["green"], background=dracula["bg"], ), - # widget.Image( - # filename = "~/.config/qtile/spotify2.png", - # scale = True, - # ), - # Spotify( - # fontsize = 12, - # background = dracula["bg"], - # color = dracula["green"], - # fmt = '{}', - # font = "JetBrains Mono Bold" - # ), - # widget.Moc( - # font = "JetBrains Mono", - # fontsize= 13, - # play_color=dracula["green"], - # paddig = 10, - # ), - # widget.Pomodoro( - # color_active=dracula["cyan"], - # color_break=dracula["orange"], - # color_inactive=dracula["curr"], - # lenghth_pomodori=30, - # fontsize=17, - # ), widget.Spacer( length=10, ), @@ -243,6 +222,7 @@ def init_widgets_list(): ] return widgets_list +battery_widget = widget.Battery() widgets_list = init_widgets_list() @@ -250,6 +230,8 @@ widgets_list = init_widgets_list() def init_widgets_screen1(): """Init every widget for primary screen.""" widgets_screen1 = init_widgets_list() + if hostname == "hermes": + widgets_screen1.append(battery_widget) return widgets_screen1 |