Skip to content
Angelo Azevedo edited this page Jun 24, 2026 · 2 revisions

Waybar Configuration

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)

Custom Behaviors

Swipe to Hide / Show

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.

How the Trigger Bar Works

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.

Nextcloud Calendar Integration

The native clock module does not sync with external calendars. Instead, there is a custom calendar module using vdirsyncer and khal:

  1. vdirsyncer runs in the background to sync Nextcloud's CalDAV endpoint to ~/.local/share/calendars/nextcloud.
  2. khal is used as a CLI calendar interface.
  3. A custom script ~/.config/waybar/scripts/waybar-khal.sh parses today's and tomorrow's events from khal into a JSON format that Waybar displays as a tooltip.
  4. Clicking the calendar module in Waybar automatically opens khal interactive in a ghostty terminal.

Make sure your Nextcloud app password is placed in ~/.config/nextcloud_caldav for vdirsyncer to authenticate successfully.

Clone this wiki locally