network: use dynlist instead of fixed name

Closes #271
Closes #265
Closes #71
This commit is contained in:
Sertonix 2024-02-07 14:33:52 +01:00 committed by Daniel Eklöf
parent 4e07b63cef
commit c44c66c83f
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 504 additions and 421 deletions

View file

@ -169,34 +169,39 @@ bar:
- string: {text: , font: *awesome}
- string: {text: "{layout}"}
- network:
name: enp1s0
content:
map:
default: {empty: {}}
conditions:
~carrier: {empty: {}}
carrier:
map:
default: {string: {text: , font: *awesome, foreground: ffffff66}}
conditions:
state == up && ipv4 != "": {string: {text: , font: *awesome}}
name == enp1s0:
conditions:
~carrier: {empty: {}}
carrier:
map:
default: {string: {text: , font: *awesome, foreground: ffffff66}}
conditions:
state == up && ipv4 != "": {string: {text: , font: *awesome}}
- network:
name: wlp2s0
poll-interval: 1000
content:
map:
default: {string: {text: , font: *awesome, foreground: ffffff66}}
default: {empty: {}}
conditions:
state == down: {string: {text: , font: *awesome, foreground: ff0000ff}}
state == up:
name == wlp2s0:
map:
default:
- string: {text: , font: *awesome}
- string: {text: "{ssid} {dl-speed:mb}/{ul-speed:mb} Mb/s"}
default: {string: {text: , font: *awesome, foreground: ffffff66}}
conditions:
ipv4 == "":
- string: {text: , font: *awesome, foreground: ffffff66}
- string: {text: "{ssid} {dl-speed:mb}/{ul-speed:mb} Mb/s", foreground: ffffff66}
state == down: {string: {text: , font: *awesome, foreground: ff0000ff}}
state == up:
map:
default:
- string: {text: , font: *awesome}
- string: {text: "{ssid} {dl-speed:mb}/{ul-speed:mb} Mb/s"}
conditions:
ipv4 == "":
- string: {text: , font: *awesome, foreground: ffffff66}
- string: {text: "{ssid} {dl-speed:mb}/{ul-speed:mb} Mb/s", foreground: ffffff66}
- alsa:
card: hw:PCH
mixer: Master