diff options
author | ene <ene@sils.li> | 2023-03-03 18:48:30 +0100 |
---|---|---|
committer | ene <ene@sils.li> | 2023-03-03 18:48:30 +0100 |
commit | 3c145b9441e4d2cfd8eeee2c029e2fab7a8f0704 (patch) | |
tree | f18c708c329ef095e8e6688d2f9e70197f7d8add | |
parent | Fix(system): Switch to dvorak-programmer layout (diff) | |
download | nixos-config-3c145b9441e4d2cfd8eeee2c029e2fab7a8f0704.tar.gz nixos-config-3c145b9441e4d2cfd8eeee2c029e2fab7a8f0704.zip |
Fix(hm/yambar): Update Config
-rw-r--r-- | home-manager/config/yambar/config/config.yml | 87 | ||||
-rw-r--r-- | home-manager/config/yambar/default.nix | 2 |
2 files changed, 41 insertions, 48 deletions
diff --git a/home-manager/config/yambar/config/config.yml b/home-manager/config/yambar/config/config.yml index 173e93a4..f9b044c0 100644 --- a/home-manager/config/yambar/config/config.yml +++ b/home-manager/config/yambar/config/config.yml @@ -71,38 +71,34 @@ bar: - string: &focused { string: { <<: *name, deco: {stack: [background: {color: *bgtag}, <<: *line]}, margin: 10 } } - string: &unfocused { string: { <<: *name, deco: {background: {color: *bgtag2}}, margin: 10 } } - base: &river_base - tag: state default: *normal - values: - focused: *focused - unfocused: *unfocused - urgent: *urgent - invisible: + conditions: + state == focused: *focused + state == unfocused: *unfocused + state == urgent: *urgent + state == invisible: map: - tag: occupied - values: - true: *occupied - false: *normal + conditions: + occupied: *occupied + ~occupied: *normal content: map: on-click: 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: id - values: - 1: { map: { <<: *river_base } } - 2: { map: { <<: *river_base } } - 3: { map: { <<: *river_base } } - 4: { map: { <<: *river_base } } - 5: { map: { <<: *river_base } } - 6: { map: { <<: *river_base } } - 7: { map: { <<: *river_base } } - 8: { map: { <<: *river_base } } - 9: { map: { <<: *river_base } } + conditions: + id == 1: { map: { <<: *river_base } } + id == 2: { map: { <<: *river_base } } + id == 3: { map: { <<: *river_base } } + id == 4: { map: { <<: *river_base } } + id == 5: { map: { <<: *river_base } } + id == 6: { map: { <<: *river_base } } + id == 7: { map: { <<: *river_base } } + id == 8: { map: { <<: *river_base } } + id == 9: { map: { <<: *river_base } } title: map: - tag: title default: { string: @@ -110,11 +106,12 @@ bar: text: "{title}", left-margin: 12, right-margin: 12, - #max: 35, + # max: 35, deco: *linetitle }, } - values: { "": { string: { text: "" } } } + conditions: + title == "": { string: { text: "" } } ### Center, clock & weather gadget center: @@ -135,34 +132,31 @@ bar: content: map: on-click: /bin/sh -c "nmtui" - tag: carrier - values: - false: {empty: {}} - true: + conditions: + ~carrier: {empty: {}} + carrier: string: {text: " {ssid} ", deco: *combutil} - network: name: enp4s0 content: map: on-click: /bin/sh -c "nmtui" - tag: carrier - values: - false: + conditions: + ~carrier: string: {text: " Eth failed ", deco: *combutil} - true: {empty: {}} + carrier: {empty: {}} - script: # Sound volume path: /home/dt/.config/yambar/scripts/amixer-monitor content: map: on-click: /bin/sh -c "pavucontrol" - tag: muted - values: - true: + conditions: + muted: string: text: " ﱝ " deco: *bgcurg - false: + ~muted: string: {text: " {volume}% ", deco: *combutil} - script: # Grade average path: /home/dt/.config/yambar/scripts/grades-average @@ -184,17 +178,16 @@ bar: - script: # Memory info path: /home/dt/.config/yambar/scripts/meminfo content: - map: - tag: swapstate - values: - true: - string: - text: " {memperc}%({swapperc}%) " - deco: *combmem - false: - string: - text: " {memperc}% " - deco: *combmem + map: + conditions: + swapstate: + string: + text: " {memperc}%({swapperc}%) " + deco: *combmem + ~swapstate: + string: + text: " {memperc}% " + deco: *combmem - script: # Disk space path: /home/dt/.config/yambar/scripts/dfspace content: diff --git a/home-manager/config/yambar/default.nix b/home-manager/config/yambar/default.nix index 7a2e6fe9..e288d8ef 100644 --- a/home-manager/config/yambar/default.nix +++ b/home-manager/config/yambar/default.nix @@ -3,7 +3,7 @@ pkgs, ... }: { - xdg.configFile."yambar/config.yaml".source = ./config/config.yml; + xdg.configFile."yambar/config.yml".source = ./config/config.yml; xdg.configFile."yambar/scripts".source = ./scripts; } # vim: ts=2 |