Prettify Qtile

This commit is contained in:
The-Repo-Club 2023-08-19 10:50:47 +01:00
parent b19032aa29
commit c11b193b83
No known key found for this signature in database
GPG Key ID: E30EC2FBFB05C44F
2 changed files with 43 additions and 55 deletions

View File

@ -341,27 +341,17 @@ screens = [
top=bar.Bar( top=bar.Bar(
[ [
Widgets.launcher, Widgets.launcher,
Widgets.sep,
Widgets.groupBox1, Widgets.groupBox1,
Widgets.sep, Widgets.currentLayout,
Widgets.power, Widgets.power,
Widgets.sep,
Widgets.windowName, Widgets.windowName,
Widgets.sep,
Widgets.updates, Widgets.updates,
Widgets.sep,
Widgets.volume, Widgets.volume,
Widgets.sep,
Widgets.backlight, Widgets.backlight,
Widgets.sep,
Widgets.net, Widgets.net,
Widgets.sep,
Widgets.date, Widgets.date,
Widgets.time, Widgets.time,
Widgets.sep,
Widgets.tray, Widgets.tray,
Widgets.sep,
Widgets.currentLayout,
], ],
28, 28,
background=backgroundColor, background=backgroundColor,
@ -373,12 +363,9 @@ screens = [
bottom=bar.Bar( bottom=bar.Bar(
[ [
Widgets.weather, Widgets.weather,
Widgets.sep,
Widgets.space, Widgets.space,
Widgets.picom, Widgets.picom,
Widgets.sep,
Widgets.github, Widgets.github,
Widgets.sep,
Widgets.chords, Widgets.chords,
], ],
28, 28,
@ -393,25 +380,16 @@ screens = [
top=bar.Bar( top=bar.Bar(
[ [
Widgets.launcher, Widgets.launcher,
Widgets.sep,
Widgets.groupBox2, Widgets.groupBox2,
Widgets.sep, Widgets.currentLayout,
Widgets.power, Widgets.power,
Widgets.sep,
Widgets.windowName, Widgets.windowName,
Widgets.sep,
Widgets.updates, Widgets.updates,
Widgets.sep,
Widgets.volume, Widgets.volume,
Widgets.sep,
Widgets.backlight, Widgets.backlight,
Widgets.sep,
Widgets.net, Widgets.net,
Widgets.sep,
Widgets.date, Widgets.date,
Widgets.time, Widgets.time,
Widgets.sep,
Widgets.currentLayout,
], ],
28, 28,
background=backgroundColor, background=backgroundColor,
@ -423,12 +401,9 @@ screens = [
bottom=bar.Bar( bottom=bar.Bar(
[ [
Widgets.weather, Widgets.weather,
Widgets.sep,
Widgets.space, Widgets.space,
Widgets.picom, Widgets.picom,
Widgets.sep,
Widgets.github, Widgets.github,
Widgets.sep,
Widgets.chords, Widgets.chords,
], ],
28, 28,

View File

@ -16,21 +16,22 @@ class Widgets(object):
space = widget.Spacer() space = widget.Spacer()
launcher = widget.Image( launcher = widget.LaunchBar(
fmt="{}", text_only=True,
filename=expanduser("~/.config/qtile/art/Archlinux-icon.svg"), fontsize=18,
margin=3, foreground=colorScheme[0],
mouse_callbacks={ background=colorScheme[2],
"Button1": lazy.spawn("menu"), progs=[
"Button3": lazy.spawn("rofi -show drun"), (" 󰣇 ", "menu"),
}, ],
) )
power = widget.LaunchBar( power = widget.LaunchBar(
text_only=True, text_only=True,
foreground=colorScheme[1], foreground=colorScheme[0],
background=colorScheme[1],
progs=[ progs=[
("", "rofi -show powermenu -config ~/.config/rofi/powermenu.rasi"), (" ", "rofi -show powermenu -config ~/.config/rofi/powermenu.rasi"),
], ],
) )
@ -93,34 +94,39 @@ class Widgets(object):
volume = widget.Volume( volume = widget.Volume(
fmt="Vol: {}", fmt="Vol: {}",
foreground=colorScheme[2], foreground=backgroundColor,
background=colorScheme[2],
padding=10, padding=10,
) )
backlight = widget.Backlight( backlight = widget.Backlight(
fmt="Backlight: {}", fmt="Backlight: {}",
foreground=colorScheme[4], foreground=backgroundColor,
background=colorScheme[4],
padding=10, padding=10,
backlight_name="intel_backlight", backlight_name="intel_backlight",
) )
net = widget.Net( net = widget.Net(
fmt="{}", fmt="{}",
foreground=colorScheme[5], foreground=backgroundColor,
background=colorScheme[5],
padding=10, padding=10,
interface="wlan0", interface="wlan0",
) )
date = widget.Clock( date = widget.Clock(
fmt="{}", fmt="{}",
foreground=colorScheme[6], foreground=backgroundColor,
background=colorScheme[6],
format="%d %B %Y", format="%d %B %Y",
padding=10, padding=10,
) )
time = widget.Clock( time = widget.Clock(
fmt="{}", fmt="{}",
foreground=colorScheme[6], foreground=backgroundColor,
background=colorScheme[6],
format="%I:%M %p", format="%I:%M %p",
padding=10, padding=10,
) )
@ -132,23 +138,25 @@ class Widgets(object):
currentLayout = widget.CurrentLayoutIcon( currentLayout = widget.CurrentLayoutIcon(
fmt="{}", fmt="{}",
background=colorScheme[0],
scale=0.7, scale=0.7,
padding=5, padding=5,
) )
chords = widget.Chord( chords = widget.Chord(
fmt="{}", fmt=" {} ",
chords_colors={ chords_colors={
"Resize Windows": (colorScheme[0], colorScheme[1]), "Resize Windows": (colorScheme[1], backgroundColor),
"Launch Game": (colorScheme[0], colorScheme[2]), "Launch Game": (colorScheme[2], backgroundColor),
"Take a Screenshot": (colorScheme[0], colorScheme[3]), "Take a Screenshot": (colorScheme[3], backgroundColor),
}, },
name_transform=lambda name: name.upper(), name_transform=lambda name: name.upper(),
) )
weather = widget.OpenWeather( weather = widget.OpenWeather(
fmt="{}", fmt=" {}",
foreground=colorScheme[9], foreground=backgroundColor,
background=colorScheme[9],
location="Darlington,UK", location="Darlington,UK",
format="{location_city}: {main_temp}°{units_temperature} ", format="{location_city}: {main_temp}°{units_temperature} ",
) )
@ -167,7 +175,8 @@ class Widgets(object):
picom = widget.GenPollText( picom = widget.GenPollText(
fmt="{}", fmt="{}",
foreground=colorScheme[11], foreground=backgroundColor,
background=colorScheme[11],
func=lambda: subprocess.check_output( func=lambda: subprocess.check_output(
expanduser("~/.config/qtile/scripts/picom.sh") expanduser("~/.config/qtile/scripts/picom.sh")
).decode("utf-8"), ).decode("utf-8"),
@ -181,11 +190,13 @@ class Widgets(object):
) )
github = widget.WidgetBox( github = widget.WidgetBox(
foreground=colorScheme[12], foreground=backgroundColor,
background=colorScheme[12],
widgets=[ widgets=[
widget.GenPollText( widget.GenPollText(
fmt="{}", fmt="{}",
foreground=colorScheme[13], foreground=backgroundColor,
background=colorScheme[13],
func=lambda: subprocess.check_output( func=lambda: subprocess.check_output(
expanduser("~/.config/qtile/scripts/github/notifications") expanduser("~/.config/qtile/scripts/github/notifications")
).decode("utf-8"), ).decode("utf-8"),
@ -194,7 +205,8 @@ class Widgets(object):
), ),
widget.GenPollText( widget.GenPollText(
fmt="{}", fmt="{}",
foreground=colorScheme[13], foreground=backgroundColor,
background=colorScheme[13],
func=lambda: subprocess.check_output( func=lambda: subprocess.check_output(
expanduser("~/.config/qtile/scripts/github/gists") expanduser("~/.config/qtile/scripts/github/gists")
).decode("utf-8"), ).decode("utf-8"),
@ -203,7 +215,8 @@ class Widgets(object):
), ),
widget.GenPollText( widget.GenPollText(
fmt="{}", fmt="{}",
foreground=colorScheme[13], foreground=backgroundColor,
background=colorScheme[13],
func=lambda: subprocess.check_output( func=lambda: subprocess.check_output(
expanduser("~/.config/qtile/scripts/github/repositories") expanduser("~/.config/qtile/scripts/github/repositories")
).decode("utf-8"), ).decode("utf-8"),
@ -211,6 +224,6 @@ class Widgets(object):
padding=10, padding=10,
), ),
], ],
text_closed="[Github <]", text_closed=" [Github <] ",
text_open="[Github >]", text_open=" [Github >] ",
) )