From 73f8d0639e758d2063daf54a1a7d377c9b201d36 Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Wed, 19 Jul 2023 02:44:56 -0400 Subject: [PATCH] Update yambar for 2nd display and replace waybar --- dot_config/river/executable_init.tmpl | 6 +-- dot_config/yambar/bar2.yml.tmpl | 64 +++++++++++++++++++++++++-- dot_config/yambar/config.yml.tmpl | 2 +- 3 files changed, 64 insertions(+), 8 deletions(-) diff --git a/dot_config/river/executable_init.tmpl b/dot_config/river/executable_init.tmpl index d611e78..56161fd 100644 --- a/dot_config/river/executable_init.tmpl +++ b/dot_config/river/executable_init.tmpl @@ -224,15 +224,13 @@ gnome-keyring-daemon --start --components=ssh & kanshi & pipewire-launcher & swayidle-launcher & +yambar-launcher & dunst & gammastep -r & {{- if eq .chezmoi.hostname "hydrus" }} -waybar-launcher & river-tag-overlay & -blueman-applet & swaybg -m fill -i "${HOME}/Pictures/Wallpapers/dark-forest-path.jpg" & {{- else if eq .chezmoi.hostname "helix" }} -yambar-launcher & swaybg -m center -i "${HOME}/Pictures/Wallpapers/Mountain Retreat.jpg" & {{- end }} -sleep 10 && nextcloud --background & +nextcloud --background & diff --git a/dot_config/yambar/bar2.yml.tmpl b/dot_config/yambar/bar2.yml.tmpl index 4250e7c..89456e6 100644 --- a/dot_config/yambar/bar2.yml.tmpl +++ b/dot_config/yambar/bar2.yml.tmpl @@ -34,14 +34,14 @@ separator: &separator {string: {text: " ", font: *hack, foreground: *light_grey bar: {{- if eq .chezmoi.hostname "helix" }} height: 64 - location: top + location: bottom {{- else if eq .chezmoi.hostname "hydrus" }} monitor: DP-2 height: 28 location: bottom {{- else }} height: 36 - location: top + location: bottom {{- end }} layer: top spacing: 2 @@ -156,7 +156,7 @@ bar: foreground: *light_grey id >= 10 && ~visible && ~occupied: {empty: {}} {{ end }} -center: + center: - foreign-toplevel: content: map: @@ -164,3 +164,61 @@ center: activated: - string: {text: "{app-id}: {title}"} ~activated: {empty: {}} + + right: +{{- if eq .chezmoi.hostname "hydrus" }} + - label: + content: *separator + - network: + name: wlan0 + poll-interval: 2000 + content: + map: + default: {string: {text: , font: *awesome}} + conditions: + state == down: {string: {text: , font: *awesome, foreground: *dark_grey}} + state == up: + map: + default: + - string: {text: , font: *awesome} + - string: {text: " {name}: {dl-speed:mb} mb/s down - {ul-speed:mb} mb/s up"} + conditions: + ipv4 == "": + - string: {text: , font: *awesome} + - string: {text: " {name}: {dl-speed:mb} mb/s down / {ul-speed:mb} mb/s up"} + - network: + name: eth0 + poll-interval: 2000 + content: + map: + conditions: + ~carrier: {empty: {}} + carrier: + map: + default: + - string: {text: , font: *awesome} + - string: {text: " {name}: {dl-speed:mb} mb/s down / {ul-speed:mb} mb/s up"} + conditions: + state == down: {string: {text: , font: *awesome}} + ipv4 == "": + - string: {text: , font: *awesome} + - string: {text: " {name}: {dl-speed:mb} mb/s down / {ul-speed:mb} mb/s up"} + - label: + content: *separator +{{- end }} + - cpu: + poll-interval: 2000 + content: + map: + conditions: + id == -1: + - string: {text: , font: *awesome} + - string: {text: " {cpu}%"} + - label: + content: *separator + - mem: + poll-interval: 5000 + content: + - string: {text: , font: *awesome} + - string: {text: " {used:mb} MiB ({percent_used}% Used)"} + diff --git a/dot_config/yambar/config.yml.tmpl b/dot_config/yambar/config.yml.tmpl index f4c2125..d4faa5b 100644 --- a/dot_config/yambar/config.yml.tmpl +++ b/dot_config/yambar/config.yml.tmpl @@ -271,7 +271,7 @@ bar: - label: content: *separator - clock: - date-format: "%Y-%m-%d" + date-format: "%b %d" time-format: "%R" content: - string: {text: , font: *awesome}