[yambar] Update map syntax to post-1.8.0
I'm using yambar from the master branch now, the map syntax was changed.
This commit is contained in:
parent
9785790d3e
commit
e8e8593b2b
1 changed files with 42 additions and 34 deletions
|
@ -260,17 +260,16 @@ bar:
|
|||
path: /home/midgard/.config/yambar/temp.sh
|
||||
content:
|
||||
map:
|
||||
tag: status
|
||||
default:
|
||||
- string: &str_temp {text: "{temp}°C", font: "Fira Mono:size=12", right-margin: 5}
|
||||
- string: &str_rpm {text: "{rpm} RPM", font: "Fira Sans:size=12", foreground: *col_fg_alt}
|
||||
values:
|
||||
normal:
|
||||
conditions:
|
||||
status == normal:
|
||||
empty: {}
|
||||
caution:
|
||||
status == caution:
|
||||
- string: {<<: *str_temp, foreground: *col_fg_caution}
|
||||
- string: {<<: *str_rpm}
|
||||
alert:
|
||||
status == alert:
|
||||
- string: {<<: *str_temp, foreground: *col_fg_alert}
|
||||
- string: {<<: *str_rpm}
|
||||
|
||||
|
@ -281,7 +280,6 @@ bar:
|
|||
path: /home/midgard/.config/yambar/clock.py
|
||||
content:
|
||||
map:
|
||||
tag: time_of_day
|
||||
default:
|
||||
list:
|
||||
spacing: 0
|
||||
|
@ -302,12 +300,16 @@ bar:
|
|||
- string:
|
||||
text: " {date}"
|
||||
font: Fira Sans:size=12
|
||||
values:
|
||||
night: {list: {foreground: "888888ff", items: *clock_contents}}
|
||||
morning: {list: {foreground: "ddbb99ff", items: *clock_contents}}
|
||||
noon: {list: {foreground: "ddddbbff", items: *clock_contents}}
|
||||
afternoon: {list: {foreground: "ddddddff", items: *clock_contents}}
|
||||
evening: {list: {foreground: "dd99bbff", items: *clock_contents}}
|
||||
conditions:
|
||||
time_of_day == night: {list: {foreground: "888888ff", items: *clock_contents}}
|
||||
#time_of_day == morning: {list: {foreground: "ddbb99ff", items: *clock_contents}}
|
||||
time_of_day == morning: {list: {foreground: "e2d39aff", items: *clock_contents}}
|
||||
#time_of_day == noon: {list: {foreground: "ddddbbff", items: *clock_contents}}
|
||||
time_of_day == noon: {list: {foreground: "dec7aaff", items: *clock_contents}}
|
||||
#time_of_day == afternoon: {list: {foreground: "ddddddff", items: *clock_contents}}
|
||||
time_of_day == afternoon: {list: {foreground: "deceb9ff", items: *clock_contents}}
|
||||
#time_of_day == evening: {list: {foreground: "dd99bbff", items: *clock_contents}}
|
||||
time_of_day == evening: {list: {foreground: "ff948dff", items: *clock_contents}}
|
||||
|
||||
|
||||
right:
|
||||
|
@ -317,7 +319,6 @@ bar:
|
|||
font: Material Icons:pixelsize=15
|
||||
content:
|
||||
- map:
|
||||
tag: muted
|
||||
default:
|
||||
ramp:
|
||||
tag: volume
|
||||
|
@ -325,18 +326,17 @@ bar:
|
|||
- string: {text: ""}
|
||||
- string: {text: ""}
|
||||
- string: {text: ""}
|
||||
values:
|
||||
true: {string: {text: "", foreground: "777777ff"}}
|
||||
conditions:
|
||||
muted: {string: {text: "", foreground: "777777ff"}}
|
||||
|
||||
- mpd:
|
||||
host: /var/lib/mpd/socket
|
||||
content:
|
||||
map:
|
||||
foreground: *col_fg_alt
|
||||
tag: state
|
||||
default: {empty: {}}
|
||||
values:
|
||||
playing:
|
||||
conditions:
|
||||
state == playing:
|
||||
- string: {text: "", font: *font_material}
|
||||
- list: &mpd
|
||||
items:
|
||||
|
@ -352,13 +352,24 @@ bar:
|
|||
#indicator: {string: {text: "╴", foreground: "eeeeeeff"}}
|
||||
- string:
|
||||
text: "{artist}"
|
||||
max: 13
|
||||
max: 15
|
||||
font: "Fira Sans:size=11"
|
||||
- map:
|
||||
default: {string: {text: "–"}}
|
||||
conditions:
|
||||
artist == "": {empty: {}}
|
||||
- string:
|
||||
text: "– {title}"
|
||||
max: 22
|
||||
text: "{title}"
|
||||
max: 20
|
||||
font: "Fira Sans:size=11"
|
||||
#paused:
|
||||
- map:
|
||||
default: {empty: {}}
|
||||
conditions:
|
||||
title == "":
|
||||
string:
|
||||
text: "{file}"
|
||||
max: 20
|
||||
#state == paused:
|
||||
#- string: {text: "", font: *font_material}
|
||||
#- list: *mpd
|
||||
|
||||
|
@ -367,12 +378,11 @@ bar:
|
|||
content:
|
||||
map:
|
||||
font: *font_supplements
|
||||
tag: state
|
||||
default: {string: {foreground: *col_fg_alt, text: "{state}"}}
|
||||
values:
|
||||
"down": {string: {foreground: *col_fg_alt, text: ""}}
|
||||
"dormant": {string: {text: ""}}
|
||||
"up":
|
||||
conditions:
|
||||
state == down: {string: {foreground: *col_fg_alt, text: ""}}
|
||||
state == dormant: {string: {text: ""}}
|
||||
state == up:
|
||||
list:
|
||||
spacing: 0
|
||||
items:
|
||||
|
@ -390,10 +400,9 @@ bar:
|
|||
content:
|
||||
map:
|
||||
font: *font_material
|
||||
tag: state
|
||||
default: {empty: {}}
|
||||
values:
|
||||
"up":
|
||||
conditions:
|
||||
state == up:
|
||||
string: {text: ""}
|
||||
|
||||
- battery:
|
||||
|
@ -401,17 +410,16 @@ bar:
|
|||
content:
|
||||
map:
|
||||
font: *font_supplements
|
||||
tag: state
|
||||
default:
|
||||
ramp:
|
||||
tag: capacity
|
||||
items: *battery_range
|
||||
values:
|
||||
"charging":
|
||||
conditions:
|
||||
state == charging:
|
||||
ramp:
|
||||
tag: capacity
|
||||
items: *battery_range_charging
|
||||
"not charging":
|
||||
state == not charging:
|
||||
- ramp:
|
||||
tag: capacity
|
||||
items: *battery_range_charging
|
||||
|
|
Loading…
Reference in a new issue