add bling to waybar
This commit is contained in:
parent
39bf993bfc
commit
7df4667af8
|
@ -1,3 +1,4 @@
|
||||||
|
{%@@ set bg_rgb = hex2rgb(color.bg) @@%}
|
||||||
* {
|
* {
|
||||||
font: 14px {{@@ font.interface @@}}, Font Awesome, Fira Code Nerd Font;
|
font: 14px {{@@ font.interface @@}}, Font Awesome, Fira Code Nerd Font;
|
||||||
border-radius:0;
|
border-radius:0;
|
||||||
|
@ -6,10 +7,14 @@
|
||||||
transition-duration:0;
|
transition-duration:0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window#waybar.empty * {
|
||||||
|
color: {{@@ color.txt @@}};
|
||||||
|
}
|
||||||
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
/* background-color: rgba(30,30,30,.9); */
|
/* background-color: rgba(30,30,30,.9); */
|
||||||
opacity: 0.9;
|
transition-duration: .5s;
|
||||||
background-color: {{@@ color.bg @@}};
|
background-color: rgba({{@@ bg_rgb @@}}, .9);
|
||||||
{%@@ if bar_pos == "top" @@%}
|
{%@@ if bar_pos == "top" @@%}
|
||||||
border-bottom:
|
border-bottom:
|
||||||
{%@@ else @@%}
|
{%@@ else @@%}
|
||||||
|
@ -19,13 +24,15 @@ window#waybar {
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar.solo {
|
window#waybar.solo {
|
||||||
opacity: 1;
|
|
||||||
background-color: {{@@ color.bg @@}};
|
background-color: {{@@ color.bg @@}};
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar.empty {
|
window#waybar.empty {
|
||||||
opacity: .5;
|
{%@@ if color.type == "dark" @@%}
|
||||||
background-color: {{@@ color.bg @@}};
|
background-color: transparent;
|
||||||
|
{%@@ else @@%}
|
||||||
|
background-color: rgba({{@@ bg_rgb @@}}, 0.3);
|
||||||
|
{%@@ endif @@%}
|
||||||
border:none;
|
border:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
17
funcs.py
17
funcs.py
|
@ -14,3 +14,20 @@ def ordered_path():
|
||||||
newPATH.append(i)
|
newPATH.append(i)
|
||||||
|
|
||||||
return ':'.join(newPATH)
|
return ':'.join(newPATH)
|
||||||
|
|
||||||
|
|
||||||
|
def hex2rgb(e):
|
||||||
|
assert e.startswith("#")
|
||||||
|
e = e.strip("#").lower()
|
||||||
|
assert len(e) == 6
|
||||||
|
for i in e:
|
||||||
|
assert (i in "0123456789abcdef")
|
||||||
|
|
||||||
|
def h2r(i):
|
||||||
|
return str(eval('0x{}'.format(i)))
|
||||||
|
|
||||||
|
r = e[0:2]
|
||||||
|
g = e[2:4]
|
||||||
|
b = e[4:6]
|
||||||
|
|
||||||
|
return ", ".join([h2r(i) for i in (r, g, b)])
|
||||||
|
|
Reference in New Issue