riced up and working
This commit is contained in:
parent
64d6b50e2b
commit
2ee2018741
87
bar.py
87
bar.py
@ -3,6 +3,9 @@ from libqtile.config import Click, Drag, Group, Key, Match, Screen
|
||||
from libqtile.lazy import lazy
|
||||
from libqtile.utils import guess_terminal, send_notification
|
||||
|
||||
from qtile_extras import widget
|
||||
from qtile_extras.widget.decorations import PowerLineDecoration
|
||||
|
||||
# Defaults
|
||||
|
||||
widget_defaults = dict(
|
||||
@ -13,15 +16,38 @@ widget_defaults = dict(
|
||||
|
||||
extension_defaults = widget_defaults.copy()
|
||||
|
||||
colors = [
|
||||
["#000000", "#000000"], # true black [0]
|
||||
["#ffffff", "#ffffff"],
|
||||
colors = [["#293136", "#293136"], #bg_dim [0]
|
||||
["#333C43", "#333C43"], #bg_0 [1]
|
||||
["#3A464C", "#3A464C"], #bg_1 [2]
|
||||
["#434F55", "#434F55"], #bg_2 [3]
|
||||
["#4D5960", "#4D5960"], #bg_3 [4]
|
||||
["#555F66", "#555F66"], #bg_4 [5]
|
||||
["#7FBBB3", "#7FBBB3"], #blue [6]
|
||||
["#A7C080", "#A7C080"], #green [7]
|
||||
["#DBBC7F", "#DBBC7F"], #yellow [8]
|
||||
["#E69875", "#E69875"], #orange [9]
|
||||
['#ED8082', '#ED8080'], #red [10]
|
||||
]
|
||||
|
||||
# Eye candy widgets
|
||||
|
||||
rounded_left = {
|
||||
"decorations": [
|
||||
PowerLineDecoration(
|
||||
path='rounded_left',
|
||||
size=10,
|
||||
)
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
rounded_right = {
|
||||
"decorations": [
|
||||
PowerLineDecoration(
|
||||
path='rounded_right',
|
||||
size=10,
|
||||
)
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
# Funciton widgets
|
||||
@ -33,26 +59,59 @@ icon = widget.TextBox(
|
||||
fontsize=20,
|
||||
margin=4,
|
||||
padding=3,
|
||||
**rounded_left,
|
||||
background= colors[0],
|
||||
)
|
||||
|
||||
|
||||
group_box = widget.GroupBox(
|
||||
highlight_metod='block',
|
||||
visible_groups=['1', '2', '3', '4', '5']
|
||||
font="JetBrainsMono Nerd Font Mono",
|
||||
highlight_method='line',
|
||||
highlight_color=colors[2],
|
||||
background = colors[4],
|
||||
**rounded_left,
|
||||
)
|
||||
|
||||
window_name = widget.WindowName()
|
||||
spacer = widget.Spacer(
|
||||
**rounded_right,
|
||||
background = "#00000000", #transparent
|
||||
)
|
||||
|
||||
kb_layout = widget.KeyboardLayout(
|
||||
configured_keyboards=['us', 'cz qwerty'],
|
||||
display_map={'us':'US', 'cz qwerty':'CZ'},
|
||||
font="JetBrainsMono Nerd Font",
|
||||
fmt=" {}",
|
||||
background=colors[4],
|
||||
**rounded_right,
|
||||
)
|
||||
|
||||
ram = widget.Memory(
|
||||
font="JetBrainsMono Nerd Font",
|
||||
format = " {MemFree:.0f} {SwapFree:.0f}",
|
||||
background=colors[6],
|
||||
mesure_mem="M",
|
||||
mesure_swap="M",
|
||||
**rounded_right,
|
||||
)
|
||||
|
||||
battery = widget.Battery(
|
||||
format="{char}{percent:2.0%} {hour:d}:{min:02d}"
|
||||
font="JetBrainsMono Nerd Font",
|
||||
format="{char} {percent:2.0%} {hour:d}:{min:02d}",
|
||||
background=colors[8],
|
||||
full_background=colors[7],
|
||||
low_background=colors[10],
|
||||
charge_char = "",
|
||||
discharge_char = "",
|
||||
empty_char= "",
|
||||
**rounded_right,
|
||||
)
|
||||
|
||||
clock = widget.Clock(format="%y-%m-%d %a %H:%M")
|
||||
clock = widget.Clock(
|
||||
format=" %y-%m-%d %a %H:%M",
|
||||
background=colors[0],
|
||||
padding = 5,
|
||||
)
|
||||
|
||||
# Screen definition
|
||||
|
||||
@ -68,14 +127,13 @@ screens = [
|
||||
top=bar.Bar([
|
||||
icon,
|
||||
group_box,
|
||||
window_name,
|
||||
spacer,
|
||||
kb_layout,
|
||||
ram,
|
||||
battery,
|
||||
clock,
|
||||
], 30,
|
||||
margin=6,
|
||||
border_width=1,
|
||||
border_color= colors[1][0], # Borders are white
|
||||
),
|
||||
),
|
||||
|
||||
@ -90,14 +148,13 @@ screens = [
|
||||
top=bar.Bar([
|
||||
icon,
|
||||
group_box,
|
||||
window_name,
|
||||
spacer,
|
||||
kb_layout,
|
||||
ram,
|
||||
battery,
|
||||
clock,
|
||||
], 30,
|
||||
margin=6,
|
||||
border_width=1,
|
||||
border_color="ffffff", # Borders are white
|
||||
),
|
||||
)
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user