aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-15 12:58:31 +0200
committerDanilo M. <danix@danix.xyz>2026-09-15 12:58:31 +0200
commite996b6626c85f8cefb0f357d128091e350ee0ec0 (patch)
treee74b93bb7a7c0451f7e247d541b2b428b096df19 /modules
downloadwaybar-theme-udt-e996b6626c85f8cefb0f357d128091e350ee0ec0.tar.gz
waybar-theme-udt-e996b6626c85f8cefb0f357d128091e350ee0ec0.zip
feat: a waybar bar for DP-3, themed by udt and drawn with icons
Builds the bar from scratch as a consumer of unified-desktop-theme: the palette comes from there, the layout and the modules live here. No font glyphs anywhere. Every symbol is a real icon from the icon theme GTK already uses, which needs all three of waybar's mechanisms because no single one covers everything: the icon-theme config key for the taskbar and tray, `image` modules driving wb-icon/wb-lang for volume, microphone, presentation mode and the keyboard flag, and CSS background-image for the workspaces, the clock pair and the launcher. The workspace icons have to be CSS because format-icons takes text rather than paths, and faking the strip with eight custom modules would have cost click-to-switch and the active and urgent states. The language flag goes the other way: hyprland/language styles as #language with no per-language class, so the flag could not be selected, and it is an image module. Icons keep their own colours: 2466 of the theme's 5169 panel icons carry a hardcoded gradient and are not recolourable, which is the intended look here. The two icons the theme lacks are shipped instead, and the monochrome Slackware mark takes the udt accent at install time. vms_dots.sh and privacy_dots.sh lived only in ~/bin, in no repository at all. They are versioned here now, symlinked back, and their hardcoded state colours read from the palette. Installs alongside the existing bar rather than over it, so DP-1 keeps working while this one is tried on DP-3. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'modules')
-rw-r--r--modules/clock.jsonc35
-rw-r--r--modules/custom/launcher.jsonc13
-rw-r--r--modules/custom/privacy_dots.jsonc12
-rw-r--r--modules/custom/vmdot.jsonc10
-rw-r--r--modules/extras/taskbar.jsonc18
-rw-r--r--modules/extras/tray.jsonc8
-rw-r--r--modules/hyprland/workspaces.jsonc26
-rw-r--r--modules/image/idle_inhibitor.jsonc15
-rw-r--r--modules/image/language.jsonc18
-rw-r--r--modules/image/volume.jsonc44
10 files changed, 199 insertions, 0 deletions
diff --git a/modules/clock.jsonc b/modules/clock.jsonc
new file mode 100644
index 0000000..1c99b9a
--- /dev/null
+++ b/modules/clock.jsonc
@@ -0,0 +1,35 @@
+// Date and time. The one pair that stays text: an icon cannot say 14:32.
+// The icon sits before the text as a CSS background, which is what makes
+// these two match the icon-only pills around them.
+{
+ "clock#date": {
+ "format": "{:%a %d/%m}",
+ "min-length": 9,
+ "tooltip-format": "<tt>{calendar}</tt>",
+ "calendar": {
+ "mode": "year",
+ "mode-mon-col": 3,
+ "weeks-pos": "right",
+ "on-scroll": 1,
+ // Colours here are Pango markup inside a tooltip, which CSS
+ // cannot reach, so they are the only colours in this repo that
+ // do not come from the palette.
+ "format": {
+ "months": "<span color='#7dc4e4'><b>{}</b></span>",
+ "days": "<span color='#8aadf4'><b>{}</b></span>",
+ "weeks": "<span color='#99ffdd'><b>W{}</b></span>",
+ "weekdays": "<span color='#b7bdf8'><b>{}</b></span>",
+ "today": "<span color='#f0c6c6'><b><u>{}</u></b></span>"
+ }
+ },
+ "actions": {
+ "on-click": "mode"
+ }
+ },
+
+ "clock#time": {
+ "format": "{:%H:%M}",
+ "min-length": 5,
+ "tooltip-format": "Standard Time: {:%I:%M %p}"
+ }
+}
diff --git a/modules/custom/launcher.jsonc b/modules/custom/launcher.jsonc
new file mode 100644
index 0000000..56f61fb
--- /dev/null
+++ b/modules/custom/launcher.jsonc
@@ -0,0 +1,13 @@
+// Opens the quickshell desktop drawer. A static button: no "exec", so it
+// cannot show whether the drawer is open, which would need the shell to feed
+// waybar.
+//
+// The Slackware mark is a CSS background image, tinted with the udt accent at
+// install time. It is the one always-coloured pill on the bar.
+{
+ "custom/launcher": {
+ "format": "",
+ "tooltip": false,
+ "on-click": "qs -p $HOME/Programming/GIT/quickshell/desktop ipc call drawer toggle"
+ }
+}
diff --git a/modules/custom/privacy_dots.jsonc b/modules/custom/privacy_dots.jsonc
new file mode 100644
index 0000000..30d86b3
--- /dev/null
+++ b/modules/custom/privacy_dots.jsonc
@@ -0,0 +1,12 @@
+// A dot per active capture: microphone, camera, location, screen sharing.
+// Shows nothing when everything is off, which is the point. The script is in
+// this repo and symlinked into ~/bin, so the colours follow the palette.
+{
+ "custom/privacy_dots": {
+ "exec": "$HOME/bin/privacy_dots.sh",
+ "interval": 3,
+ "return-type": "json",
+ "format": "{}",
+ "tooltip": true
+ }
+}
diff --git a/modules/custom/vmdot.jsonc b/modules/custom/vmdot.jsonc
new file mode 100644
index 0000000..1955a6e
--- /dev/null
+++ b/modules/custom/vmdot.jsonc
@@ -0,0 +1,10 @@
+// One dot per defined VM, coloured by state. The script is in this repo and
+// symlinked into ~/bin, so the colours follow the palette.
+{
+ "custom/vmdot": {
+ "exec": "$HOME/bin/vms_dots.sh",
+ "interval": 2,
+ "return-type": "json",
+ "tooltip": true
+ }
+}
diff --git a/modules/extras/taskbar.jsonc b/modules/extras/taskbar.jsonc
new file mode 100644
index 0000000..8c9afde
--- /dev/null
+++ b/modules/extras/taskbar.jsonc
@@ -0,0 +1,18 @@
+// Open applications, drawn with each application's own icon.
+//
+// icon-theme used to name Papirus, which is not installed on this machine, so
+// GTK fell back silently. It now names the theme the rest of the desktop uses.
+{
+ "wlr/taskbar": {
+ "all-outputs": false,
+ "format": "{icon}",
+ "icon-theme": "Material-Black-Plum-Suru",
+ "icon-size": 20,
+ "tooltip": true,
+ "tooltip-format": "{title}",
+ "on-click": "activate",
+ "on-click-middle": "close",
+ "ignore-list": ["kitty-scratchpad"],
+ "cursor": true
+ }
+}
diff --git a/modules/extras/tray.jsonc b/modules/extras/tray.jsonc
new file mode 100644
index 0000000..32ec0bf
--- /dev/null
+++ b/modules/extras/tray.jsonc
@@ -0,0 +1,8 @@
+// System tray. Icons come from the applications themselves.
+{
+ "tray": {
+ "icon-size": 16,
+ "spacing": 12,
+ "cursor": true
+ }
+}
diff --git a/modules/hyprland/workspaces.jsonc b/modules/hyprland/workspaces.jsonc
new file mode 100644
index 0000000..f32d497
--- /dev/null
+++ b/modules/hyprland/workspaces.jsonc
@@ -0,0 +1,26 @@
+// Workspaces.
+//
+// The icons are NOT here. waybar's format-icons takes text, not paths, so
+// eight themed icons can only arrive as CSS background images; see
+// styles/modules.css. The label is emptied rather than removed, because an
+// empty label still gives each button its box to draw the icon in.
+//
+// Faking this with eight custom modules would have put the icons in config,
+// at the cost of click-to-switch and the active/urgent states. Keeping the
+// real module and moving the icons to CSS keeps the behaviour.
+{
+ "hyprland/workspaces": {
+ "format": "{icon}",
+ "format-icons": {
+ "1": "", "2": "", "3": "", "4": "",
+ "5": "", "6": "", "7": "", "8": "",
+ "urgent": "", "focused": "", "default": ""
+ },
+ "persistent-workspaces": {
+ "*": [1, 2, 3, 4, 5, 6, 7, 8]
+ },
+ "on-scroll-up": "hyprctl dispatch workspace +1",
+ "on-scroll-down": "hyprctl dispatch workspace -1",
+ "cursor": true
+ }
+}
diff --git a/modules/image/idle_inhibitor.jsonc b/modules/image/idle_inhibitor.jsonc
new file mode 100644
index 0000000..e026be8
--- /dev/null
+++ b/modules/image/idle_inhibitor.jsonc
@@ -0,0 +1,15 @@
+// Presentation mode.
+//
+// waybar's own idle_inhibitor module draws its state with format-icons, which
+// is text, so this is an `image` module driving the same inhibitor through
+// hyprland. The state lives in a file because the icon has to be resolved by
+// a separate process from the one that toggles it.
+{
+ "image#idle": {
+ "exec": "$HOME/bin/wb-idle status",
+ "size": 22,
+ "interval": 5,
+ "signal": 9,
+ "on-click": "$HOME/bin/wb-idle toggle"
+ }
+}
diff --git a/modules/image/language.jsonc b/modules/image/language.jsonc
new file mode 100644
index 0000000..48343b7
--- /dev/null
+++ b/modules/image/language.jsonc
@@ -0,0 +1,18 @@
+// Keyboard layout, drawn as a flag.
+//
+// This is an `image` module rather than hyprland/language, because that module
+// styles as #language and nothing else: it has no per-language CSS class, so a
+// flag cannot be picked by a selector, and its format-<lang> takes text rather
+// than a path. wb-lang reads the layout from hyprctl and prints the flag.
+//
+// The two flags are shipped by this repo: the icon theme has 13 and neither
+// Italian nor British is among them.
+{
+ "image#lang": {
+ "exec": "$HOME/bin/wb-lang",
+ "size": 20,
+ "interval": 2,
+ "signal": 10,
+ "tooltip": true
+ }
+}
diff --git a/modules/image/volume.jsonc b/modules/image/volume.jsonc
new file mode 100644
index 0000000..1788643
--- /dev/null
+++ b/modules/image/volume.jsonc
@@ -0,0 +1,44 @@
+// Volume, as a drawer: the output icon is always visible and the microphone
+// slides out on hover, the same shape as the current bar's wireplumber group.
+//
+// These are `image` modules rather than wireplumber ones because wireplumber
+// draws its state with format-icons, which is text. `image` runs a command and
+// reads a path, so wb-icon resolves the state to a themed icon instead. The
+// cost is that the percentage is in the tooltip rather than on the bar, which
+// is the trade an icons-only bar makes.
+//
+// signal 8 is raised by volume.sh after every change, so the icon updates on
+// the keypress rather than up to two seconds later.
+{
+ "group/volume": {
+ "orientation": "horizontal",
+ "modules": [
+ "image#volume",
+ "image#mic"
+ ],
+ "drawer": {
+ "transition-left-to-right": false
+ }
+ },
+
+ "image#volume": {
+ "exec": "$HOME/bin/wb-icon volume",
+ "size": 22,
+ "interval": 2,
+ "signal": 8,
+ "on-click": "$HOME/.config/waybar/scripts/volume.sh output mute",
+ "on-click-right": "pavucontrol-qt",
+ "on-scroll-up": "$HOME/.config/waybar/scripts/volume.sh output raise",
+ "on-scroll-down": "$HOME/.config/waybar/scripts/volume.sh output lower"
+ },
+
+ "image#mic": {
+ "exec": "$HOME/bin/wb-icon mic",
+ "size": 22,
+ "interval": 2,
+ "signal": 8,
+ "on-click": "$HOME/.config/waybar/scripts/volume.sh input mute",
+ "on-scroll-up": "$HOME/.config/waybar/scripts/volume.sh input raise",
+ "on-scroll-down": "$HOME/.config/waybar/scripts/volume.sh input lower"
+ }
+}