From 0631d7e4482ef093b4e6b88155f7f233dd43f5c0 Mon Sep 17 00:00:00 2001 From: The-Repo-Club Date: Fri, 1 Sep 2023 19:45:43 +0100 Subject: [PATCH] Update Qtile --- dconf/.config/dconf/user | Bin 8622 -> 8630 bytes qtile/.config/qtile/cfg.json | 2 +- qtile/.config/qtile/config.py | 2 +- qtile/.config/qtile/core/bar/bottom.py | 62 ++++++++++++++++++ qtile/.config/qtile/core/bar/shapes.py | 2 +- qtile/.config/qtile/core/hooks.py | 2 +- qtile/.config/qtile/core/screens.py | 4 +- .../.config/qtile/scripts/xcompmgr-toggle.sh | 5 -- qtile/.config/qtile/scripts/xcompmgr.sh | 4 +- 9 files changed, 70 insertions(+), 13 deletions(-) create mode 100644 qtile/.config/qtile/core/bar/bottom.py diff --git a/dconf/.config/dconf/user b/dconf/.config/dconf/user index e644d720f10232333a23a19f59ccd737c9b13d49..d73170578930bcc3c51260785eea661c3bc84ede 100644 GIT binary patch delta 2634 zcmW-j3sjD00LPzhDx$AY$R*3ABbScYBA15Q*J^1-T0-GqMs;eOmd-v#d~RE5$Ss}O z#1s+9IxZW|a)vQGmT7ZaXHD(GoU@Fv-~V;a-~adgpXYs^=Y1~k*TM1C<15QuUAk9Q zxO%!^$K2dp9F2>cYCViG>-~*sXW~pTz7q|a@m6srx!9Y0AAS^VA3pJJHo3Sx`8oU| z3RzVZGMrr8!7Memaa%`YhBza963NAZn2BH0*+Rq&=Fk}wvnI_YEU%L8I{ zl!{+R(T`3WO-Ss{zzz6qRKGc9YkzWa8}cT+1^ssV>QABM;&$}Yia$Z`-Kf~^M=tg< zjyU7q$rvAWzu>C}(Nu{2cpw-LLH*a{m0J`f#>yEl#4Vy(m|vPH-_esF6b zxmYWjgXf`XWADXhkc)fJe<{Al!GC3wM%TDfu?KEXMI~O1HuQUWV=TG2EghY~&!POY zhX#6*i@nG%;`J!aH*5EFag-q zIt1)mPAqn?$8qKn;ZyX|l$41YKpeyaT>^~hiJ}4$Tl8k)j^vS6W=!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@9Q? zrT5JD=Fd-?w_tv_K1nl>4|+FkX6EdL3zp2E6>cV%9Q5m7)99CKb9$*}bih7$el6bb HdEV)N98vuO diff --git a/qtile/.config/qtile/cfg.json b/qtile/.config/qtile/cfg.json index 748158975..1d7389051 100644 --- a/qtile/.config/qtile/cfg.json +++ b/qtile/.config/qtile/cfg.json @@ -1,6 +1,6 @@ { "bar": "shapes", - "bar2": "shapes", + "bar2": "bottom", "browser": "firefox", "term": "alacritty", "term2": "kitty", diff --git a/qtile/.config/qtile/config.py b/qtile/.config/qtile/config.py index a91f90bc1..5410d36e5 100644 --- a/qtile/.config/qtile/config.py +++ b/qtile/.config/qtile/config.py @@ -31,4 +31,4 @@ wl_input_rules = None # # We choose LG3D to maximize irony: it is a 3D non-reparenting WM written in # java that happens to be on java's whitelist. -wmname = "Qtile" +wmname = "qtile" diff --git a/qtile/.config/qtile/core/bar/bottom.py b/qtile/.config/qtile/core/bar/bottom.py new file mode 100644 index 000000000..ee3986d22 --- /dev/null +++ b/qtile/.config/qtile/core/bar/bottom.py @@ -0,0 +1,62 @@ +from libqtile.bar import CALCULATED +from libqtile.lazy import lazy + +from core.bar.base import base, icon_font, powerline, rectangle +from extras import Clock, GroupBox, TextBox, modify, widget +from utils.config import cfg +from utils.palette import palette + +bar = { + "background": palette.backgroundColor, + "border_color": palette.backgroundColor, + "border_width": 2, + "margin": 2, + "opacity": 1, + "size": 18, +} + + +def sep(fg, offset=0, padding=8) -> TextBox: + return TextBox( + **base(None, fg), + **icon_font(), + offset=offset, + padding=padding, + text="󰇙", + ) + + +def weather(bg, fg) -> list: + return [ + modify( + TextBox, + **base(bg, fg), + **icon_font(), + **rectangle("left"), + offset=0, + padding=0, + ), + widget.OpenWeather( + **base(bg, fg), + fmt="{}", + location="Darlington,UK", + format="{icon} {location_city}: {main_temp}°{units_temperature}", + ), + modify( + TextBox, + **base(bg, fg), + **icon_font(), + **rectangle("right"), + offset=0, + padding=0, + ), + ] + + +def widgets(): + return [ + widget.Spacer(length=2), + *weather(palette.colorScheme[1], palette.currentColor), + widget.Spacer(), + widget.Spacer(length=2), + ] diff --git a/qtile/.config/qtile/core/bar/shapes.py b/qtile/.config/qtile/core/bar/shapes.py index 24548aa3b..6e6108807 100644 --- a/qtile/.config/qtile/core/bar/shapes.py +++ b/qtile/.config/qtile/core/bar/shapes.py @@ -12,7 +12,7 @@ bar = { "border_width": 2, "margin": 5, "opacity": 1, - "size": 28, + "size": 24, } diff --git a/qtile/.config/qtile/core/hooks.py b/qtile/.config/qtile/core/hooks.py index db69423aa..c13a8199b 100644 --- a/qtile/.config/qtile/core/hooks.py +++ b/qtile/.config/qtile/core/hooks.py @@ -35,7 +35,7 @@ def start_once(): @hook.subscribe.client_managed def auto_focus(window): - window.group.cmd_toscreen() + window.group.toscreen() @hook.subscribe.client_new diff --git a/qtile/.config/qtile/core/screens.py b/qtile/.config/qtile/core/screens.py index 8b3803b9a..9b5b07484 100644 --- a/qtile/.config/qtile/core/screens.py +++ b/qtile/.config/qtile/core/screens.py @@ -8,10 +8,12 @@ screens = [ wallpaper=cfg.wallpaper, wallpaper_mode="fill", top=Bar(cfg.bar).create(), + bottom=Bar(cfg.bar2).create(), ), Screen( wallpaper=cfg.wallpaper, wallpaper_mode="fill", - top=Bar(cfg.bar2).create(), + top=Bar(cfg.bar).create(), + bottom=Bar(cfg.bar2).create(), ), ] diff --git a/qtile/.config/qtile/scripts/xcompmgr-toggle.sh b/qtile/.config/qtile/scripts/xcompmgr-toggle.sh index 963cbaf16..d4eb6e292 100644 --- a/qtile/.config/qtile/scripts/xcompmgr-toggle.sh +++ b/qtile/.config/qtile/scripts/xcompmgr-toggle.sh @@ -1,10 +1,5 @@ #!/usr/bin/env bash -# https://github.com/jaagr/polybar/wiki/User-contributed-modules - -#The command for starting compton -#always keep the -b argument! - if pgrep -x "xcompmgr" >/dev/null; then killall xcompmgr else diff --git a/qtile/.config/qtile/scripts/xcompmgr.sh b/qtile/.config/qtile/scripts/xcompmgr.sh index f20b6e4f4..1a478d674 100644 --- a/qtile/.config/qtile/scripts/xcompmgr.sh +++ b/qtile/.config/qtile/scripts/xcompmgr.sh @@ -1,8 +1,6 @@ #!/usr/bin/env bash -# https://github.com/jaagr/polybar/wiki/User-contributed-modules - -#The icon that would change color +#The text that would change color if pgrep -x "xcompmgr" >/dev/null; then echo -n "Loaded" else