From a330f130b8fdd94fea421fad1b3d96270c631e80 Mon Sep 17 00:00:00 2001 From: Blake Romero Date: Wed, 1 Oct 2025 23:10:25 +0100 Subject: Add waybar power menu & modules config file --- dot-config/waybar/demo-style.css | 44 +++++++++++ dot-config/waybar/modules.json | 159 +++++++++++++++++++++++++++++++++++++++ dot-config/waybar/power_menu.xml | 30 ++++++++ 3 files changed, 233 insertions(+) create mode 100644 dot-config/waybar/demo-style.css create mode 100644 dot-config/waybar/modules.json create mode 100644 dot-config/waybar/power_menu.xml diff --git a/dot-config/waybar/demo-style.css b/dot-config/waybar/demo-style.css new file mode 100644 index 0000000..a63c23a --- /dev/null +++ b/dot-config/waybar/demo-style.css @@ -0,0 +1,44 @@ +/* GTK Colours */ +@define-color fg #eee; +@define-color mg #444; +@define-color bg #000; + +* { + font-family: HackNerdFont, monospace; + font-size: 12px; + + /* font-weight: normal; */ + /* box-shadow: none; */ + + transition-property: background; + transition-duration: .5s; +} + +button { + padding: 0; +} + +label { + padding: 0 8px; +} + +#waybar { + background: transparent; +} + +#workspaces { + padding: 0; +} + +#custom-menu { + padding:0 14px 0 10px; +} + +#custom-menu:hover { + background: @fg; + color: @bg; +} + +#tray { + padding: 0 8px; +} diff --git a/dot-config/waybar/modules.json b/dot-config/waybar/modules.json new file mode 100644 index 0000000..33aefe9 --- /dev/null +++ b/dot-config/waybar/modules.json @@ -0,0 +1,159 @@ +// +// WAYBAR MODULES +// + +{ + "custom/menu": { + "format" : "", + "tooltip": false, + "menu": "on-click", + "menu-file": "~/.config/waybar/power_menu.xml", + "menu-actions": { + "shutdown": "sudo shutdown", + "reboot": "sudo reboot" + } + }, + + "sway/workspaces": { + "format": "{icon}", + "format-icons": { "0": "󰄨" }, + "on-click": "activate", + "sort-by-number": true + }, + + "sway/scratchpad": { + "format": "#{count}", + "show-empty": false, + "tooltip": true, + "tooltip-format": "{app}: {title}" + }, + + "niri/workspaces": { + "format": "{value}" + }, + + "clock": { + "format": "{:%R} 󱑊 ", + "format-alt": "{:%I:%M %p} 󱑊 ", + "tooltip-format": "{tz_list}", + "timezones": [ + "Europe/London", + "Europe/Madrid", + "America/New_York", + "America/Los_Angeles" + ] + }, + + "clock#calendar": { + "format": "{:%a %d %b}  ", + "format-alt": "{:%Y-%m-%d}  ", + "tooltip-format": "{calendar}", + "calendar": { + "mode": "month", + "mode-mon-col": 3, + // "weeks-pos": "left", + "on-scroll": 1, + "format": { + "months": "{}", + "days": "{}", + "weeks": "W{}", + "weekdays": "{}", + "today": "{}" + } + }, + "actions": { + "on-click": "mode" + } + }, + + "battery": { + "interval": 10, + "states": { + "warning": 20, + "critical": 10 + }, + "format": "{capacity}% {icon}", + "format-alt": "({time}) {capacity}% {icon}", + "format-icons": ["󰁺","󰁻","󰁼","󰁽","󰁾","󰁿","󰂀","󰂁","󰂂","󰁹"], + "format-time": "{H}:{m}" + }, + + "bluetooth": { + "format": "{status} ", + "format-disabled": "󰂲", // i.e. aeroplane mode + "format-no-controller": "", // i.e. bluetoothd not running + "format-connected": "{device_alias} ", + "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-enumerate-connected": "{device_alias}\t{device_address}", + "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}%", + "on-click": "pgrep bluetoothd && footclient bluetui" + }, + + "wireplumber": { + "format": "{volume}% {icon}", + "format-muted": " ", + "format-icons": [" ", " ", " "], + "on-click": "footclient wiremix", + "scroll-step": 0.5 + }, + + "wireplumber#source": { + "node-type": "Audio/Source", + "format": "{volume}% 󰍬", + "format-muted": "󰍭", + "on-click": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle", + "scroll-step": 5 + }, + + "tray": { + "spacing": 8, + "icon-size": 16, + "show-passive-items": true, + "icons": { + "steam": "/usr/share/icons/Papirus/64x64/apps/steam.svg", + "zeal": "/usr/share/icons/Papirus/64x64/apps/zeal.svg", + "net.lutris.Lutris": "/usr/share/icons/Papirus/64x64/apps/lutris.svg", + "d3b27cf45c1fb383fd85e2ab0857d545": "" + } + }, + + "network": { + "format": "{ifname}", + "format-disabled": "󰖪", // i.e. aeroplane mode + "format-wifi": "Online  ", + "format-ethernet": "{ipaddr}/{cidr}  ", + "format-disconnected": "offline 󰤮", + "tooltip-format": "{ifname} via {gwaddr} 󰊗 ", + "tooltip-format-wifi": "{essid} ({signalStrength}%)  \nifname:\t{ifname}\nipaddr:\t{ipaddr}\ngwaddr:\t{gwaddr}\nnetmask:{netmask}\ncidr:\t{cidr}\nbssid:\t{bssid}\nsignaldBm:{signaldBm}\nfreq:\t{frequency}", + "tooltip-format-ethernet": "{ifname} " , + "tooltip-format-disconnected": "Disconnected", + "on-click": "footclient impala" + }, + + "memory": { + "interval": 30, + "format": "{used:0.1f}G  " + }, + + "cpu": { + "interval": 10, + "format": "{}%  " + }, + + "backlight": { + "format": "{percent}% {icon}", + "format-icons": ["󱩎 ","󱩏 ","󱩐 ","󱩑 ","󱩒 ","󱩓 ","󱩔 ","󱩕 ","󱩖 ","󰛨 "], + "scroll-step": 0.5, + "min-brightness": 0.1 + }, + + "mpd": { + "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ", + "format-disconnected": "Disconnected ", + "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ", + "interval": 2, + "tooltip-format": "MPD (connected)", + "tooltip-format-disconnected": "MPD (disconnected)" + } +} diff --git a/dot-config/waybar/power_menu.xml b/dot-config/waybar/power_menu.xml new file mode 100644 index 0000000..8b3ac50 --- /dev/null +++ b/dot-config/waybar/power_menu.xml @@ -0,0 +1,30 @@ + + + + + + + Shutdown + + + + + + + + Reboot + + + + -- cgit