mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-20 03:35:41 +02:00
network: use dynlist instead of fixed name
Closes #271 Closes #265 Closes #71
This commit is contained in:
parent
4e07b63cef
commit
c44c66c83f
4 changed files with 504 additions and 421 deletions
|
@ -27,6 +27,10 @@
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
* log-level: default to `warning`
|
* log-level: default to `warning`
|
||||||
|
* network: use dynlist instead of fixed name ([#355][355])
|
||||||
|
|
||||||
|
[355]: https://codeberg.org/dnkl/yambar/pulls/355
|
||||||
|
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
### Removed
|
### Removed
|
||||||
|
|
|
@ -6,11 +6,12 @@ network - This module monitors network connection state
|
||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
|
|
||||||
This module monitors network connection state; disconnected/connected
|
This module monitors network connection state; disconnected/connected
|
||||||
state and MAC/IP addresses.
|
state and MAC/IP addresses. It instantiates the provided _content_
|
||||||
|
particle for each network interface.
|
||||||
|
|
||||||
Note: while the module internally tracks all assigned IPv4/IPv6
|
Note: while the module internally tracks all assigned IPv4/IPv6
|
||||||
addresses, it currently exposes only a single IPv4 and a single IPv6
|
addresses, it currently exposes only a single IPv4 and a single IPv6
|
||||||
address.
|
address per network interface.
|
||||||
|
|
||||||
# TAGS
|
# TAGS
|
||||||
|
|
||||||
|
@ -68,10 +69,18 @@ address.
|
||||||
:[ *Type*
|
:[ *Type*
|
||||||
:[ *Req*
|
:[ *Req*
|
||||||
:< *Description*
|
:< *Description*
|
||||||
| name
|
| left-spacing
|
||||||
: string
|
: int
|
||||||
: yes
|
: no
|
||||||
: Name of network interface to monitor
|
: Space, in pixels, in the left side of each rendered volume
|
||||||
|
| right-spacing
|
||||||
|
: int
|
||||||
|
: no
|
||||||
|
: Space, in pixels, on the right side of each rendered volume
|
||||||
|
| spacing
|
||||||
|
: int
|
||||||
|
: no
|
||||||
|
: Short-hand for setting both _left-spacing_ and _right-spacing_
|
||||||
| poll-interval
|
| poll-interval
|
||||||
: int
|
: int
|
||||||
: no
|
: no
|
||||||
|
@ -86,9 +95,13 @@ address.
|
||||||
bar:
|
bar:
|
||||||
left:
|
left:
|
||||||
- network:
|
- network:
|
||||||
name: wlp3s0
|
|
||||||
content:
|
content:
|
||||||
string: {text: "{name}: {state} ({ipv4})"}
|
map:
|
||||||
|
default:
|
||||||
|
string: {text: "{name}: {state} ({ipv4})"}
|
||||||
|
conditions:
|
||||||
|
ipv4 == "":
|
||||||
|
string: {text: "{name}: {state}"}
|
||||||
```
|
```
|
||||||
|
|
||||||
# SEE ALSO
|
# SEE ALSO
|
||||||
|
|
|
@ -169,34 +169,39 @@ bar:
|
||||||
- string: {text: , font: *awesome}
|
- string: {text: , font: *awesome}
|
||||||
- string: {text: "{layout}"}
|
- string: {text: "{layout}"}
|
||||||
- network:
|
- network:
|
||||||
name: enp1s0
|
|
||||||
content:
|
content:
|
||||||
map:
|
map:
|
||||||
|
default: {empty: {}}
|
||||||
conditions:
|
conditions:
|
||||||
~carrier: {empty: {}}
|
name == enp1s0:
|
||||||
carrier:
|
conditions:
|
||||||
map:
|
~carrier: {empty: {}}
|
||||||
default: {string: {text: , font: *awesome, foreground: ffffff66}}
|
carrier:
|
||||||
conditions:
|
map:
|
||||||
state == up && ipv4 != "": {string: {text: , font: *awesome}}
|
default: {string: {text: , font: *awesome, foreground: ffffff66}}
|
||||||
|
conditions:
|
||||||
|
state == up && ipv4 != "": {string: {text: , font: *awesome}}
|
||||||
- network:
|
- network:
|
||||||
name: wlp2s0
|
|
||||||
poll-interval: 1000
|
poll-interval: 1000
|
||||||
content:
|
content:
|
||||||
map:
|
map:
|
||||||
default: {string: {text: , font: *awesome, foreground: ffffff66}}
|
default: {empty: {}}
|
||||||
conditions:
|
conditions:
|
||||||
state == down: {string: {text: , font: *awesome, foreground: ff0000ff}}
|
name == wlp2s0:
|
||||||
state == up:
|
|
||||||
map:
|
map:
|
||||||
default:
|
default: {string: {text: , font: *awesome, foreground: ffffff66}}
|
||||||
- string: {text: , font: *awesome}
|
|
||||||
- string: {text: "{ssid} {dl-speed:mb}/{ul-speed:mb} Mb/s"}
|
|
||||||
|
|
||||||
conditions:
|
conditions:
|
||||||
ipv4 == "":
|
state == down: {string: {text: , font: *awesome, foreground: ff0000ff}}
|
||||||
- string: {text: , font: *awesome, foreground: ffffff66}
|
state == up:
|
||||||
- string: {text: "{ssid} {dl-speed:mb}/{ul-speed:mb} Mb/s", foreground: ffffff66}
|
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:
|
- alsa:
|
||||||
card: hw:PCH
|
card: hw:PCH
|
||||||
mixer: Master
|
mixer: Master
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue