Update Qtile

This commit is contained in:
The-Repo-Club 2023-09-01 19:45:43 +01:00
parent da374b92c2
commit 0631d7e448
No known key found for this signature in database
GPG Key ID: E30EC2FBFB05C44F
9 changed files with 70 additions and 13 deletions

Binary file not shown.

View File

@ -1,6 +1,6 @@
{ {
"bar": "shapes", "bar": "shapes",
"bar2": "shapes", "bar2": "bottom",
"browser": "firefox", "browser": "firefox",
"term": "alacritty", "term": "alacritty",
"term2": "kitty", "term2": "kitty",

View File

@ -31,4 +31,4 @@ wl_input_rules = None
# #
# We choose LG3D to maximize irony: it is a 3D non-reparenting WM written in # We choose LG3D to maximize irony: it is a 3D non-reparenting WM written in
# java that happens to be on java's whitelist. # java that happens to be on java's whitelist.
wmname = "Qtile" wmname = "qtile"

View File

@ -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),
]

View File

@ -12,7 +12,7 @@ bar = {
"border_width": 2, "border_width": 2,
"margin": 5, "margin": 5,
"opacity": 1, "opacity": 1,
"size": 28, "size": 24,
} }

View File

@ -35,7 +35,7 @@ def start_once():
@hook.subscribe.client_managed @hook.subscribe.client_managed
def auto_focus(window): def auto_focus(window):
window.group.cmd_toscreen() window.group.toscreen()
@hook.subscribe.client_new @hook.subscribe.client_new

View File

@ -8,10 +8,12 @@ screens = [
wallpaper=cfg.wallpaper, wallpaper=cfg.wallpaper,
wallpaper_mode="fill", wallpaper_mode="fill",
top=Bar(cfg.bar).create(), top=Bar(cfg.bar).create(),
bottom=Bar(cfg.bar2).create(),
), ),
Screen( Screen(
wallpaper=cfg.wallpaper, wallpaper=cfg.wallpaper,
wallpaper_mode="fill", wallpaper_mode="fill",
top=Bar(cfg.bar2).create(), top=Bar(cfg.bar).create(),
bottom=Bar(cfg.bar2).create(),
), ),
] ]

View File

@ -1,10 +1,5 @@
#!/usr/bin/env bash #!/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 if pgrep -x "xcompmgr" >/dev/null; then
killall xcompmgr killall xcompmgr
else else

View File

@ -1,8 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# https://github.com/jaagr/polybar/wiki/User-contributed-modules #The text that would change color
#The icon that would change color
if pgrep -x "xcompmgr" >/dev/null; then if pgrep -x "xcompmgr" >/dev/null; then
echo -n "Loaded" echo -n "Loaded"
else else