From 911be51b29e1296b629a256d83577b14619937ff Mon Sep 17 00:00:00 2001 From: Marvin Elsen Date: Sun, 25 May 2025 00:11:29 +0200 Subject: [PATCH] Update waybar --- waybar/.config/waybar/colors.css | 2 + waybar/.config/waybar/config.jsonc | 109 ++++++++++++++++++++++------- waybar/.config/waybar/style.css | 27 +++++-- 3 files changed, 109 insertions(+), 29 deletions(-) diff --git a/waybar/.config/waybar/colors.css b/waybar/.config/waybar/colors.css index bc92159..44e8929 100644 --- a/waybar/.config/waybar/colors.css +++ b/waybar/.config/waybar/colors.css @@ -8,3 +8,5 @@ @define-color red-gradient #D32F2F; @define-color blue #0091EA; @define-color blue-gradient #00B0FF; +@define-color purple #651FFF; +@define-color purple-gradient #7C4DFF; diff --git a/waybar/.config/waybar/config.jsonc b/waybar/.config/waybar/config.jsonc index 6f9248d..4056779 100644 --- a/waybar/.config/waybar/config.jsonc +++ b/waybar/.config/waybar/config.jsonc @@ -1,52 +1,113 @@ +// Waybar Config +// https://github.com/Alexays/Waybar +// Marvin Elsen + +// See https://github.com/Alexays/Waybar/wiki/Configuration#bar-config { "layer": "top", "position": "top", "modules-left": ["hyprland/workspaces"], "modules-center": ["clock#date", "clock#time"], - "modules-right": ["tray", "network", "bluetooth"], + "modules-right": ["tray", "pulseaudio#input", "pulseaudio#output", "bluetooth", "network"], + // See https://github.com/Alexays/Waybar/wiki/Module:-Hyprland "hyprland/workspaces": { - "format": "{name}", + "format": "{icon}", + "format-icons": { + "1": "一", + "2": "二", + "3": "三", + "4": "四", + "5": "五", + "6": "六", + "7": "七", + "8": "八", + "9": "九", + "10": "十" + }, + "on-scroll-up": "hyprctl dispatch workspace +1", + "on-scroll-down": "hyprctl dispatch workspace -1", "persistent-workspaces": { - "*": 5, + "*": 5 } }, + // See https://github.com/Alexays/Waybar/wiki/Module:-Bluetooth "bluetooth": { - "format-on": "󰂯 On", - "format-connected": "󰂱 On", - "format-off": "󰂲 Off", - "format-no-controller": "󰂲 No Controller", + "format-on": "󰂯 On", + "format-connected": "󰂱 On", + "format-off": "󰂲 Off", + "format-disabled": "󰂲 Disabled", + "format-no-controller": "󰂲 No Controller", "tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected", - "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}", + "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected:\n\n{device_enumerate}", "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}", - "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%" + "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%", + "on-click": "rfkill toggle bluetooth" }, - "pulseaudio": { - "tooltip": false, - "scroll-step": 5, - "format": "{icon} {volume}%", - "format-muted": "{icon} {volume}%", - "on-click":"pactl set-sink-mute @DEFAULT_SINK@ toggle", + // See https://github.com/Alexays/Waybar/wiki/Module:-PulseAudio + "pulseaudio#input": { + "format": "{format_source}", + "format-source": "󰍬 {volume}%", + "format-source-muted": "󰍭 Muted", + "on-click": "pactl set-source-mute @DEFAULT_SOURCE@ toggle", + "on-click-right": "pavucontrol --tab=4", + "on-scroll-up": "pactl set-source-volume @DEFAULT_SOURCE@ +5%", + "on-scroll-down": "pactl set-source-volume @DEFAULT_SOURCE@ -5%", + "tooltip": false + }, + // See https://github.com/Alexays/Waybar/wiki/Module:-PulseAudio + "pulseaudio#output": { + "format": "{icon} {volume}%", + "format-muted": "󰖁 Muted", + "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle", + "on-click-right": "pavucontrol", "format-icons": { - "default": ["", "", ""] - } + "default": ["", "", ""], + "headphone": "󰋋", + "speaker": "󰓃" + }, + "scroll-step": 5 }, + // See https://github.com/Alexays/Waybar/wiki/Module:-Network "network": { "format-wifi": "󰖩 Online", "format-ethernet": "󰛳 Online", "format-disconnected": "󰲜 Offline", - "tooltip-format-ethernet": "{ifname}\t{ipaddr}" + "tooltip-format-ethernet": "{ifname}\t{ipaddr}", + "tooltip-format-wifi": "{essid}\t{signalStrength}%", + "tooltip-format-disconnected": "Disconnected", + "family": "ipv4" }, - "tray":{ - "icon-size":18, + // See https://github.com/Alexays/Waybar/wiki/Module:-Tray + "tray": { + "icon-size": 18, "spacing": 10, "show-passive-items": true }, + // See https://github.com/Alexays/Waybar/wiki/Module:-Clock "clock#date": { - "interval": 60, - "format": "{:%a %b %d}" + "format": "{:%a %b %d}", + "tooltip-format": "{calendar}", + "calendar": { + "mode": "month", + "mode-mon-col": 3, + "weeks-pos": "right", + "format": { + "months": "{}", + "days": "{}", + "weeks": "W{}", + "weekdays": "{}", + "today": "{}" + } + }, + "actions": { + "on-click-right": "mode", + "on-scroll-up": "shift_up", + "on-scroll-down": "shift_down" + } }, + // See https://github.com/Alexays/Waybar/wiki/Module:-Clock "clock#time": { - "interval": 60, - "format": "{:%H:%M}" + "format": "{:%H:%M}", + "tooltip": false } } diff --git a/waybar/.config/waybar/style.css b/waybar/.config/waybar/style.css index cfdc609..f896e1e 100644 --- a/waybar/.config/waybar/style.css +++ b/waybar/.config/waybar/style.css @@ -1,7 +1,11 @@ +/* Waybar Style */ +/* https://github.com/Alexays/Waybar */ +/* Marvin Elsen