In Keystone, Waybar is configured as a core desktop component with dynamic theming and custom integrations.
Configuration Location
- Active Config:
.submodules/keystone/modules/desktop/home/components/waybar.nix - Enablement: It is enabled automatically when
keystone.desktop.enableis set totrue.
Layout Structure
The bar is positioned at the top with a height of 26px.
- Left Module:
custom/keystone: A launcher icon (right-click launches Ghostty).hyprland/workspaces: Persistent workspaces with icon labels.
- Center Module:
clock: Displays time/date.custom/screenrecording-indicator: A specialized module that:- Checks if
gpu-screen-recorderis running. - Listens for signal 8 (
RTMIN+8) to update instantly. - Clicking it triggers
keystone-screenrecordto stop recording.
- Checks if
- Right Module:
group/tray-expander: A collapsible system tray.bluetooth,network,pulseaudio,cpu,battery: Standard system monitors.
Dynamic Styling
Waybar's styling is designed to switch themes on the fly without rebuilding the system.
- CSS Import: The configuration imports
$\{config.xdg.configHome\}/keystone/current/theme/waybar.css. - Theme Switching: The
keystone-theme-switchscript updates the symlink at.../keystone/current/theme, pointing it to the new theme directory (e.g.,tokyo-night,catppuccin), and then reloads Waybar. - Base Styles: The
styleblock in the Nix config sets base properties (fonts, margins) and uses variables like@backgroundand@foregroundwhich are populated by the imported theme CSS.