From 2e4dd96886a8f4352754fad5891e78a053fa6d2f Mon Sep 17 00:00:00 2001 From: Andre Ramnitz Date: Mon, 3 Feb 2025 06:39:41 +0100 Subject: [PATCH] waybar: initial support for two displays --- dot-config/waybar/config-dp2.jsonc | 397 +++++++++++++++++++++++++++++ dot-config/waybar/config.jsonc | 6 +- 2 files changed, 401 insertions(+), 2 deletions(-) create mode 100644 dot-config/waybar/config-dp2.jsonc diff --git a/dot-config/waybar/config-dp2.jsonc b/dot-config/waybar/config-dp2.jsonc new file mode 100644 index 00000000..19d51d39 --- /dev/null +++ b/dot-config/waybar/config-dp2.jsonc @@ -0,0 +1,397 @@ +{ + "layer": "top", + "position": "top", + "id": "right", + "output": "DP-2", + "width": "90%", + "height": 30, + "spacing": 1, + "modules-left": [ + "custom/voidspacer", + ], + "modules-center": [ + "hyprland/submap", + "hyprland/window" + ], + "modules-right": [ + "custom/voidspacer", + ], + "custom/launcher": { + "format": "󰀻", + "on-click": "killall fuzzel || fuzzel --config=$HOME/.config/fuzzel/fuzzel-startmenu.ini", + "on-click-right": "$HOME/.local/bin/reloadwb.sh", + "tooltip": false + }, + "hyprland/workspaces": { + "format": "{icon}", + "format-icons": { + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7", + "8": "8", + "9": "9", + "0": "0" + }, + "persistent-workspaces": { + "*": 6 + }, + "sort-by-number": true + }, + "hyprland/window": { + "format": "{title}", + "rewrite-default": "👉 {title}", + "rewrite": { + "(.*) – Mozilla Firefox": " $1", + "(.*) - qutebrowser": " $1", + "(.*) - Kakoune": " $1", + "(.*) - Dolphin": " $1", + "lfrun(.*)": "󰀶 $1", + "Now playing(.*)": " Now playing $1", + "Threema(.*)": "󰭺 $1" + }, + "on-click": "hyprctl dispatch pseudo", + "on-click-right": "~/.config/hypr/scripts/mousefocus_toggle.sh", + "separate-outputs": true + }, + "hyprland/submap": { + "format": " {} ", + "max-length": 10, + "tooltip": false + }, + "hyprland/language": { + "format": " 󰌌 {} ", + "format-en": "en", + "format-de": "de" + }, + "niri/workspaces": { + "format": "{icon}", + "format-icons": { + // Named workspaces + // (you need to configure them in niri) + "1": "", + "2": "", + "3": "", + + // Icons by state + "active": "", + "default": "" + }, + "niri/window": { + "format": "{}", + "rewrite": { + "(.*) - Mozilla Firefox": "🌎 $1", + "(.*) - zsh": "> [$1]" + } + }, + "niri/language": { + //"format": " 󰌌 {} ", + "format": " 󰌌 {} ", + "format-en": "en", + "format-de": "de" + } +}, + "keyboard-state": { + "numlock": true, + "capslock": true, + "format": "{icon} {name}", + "format-icons": { + "locked": " ", + "unlocked": " " + } + }, + "mpd": { + "format": "mpd: {stateIcon} {artist} - {album} - {title} ⸨{songPosition}|{queueLength}⸩ {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}", + "format-disconnected": "", + "format-paused": "", + "format-stopped": "", + "unknown-tag": "N/A", + "interval": 2, + "consume-icons": { + "on": " " + }, + "random-icons": { + "off": "", + "on": " " + }, + "repeat-icons": { + "on": " " + }, + "single-icons": { + "on": "1 " + }, + "state-icons": { + "paused": "", + "playing": "" + }, + "tooltip-format": "{artist} - {album} - {title} | {volume}%", + "tooltip-format-disconnected": "mpd disconnected!", + "on-click": "mpc toggle", + "on-click-backward": "mpc stop && playerctld unshift", + "on-click-middle": "mpc next", + "on-click-right": "mpc prev" + }, + "mpris": { + "format": "{player}: {player_icon} {dynamic}", + "format-paused": "{status_icon} {dynamic}", + "format-stopped": "{status_icon}", + "dynamic-importance-order": [ + "artist", + "album", + "title", + "position", + "length" + ], + "player-icons": { + "default": "▶", + "mpv": "▶" + }, + "status-icons": { + "paused": "⏸", + "stopped": "" + }, + "ignored-players": [ + "firefox", + "mpd" + ] + }, + "mpd#volume": { + "format": "{volume} 󱄠", + "format-disconnected": "--- 󱄠", + "format-stopped": "--- 󱄠", + "on-click": "mpc volume 70 > /dev/null 2>&1", + "on-click-right": "mpc volume 100 > /dev/null 2>&1", + "on-scroll-up": "mpc volume +5 > /dev/null 2>&1", + "on-scroll-down": "mpc volume -5 > /dev/null 2>&1" + }, + "tray": { + "icon-size": 18, + "spacing": 6 + }, + "cpu": { + //"format": "{usage:2}% ", + "format": "󰻠{usage:2}%", + "on-click": "footclient -a popup btop -p 3", + "interval": 1 + }, + "custom/gpuusage": { + "exec": "cat /sys/class/hwmon/hwmon0/device/gpu_busy_percent", + "format": " {}%", + "return-type": "", + "interval": 1, + "max-length": 5 + }, + "memory": { + //"format": "{percentage:2}% 󰳿", + "format": "{percentage:2}%", + "on-click": "footclient -a popup btop -p 4", + "interval": 1 + }, + "temperature#water": { + "hwmon-path": "/dev/sensors/aquastream/temp2_input", + "critical-threshold": 42, + //"format": "{temperatureC}°C ", + "format": " {temperatureC}°C", + "on-click-right": "foot -a popup /usr/local/bin/fan2go-tui" + }, + "temperature#cpu": { + "hwmon-path": "/dev/sensors/k10temp/temp1_input", + "critical-threshold": 95, + //"format": "{temperatureC}°C " + "format": " {temperatureC}°C" + }, + "temperature#board": { + "hwmon-path": "/dev/sensors/nct6799/temp1_input", + "critical-threshold": 85, + //"format": "{temperatureC}°C 󰇅" + "format": "󰇅 {temperatureC}°C" + }, + "temperature#gpu": { + "hwmon-path": "/dev/sensors/gpudedicated/temp1_input", + "critical-threshold": 110, + //"format": "{temperatureC}°C 󰍹" + "format": "󰍹 {temperatureC}°C" + }, + "network": { + "format-wifi": "  ", + "format-ethernet": "  ", + "tooltip-format-ethernet": " {ifname} via {gwaddr}", + "tooltip-format-wifi": " {essid} ({signalStrength}%)", + "format-linked": " {ifname} (No IP)", + "format-disconnected": "⚠ ", + "format-alt": "{ifname}: {ipaddr}/{cidr}" + }, + "wireplumber": { + "scroll-step": 5, + //"format": "{volume} {icon}", + "format": "{icon} {volume}", + "format-bluetooth": "{icon} {volume}%", + "format-bluetooth-muted": " {icon}", + "format-muted": " ", + "format-source": " {volume}", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": [ + "", + "", + "" + ] + }, + "on-click": "pavucontrol", + "on-click-right": "helvum" + }, + "clock": { + "timezone": "Europe/Berlin", + "tooltip-format": "{calendar}", + "format-alt": "{:%Y-%m-%d}", + "smooth-scrolling-threshold": "single", + "calendar": { + "mode": "month", + "mode-mon-col": 1, + "weeks-pos": "left", + "on-scroll": 1, + "format": { + "months": "{}", + "days": "{}", + "weeks": "W{}", + "weekdays": "{}", + "today": "{}" + } + }, + "actions": { + "on-click-right": "mode", + "on-scroll-up": "shift_down", + "on-scroll-down": "shift_up" + } + }, + "custom/notification": { + "tooltip": false, + "format": "{icon}", + "format-icons": { + "notification": "", + "none": "󰣨", + "dnd-notification": "", + "dnd-none": "", + "inhibited-notification": "", + "inhibited-none": "", + "dnd-inhibited-notification": "", + "dnd-inhibited-none": "" + }, + "return-type": "json", + "exec-if": "pidof swaync-client", + "exec": "swaync-client -swb", + "on-click": "swaync-client -t -sw", + "on-click-right": "swaync-client -d -sw", + "escape": true + }, + "idle_inhibitor": { + "format": "{icon} ", + "format-icons": { + "activated": " on", + "deactivated": " off" + } + }, + "custom/wallpaper": { + "format": "  ", + "on-click": "$HOME/.local/bin/rndwallpaper swww", + "tooltip": false, + "interval": "once" + }, + "custom/gammarelay-temperature": { + //"format": "{} ", + "format": " {}", + "exec": "wl-gammarelay-rs watch {t}", + "on-scroll-up": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateTemperature n +100", + "on-scroll-down": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateTemperature n -100", + "on-click-middle": "/home/andy/.config/hypr/scripts/gammarelay-auto-temp.py > /dev/null 2>&1 &", + "on-click-right": "pkill -f '/usr/lib/python-exec/python3.12/python /home/andy/.config/hypr/scripts/gammarelay-auto-temp.py'", + "interval": "2" + }, + "custom/gammarelay-brightness": { + //"format": "{}% ", + "format": " {}%", + "exec": "wl-gammarelay-rs watch {bp}", + "on-scroll-up": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateBrightness d +0.02", + "on-scroll-down": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateBrightness d -0.02", + "interval": "2" + }, + "custom/gammarelay-gamma": { + //"format": "{} 𝛄", + "format": "𝛄 {}", + "exec": "wl-gammarelay-rs watch {g}", + "on-scroll-up": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateGamma d +0.02", + "on-scroll-down": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateGamma d -0.02", + "interval": "2" + }, + "group/trayclock": { + "orientation": "horizontal", + "modules": [ + "tray", + "clock" + ] + }, + "group/display": { + "orientation": "horizontal", + "modules": [ + "idle_inhibitor", + "group/gammarelay", + "hyprland/language" + ] + }, + "group/sysmon": { + "orientation": "horizontal", + "modules": [ + "cpu", + "group/temps", + "memory" + ] + }, + "group/gammarelay": { + "orientation": "inherit", + "drawer": { + "click-to-reveal": false, + "transition-duration": 500, + "children-class": "not-gammarelay", + "transition-left-to-right": false + }, + "modules": [ + "custom/gammarelay-temperature", + "custom/gammarelay-brightness", + "custom/gammarelay-gamma" + ] + }, + "group/temps": { + "orientation": "inherit", + "drawer": { + "click-to-reveal": false, + "transition-duration": 500, + "children-class": "not-temps", + "transition-left-to-right": false + }, + "modules": [ + "temperature#water", + "temperature#cpu", + "temperature#board", + "temperature#gpu" + ] + }, + "custom/pipespacer": { + "format": "󰇙", + "max-length": 1, + "tooltip": false + }, + "custom/voidspacer": { + "format": " ", + "max-length": 1, + "tooltip": false + } +} diff --git a/dot-config/waybar/config.jsonc b/dot-config/waybar/config.jsonc index bf0755c6..66c0f951 100644 --- a/dot-config/waybar/config.jsonc +++ b/dot-config/waybar/config.jsonc @@ -1,7 +1,9 @@ { "layer": "top", "position": "top", - "width": 3440, + "id": "left", + "output": "DP-1", + "width": "90%", "height": 30, "spacing": 1, "modules-left": [ @@ -321,7 +323,7 @@ "on-scroll-up": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateTemperature n +100", "on-scroll-down": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateTemperature n -100", "on-click-middle": "/home/andy/.config/hypr/scripts/gammarelay-auto-temp.py > /dev/null 2>&1 &", - "on-click-right": "pkill -f '/usr/lib/python-exec/python3.12/python /home/andy/.config/hypr/scripts/gammarelay-auto-temp.py'", + "on-click-right": "pkill -f '/home/andy/.config/hypr/scripts/gammarelay-auto-temp.py'", "interval": "2" }, "custom/gammarelay-brightness": { -- 2.51.2