mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 00:05:40 +02:00
Updated docs to comply with new map syntax
This commit is contained in:
parent
2b103b7acd
commit
4c4a20d835
9 changed files with 138 additions and 159 deletions
|
@ -46,73 +46,65 @@ bar:
|
|||
foreground: 000000ff
|
||||
deco: {stack: [background: {color: bc2b3fff}, <<: *std_underline]}
|
||||
- map: &i3_mode
|
||||
tag: mode
|
||||
default:
|
||||
- string:
|
||||
margin: 5
|
||||
text: "{mode}"
|
||||
deco: {background: {color: cc421dff}}
|
||||
- empty: {right-margin: 7}
|
||||
values:
|
||||
default: {empty: {}}
|
||||
conditions:
|
||||
mode == default: {empty: {}}
|
||||
content:
|
||||
"":
|
||||
map:
|
||||
tag: state
|
||||
values:
|
||||
focused: {string: {<<: [*default, *focused]}}
|
||||
unfocused: {string: {<<: *default}}
|
||||
invisible: {string: {<<: [*default, *invisible]}}
|
||||
urgent: {string: {<<: [*default, *urgent]}}
|
||||
conditions:
|
||||
state == focused: {string: {<<: [*default, *focused]}}
|
||||
state == unfocused: {string: {<<: *default}}
|
||||
state == invisible: {string: {<<: [*default, *invisible]}}
|
||||
state == urgent: {string: {<<: [*default, *urgent]}}
|
||||
main:
|
||||
map:
|
||||
tag: state
|
||||
values:
|
||||
focused: {string: {<<: [*main, *focused]}}
|
||||
unfocused: {string: {<<: *main}}
|
||||
invisible: {string: {<<: [*main, *invisible]}}
|
||||
urgent: {string: {<<: [*main, *urgent]}}
|
||||
conditions:
|
||||
state == focused: {string: {<<: [*main, *focused]}}
|
||||
state == unfocused: {string: {<<: *main}}
|
||||
state == invisible: {string: {<<: [*main, *invisible]}}
|
||||
state == urgent: {string: {<<: [*main, *urgent]}}
|
||||
surfing:
|
||||
map:
|
||||
tag: state
|
||||
values:
|
||||
focused: {string: {<<: [*surfing, *focused]}}
|
||||
unfocused: {string: {<<: *surfing}}
|
||||
invisible: {string: {<<: [*surfing, *invisible]}}
|
||||
urgent: {string: {<<: [*surfing, *urgent]}}
|
||||
conditions:
|
||||
state == focused: {string: {<<: [*surfing, *focused]}}
|
||||
state == unfocused: {string: {<<: *surfing}}
|
||||
state == invisible: {string: {<<: [*surfing, *invisible]}}
|
||||
state == urgent: {string: {<<: [*surfing, *urgent]}}
|
||||
misc:
|
||||
map:
|
||||
tag: state
|
||||
values:
|
||||
focused: {string: {<<: [*misc, *focused]}}
|
||||
unfocused: {string: {<<: *misc}}
|
||||
invisible: {string: {<<: [*misc, *invisible]}}
|
||||
urgent: {string: {<<: [*misc, *urgent]}}
|
||||
conditions:
|
||||
state == focused: {string: {<<: [*misc, *focused]}}
|
||||
state == unfocused: {string: {<<: *misc}}
|
||||
state == invisible: {string: {<<: [*misc, *invisible]}}
|
||||
state == urgent: {string: {<<: [*misc, *urgent]}}
|
||||
|
||||
mail:
|
||||
map:
|
||||
tag: state
|
||||
values:
|
||||
focused: {string: {<<: [*mail, *focused]}}
|
||||
unfocused: {string: {<<: *mail}}
|
||||
invisible: {string: {<<: [*mail, *invisible]}}
|
||||
urgent: {string: {<<: [*mail, *urgent]}}
|
||||
conditions:
|
||||
state == focused: {string: {<<: [*mail, *focused]}}
|
||||
state == unfocused: {string: {<<: *mail}}
|
||||
state == invisible: {string: {<<: [*mail, *invisible]}}
|
||||
state == urgent: {string: {<<: [*mail, *urgent]}}
|
||||
music:
|
||||
map:
|
||||
tag: state
|
||||
values:
|
||||
focused: {string: {<<: [*music, *focused]}}
|
||||
unfocused: {string: {<<: *music}}
|
||||
invisible: {string: {<<: [*music, *invisible]}}
|
||||
urgent: {string: {<<: [*music, *urgent]}}
|
||||
conditions:
|
||||
state == focused: {string: {<<: [*music, *focused]}}
|
||||
state == unfocused: {string: {<<: *music}}
|
||||
state == invisible: {string: {<<: [*music, *invisible]}}
|
||||
state == urgent: {string: {<<: [*music, *urgent]}}
|
||||
|
||||
- foreign-toplevel:
|
||||
content:
|
||||
map:
|
||||
tag: activated
|
||||
values:
|
||||
false: {empty: {}}
|
||||
true:
|
||||
conditions:
|
||||
~activated: {empty: {}}
|
||||
activated:
|
||||
- string: {text: "{app-id}", foreground: ffa0a0ff}
|
||||
- string: {text: ": {title}"}
|
||||
center:
|
||||
|
@ -123,32 +115,28 @@ bar:
|
|||
spacing: 0
|
||||
items:
|
||||
- map:
|
||||
tag: state
|
||||
values:
|
||||
playing: {string: {text: "{artist}"}}
|
||||
paused: {string: {text: "{artist}", foreground: ffffff66}}
|
||||
conditions:
|
||||
state == playing: {string: {text: "{artist}"}}
|
||||
state == paused: {string: {text: "{artist}", foreground: ffffff66}}
|
||||
- string: {text: " | ", foreground: ffffff66}
|
||||
- map:
|
||||
tag: state
|
||||
values:
|
||||
playing: {string: {text: "{album}"}}
|
||||
paused: {string: {text: "{album}", foreground: ffffff66}}
|
||||
conditions:
|
||||
state == playing: {string: {text: "{album}"}}
|
||||
state == paused: {string: {text: "{album}", foreground: ffffff66}}
|
||||
- string: {text: " | ", foreground: ffffff66}
|
||||
- map:
|
||||
tag: state
|
||||
values:
|
||||
playing: {string: {text: "{title}", foreground: ffa0a0ff}}
|
||||
paused: {string: {text: "{title}", foreground: ffffff66}}
|
||||
conditions:
|
||||
state == playing: {string: {text: "{title}", foreground: ffa0a0ff}}
|
||||
state == paused: {string: {text: "{title}", foreground: ffffff66}}
|
||||
|
||||
content:
|
||||
map:
|
||||
margin: 10
|
||||
tag: state
|
||||
values:
|
||||
offline: {string: {text: offline, foreground: ff0000ff}}
|
||||
stopped: {string: {text: stopped}}
|
||||
paused: {list: *artist_album_title}
|
||||
playing: {list: *artist_album_title}
|
||||
conditions:
|
||||
state == offline: {string: {text: offline, foreground: ff0000ff}}
|
||||
state == stopped: {string: {text: stopped}}
|
||||
state == paused: {list: *artist_album_title}
|
||||
state == playing: {list: *artist_album_title}
|
||||
|
||||
right:
|
||||
- removables:
|
||||
|
@ -158,24 +146,21 @@ bar:
|
|||
spacing: 5
|
||||
content:
|
||||
map:
|
||||
tag: mounted
|
||||
values:
|
||||
false:
|
||||
conditions:
|
||||
~mounted:
|
||||
map:
|
||||
tag: optical
|
||||
on-click: udisksctl mount -b {device}
|
||||
values:
|
||||
false: [{string: *drive}, {string: {text: "{label}"}}]
|
||||
true: [{string: *optical}, {string: {text: "{label}"}}]
|
||||
true:
|
||||
conditions:
|
||||
~optical: [{string: *drive}, {string: {text: "{label}"}}]
|
||||
optical: [{string: *optical}, {string: {text: "{label}"}}]
|
||||
mounted:
|
||||
map:
|
||||
tag: optical
|
||||
on-click: udisksctl unmount -b {device}
|
||||
values:
|
||||
false:
|
||||
conditions:
|
||||
~optical:
|
||||
- string: {<<: *drive, deco: *std_underline}
|
||||
- string: {text: "{label}"}
|
||||
true:
|
||||
optical:
|
||||
- string: {<<: *optical, deco: *std_underline}
|
||||
- string: {text: "{label}"}
|
||||
- sway-xkb:
|
||||
|
@ -187,36 +172,31 @@ bar:
|
|||
name: enp1s0
|
||||
content:
|
||||
map:
|
||||
tag: carrier
|
||||
values:
|
||||
false: {empty: {}}
|
||||
true:
|
||||
conditions:
|
||||
~carrier: {empty: {}}
|
||||
carrier:
|
||||
map:
|
||||
tag: state
|
||||
default: {string: {text: , font: *awesome, foreground: ffffff66}}
|
||||
values:
|
||||
up:
|
||||
conditions:
|
||||
state == up:
|
||||
map:
|
||||
tag: ipv4
|
||||
default: {string: {text: , font: *awesome}}
|
||||
values:
|
||||
"": {string: {text: , font: *awesome, foreground: ffffff66}}
|
||||
conditions:
|
||||
ipv4 == "": {string: {text: , font: *awesome, foreground: ffffff66}}
|
||||
- network:
|
||||
name: wlp2s0
|
||||
content:
|
||||
map:
|
||||
tag: state
|
||||
default: {string: {text: , font: *awesome, foreground: ffffff66}}
|
||||
values:
|
||||
down: {string: {text: , font: *awesome, foreground: ff0000ff}}
|
||||
up:
|
||||
conditions:
|
||||
state == down: {string: {text: , font: *awesome, foreground: ff0000ff}}
|
||||
state == up:
|
||||
map:
|
||||
tag: ipv4
|
||||
default:
|
||||
- string: {text: , font: *awesome}
|
||||
- string: {text: "{ssid}"}
|
||||
values:
|
||||
"":
|
||||
conditions:
|
||||
ipv4 == "":
|
||||
- string: {text: , font: *awesome, foreground: ffffff66}
|
||||
- string: {text: "{ssid}", foreground: ffffff66}
|
||||
- alsa:
|
||||
|
@ -224,16 +204,14 @@ bar:
|
|||
mixer: Master
|
||||
content:
|
||||
map:
|
||||
tag: online
|
||||
values:
|
||||
false: {string: {text: , font: *awesome, foreground: ff0000ff}}
|
||||
true:
|
||||
conditions:
|
||||
~online: {string: {text: , font: *awesome, foreground: ff0000ff}}
|
||||
online:
|
||||
map:
|
||||
on-click: /bin/sh -c "amixer -q sset Speaker unmute && amixer -q sset Headphone unmute && amixer -q sset Master toggle"
|
||||
tag: muted
|
||||
values:
|
||||
true: {string: {text: , font: *awesome, foreground: ffffff66}}
|
||||
false:
|
||||
conditions:
|
||||
muted: {string: {text: , font: *awesome, foreground: ffffff66}}
|
||||
~muted:
|
||||
ramp:
|
||||
tag: volume
|
||||
items:
|
||||
|
@ -266,19 +244,18 @@ bar:
|
|||
- string: {text: "{capacity}% {estimate}"}
|
||||
content:
|
||||
map:
|
||||
tag: state
|
||||
values:
|
||||
unknown:
|
||||
conditions:
|
||||
state == unknown:
|
||||
<<: *discharging
|
||||
discharging:
|
||||
state == discharging:
|
||||
<<: *discharging
|
||||
charging:
|
||||
state == charging:
|
||||
- string: {text: , foreground: 00ff00ff, font: *awesome}
|
||||
- string: {text: "{capacity}% {estimate}"}
|
||||
full:
|
||||
state == full:
|
||||
- string: {text: , foreground: 00ff00ff, font: *awesome}
|
||||
- string: {text: "{capacity}% full"}
|
||||
not charging:
|
||||
state == not charging:
|
||||
- ramp:
|
||||
tag: capacity
|
||||
items:
|
||||
|
|
|
@ -16,16 +16,15 @@ bar:
|
|||
- base: &river_base
|
||||
left-margin: 10
|
||||
right-margin: 13
|
||||
tag: id
|
||||
default: {string: {text: , font: *hack}}
|
||||
values:
|
||||
1: {string: {text: ﳐ, font: *hack}}
|
||||
2: {string: {text: , font: *hack}}
|
||||
3: {string: {text: , font: *hack}}
|
||||
4: {string: {text: , font: *hack}}
|
||||
5: {string: {text: , font: *hack}}
|
||||
10: {string: {text: "scratchpad", font: *hack}}
|
||||
11: {string: {text: "work", font: *hack}}
|
||||
conditions:
|
||||
id == 1: {string: {text: ﳐ, font: *hack}}
|
||||
id == 2: {string: {text: , font: *hack}}
|
||||
id == 3: {string: {text: , font: *hack}}
|
||||
id == 4: {string: {text: , font: *hack}}
|
||||
id == 5: {string: {text: , font: *hack}}
|
||||
id == 10: {string: {text: "scratchpad", font: *hack}}
|
||||
id == 11: {string: {text: "work", font: *hack}}
|
||||
|
||||
content:
|
||||
map:
|
||||
|
@ -33,28 +32,25 @@ bar:
|
|||
left: sh -c "riverctl set-focused-tags $((1 << ({id} - 1)))"
|
||||
right: sh -c "riverctl toggle-focused-tags $((1 << ({id} -1)))"
|
||||
middle: sh -c "riverctl toggle-view-tags $((1 << ({id} -1)))"
|
||||
tag: state
|
||||
values:
|
||||
urgent:
|
||||
conditions:
|
||||
state == urgent:
|
||||
map:
|
||||
<<: *river_base
|
||||
deco: {background: {color: D08770ff}}
|
||||
focused:
|
||||
state == focused:
|
||||
map:
|
||||
<<: *river_base
|
||||
deco: *bg_default
|
||||
visible:
|
||||
state == visible:
|
||||
map:
|
||||
tag: occupied
|
||||
values:
|
||||
false: {map: {<<: *river_base}}
|
||||
true: {map: {<<: *river_base, deco: *bg_default}}
|
||||
unfocused:
|
||||
conditions:
|
||||
~occupied: {map: {<<: *river_base}}
|
||||
occupied: {map: {<<: *river_base, deco: *bg_default}}
|
||||
state == unfocused:
|
||||
map:
|
||||
<<: *river_base
|
||||
invisible:
|
||||
state == invisible:
|
||||
map:
|
||||
tag: occupied
|
||||
values:
|
||||
false: {empty: {}}
|
||||
true: {map: {<<: *river_base, deco: {underline: {size: 3, color: ea6962ff}}}}
|
||||
conditions:
|
||||
~occupied: {empty: {}}
|
||||
occupied: {map: {<<: *river_base, deco: {underline: {size: 3, color: ea6962ff}}}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue