From ac52ab8dc19a225f1721d5aa22fcac9e10438b0e Mon Sep 17 00:00:00 2001 From: Frieder Schlesier Date: Wed, 5 Jun 2024 22:20:51 +0200 Subject: [PATCH] sway: load hostname specific waybar --- .config/sway/config | 2 +- .config/waybar/fedora.fritz.box.config | 113 ++++++++++++++++++++++++ .config/waybar/{config => tower.config} | 2 +- 3 files changed, 115 insertions(+), 2 deletions(-) create mode 100644 .config/waybar/fedora.fritz.box.config rename .config/waybar/{config => tower.config} (97%) diff --git a/.config/sway/config b/.config/sway/config index 4904711..d12f3d0 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -219,7 +219,7 @@ bindsym Ctrl+Shift+L exec $lock for_window [title=".* - mpv$"] floating enable, sticky enable # Autostart applications -exec waybar +exec waybar --config ~/.config/waybar/$(hostname).config exec mako --border-radius=2 --font="Iosevka ss08 10" --max-visible=5 --outer-margin=5 --margin=3 --background="#1c1f26" --border-color="#89AAEB" --border-size=1 --default-timeout=7000 exec nm-applet --indicator exec udiskie -t diff --git a/.config/waybar/fedora.fritz.box.config b/.config/waybar/fedora.fritz.box.config new file mode 100644 index 0000000..4043445 --- /dev/null +++ b/.config/waybar/fedora.fritz.box.config @@ -0,0 +1,113 @@ +{ + "layer": "bottom", + "position": "bottom", + "height": 24, + + // maybe take another look at e.g. https://gitlab.com/wef/dotfiles/-/blob/master/.config/waybar/config + // https://github.com/Alexays/Waybar/wiki/Configuration + // https://github.com/Alexays/Waybar/wiki/Examples + + "modules-left": ["sway/workspaces", "sway/mode", "sway/window" ], + "modules-center": [ "custom/disk_root", "network"], + "modules-right": [ "custom/mail", "battery", "tray", "clock" ], + "sway/mode": { + "format": " {}" + }, + "sway/workspaces": { + "format": "{name}", + "disable-scroll": true + }, + "clock": { + "format": "{:%b %d %H:%M KW%U}", + "tooltip": false + }, + "battery": { + "format": " {time} {icon}", + "format-alt": "{capacity}% {icon}", + "format-icons": ["", "", "", "", ""], + "format-charging": "{capacity}% ", + "interval": 30, + "states": { + "warning": 25, + "critical": 10 + }, + "tooltip": false + }, + "custom/disk_home": { + "format": "🏠 {} ", + "interval": 30, + "exec": "df -h --output=avail $HOME | tail -1 | tr -d ' '", + "tooltip": true , + "tooltip-format": "{path} ({percentage_used}% of {total})" + }, + "custom/disk_root": { + "format": "💽/{} ", + "interval": 30, + "exec": "df -h --output=avail / | tail -1 | tr -d ' '", + "tooltip": true , + "tooltip-format": "{path} ({percentage_used}% of {total})" + }, + + "custom/disk_store": { + "format": "store💽{} ", + "interval": 30, + "exec": "df -h --output=avail /media/store | tail -1 | tr -d ' '" + }, + "custom/disk_docs": { + "format": "docs💽{} ", + "interval": 30, + "exec": "df -h --output=avail /media/docs | tail -1 | tr -d ' '" + }, + "temperature": { + // "thermal-zone": 2, + // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "critical-threshold": 80, + // "format-critical": "{temperatureC}°C {icon}", + "format": "{icon} {temperatureC}°C", + "format-icons": ["", "", ""] + }, + "cpu": { + "format": "🏭 {usage}%", + "tooltip": false + }, + "memory": { + "format": "💾 {used:0.1f}G" + }, + "custom/mail": { + "format": "📩{}", + "interval": 30, + "exec": "notmuch count tag:flagged OR tag:inbox AND NOT tag:killed" + }, + "network": { + // "family": "ipv6", + "format-wifi": " {essid} {frequency} {signaldBm} dB {bandwidthUpBits}/{bandwidthDownBits}", + "format-ethernet": "{ifname}: {ipaddr}/{cidr} ", + "format-linked": "{ifname} (No IP) ", + "format-disconnected": "Disconnected ⚠", + "format-alt": "{ifname}: {ipaddr}/{cidr}", + "interval": 5 + }, + //"timer": { + // "interval": 1, + // "exec": "~/.config/waybar/timer.sh", + // "exec-if": "pgrep emacs", + // "escape": true + //}, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + }, + "tooltip": false + }, + "tray": { + "icon-size": 20, + "show-passive-items": true + }, + "cpu": { + "interval": 2, + "format": "{icon0}{icon1}{icon2}{icon3}{icon4}{icon5}{icon6}{icon7}", + "format-icons": ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"], + }, +} diff --git a/.config/waybar/config b/.config/waybar/tower.config similarity index 97% rename from .config/waybar/config rename to .config/waybar/tower.config index bd23221..757084e 100644 --- a/.config/waybar/config +++ b/.config/waybar/tower.config @@ -9,7 +9,7 @@ "modules-left": ["sway/workspaces", "sway/mode", "sway/window" ], "modules-center": [ "custom/disk_root", "custom/disk_docs", "custom/disk_store", "network"], - "modules-right": [ "custom/mail", "memory", "tray", "clock" ], + "modules-right": [ "custom/mail", "battery", "memory", "tray", "clock" ], "sway/mode": { "format": " {}" },