-
Notifications
You must be signed in to change notification settings - Fork 0
Waybar
The Waybar setup in this configuration is heavily customized and managed via Home Manager. The main configurations are found in:
-
~/.config/waybar/config.jsonc(Main bar configuration) -
~/.config/waybar/style.css(Main styling) -
~/.config/waybar/trigger.jsonc(Trigger bar configuration) -
~/.config/waybar/trigger.css(Trigger bar styling)
The Waybar features a custom "swipe to hide" behavior:
- Dismissing: Swiping UP with the touchpad on the Waybar hides it.
- Showing: Swiping DOWN on the top edge of the screen brings it back.
Note on Touchpad Scrolling: If you have natural-scroll enabled for your touchpad (as configured in Niri), a physical swipe UP translates to a ScrollDown event in Wayland, and a swipe DOWN translates to a ScrollUp event. The Waybar configuration bindings are swapped to account for this.
Waybar does not normally capture scroll events when hidden. To fix this, there is a secondary 1-pixel high, transparent "trigger" bar (trigger.jsonc and trigger.css) that runs at the top of the screen.
This trigger bar listens for scroll events and sends a SIGUSR1 signal (systemctl --user kill -s SIGUSR1 waybar.service) to toggle the visibility of the main Waybar. The trigger bar's CSS uses min-width: 5000px to ensure it captures scroll events anywhere across the top edge.
The native clock module does not sync with external calendars. Instead, there is a custom calendar module using vdirsyncer and khal:
-
vdirsyncerruns in the background to sync Nextcloud's CalDAV endpoint to~/.local/share/calendars/nextcloud. -
khalis used as a CLI calendar interface. - A custom script
~/.config/waybar/scripts/waybar-khal.shparses today's and tomorrow's events fromkhalinto a JSON format that Waybar displays as a tooltip. - Clicking the calendar module in Waybar automatically opens
khal interactivein aghosttyterminal.
Make sure your Nextcloud app password is placed in ~/.config/nextcloud_caldav for vdirsyncer to authenticate successfully.