A lightweight Python utility that automatically shows/hides Waybar in Hyprland based on cursor position and window state.
- Auto-hide: Waybar hides when windows are open on the workspace
- Peek on hover: Move cursor to top edge to reveal the bar
- Toggle on/off: Keybind to enable/disable auto-hide
- Multi-monitor support: Works correctly across multiple displays
- Lightweight: Pure Python, no external dependencies (~14MB RAM, 0% CPU)
- Hyprland native: Communicates directly via Hyprland's Unix socket
Minimal footprint - runs efficiently in the background:
- When a workspace has no windows, the bar stays visible
- When windows are open, the bar hides automatically
- Move your cursor to the top edge of any monitor to reveal the bar
- The bar hides again when cursor moves away (below 50px threshold)
- Hyprland
- Waybar
- Python 3.6+
# Clone or download
git clone https://github.com/waliori/waybar-peek.git
cd waybar-peek
# Copy to your Hyprland scripts
cp waybar_peek.py ~/.config/hypr/scripts/
chmod +x ~/.config/hypr/scripts/waybar_peek.pychmod +x waybar_peek.py
# Add to your PATH or run directlyAdd these lines to your Waybar config (~/.config/waybar/config):
{
"start_hidden": true,
"ipc": true,
"on-sigusr1": "hide",
"on-sigusr2": "show",
// ... rest of your config
}Add to your hyprland.conf or exec.conf:
exec-once = ~/.config/hypr/scripts/waybar_peek.py &Edit the constants at the top of waybar_peek.py:
PIXEL_THRESHOLD = 5 # Pixels from top to trigger show (default: 5)
PIXEL_THRESHOLD_HIDE = 50 # Pixels to move down before hiding (default: 50)
POLL_INTERVAL = 0.1 # Polling interval in seconds (default: 0.1)Toggle auto-hide on/off with SIGHUP:
pkill -HUP -f waybar_peek # Toggle auto-hide on/offWhen disabled, the bar stays permanently visible.
Add to your hyprland.conf or keybinds.conf:
# Toggle waybar auto-hide
bind = SUPERSHIFT, W, exec, pkill -HUP -f waybar_peekYou can manually show/hide waybar with signals:
pkill -USR2 waybar # Show the bar
pkill -USR1 waybar # Hide the bar- Ensure
HYPRLAND_INSTANCE_SIGNATUREenvironment variable is set - Check if the script is running:
pgrep -f waybar_peek - Verify waybar has
start_hiddenand signal handlers configured
- Check Python version:
python3 --version(needs 3.6+) - Ensure script is executable:
chmod +x waybar_peek.py
MIT License
Inspired by waybar_auto_hide (Rust implementation).

