From 5c2cd97f53cc08da40a8a12d1f12c0267e40f5d0 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Wed, 1 Nov 2023 12:07:59 +0200 Subject: cqtile:(widgets) Add battery widget, update fontsize to 14 --- .config/qtile/config.py | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) (limited to '.config') 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 -- cgit v1.2.3