glance
A file clipboard for Wayland — watches directories for new files and shows a transient widget in Waybar. Click to open a dropdown menu with actions: drag-and-drop, open, edit, or copy the path.
What's new in 0.3.6
- Fix: file lock no longer blocks indefinitely — the state file lock now uses non-blocking
flockwith a 2-second timeout. Previously, if the watcher held the lock while a waybar handler calledscrollormenu, the handler would block forever, freezing waybar entirely. - Fix: menu scroll no longer blocks GTK event loop — scroll-in-menu now spawns the scroll subprocess without waiting for it, preventing the menu from freezing.
- Fix: external drag command timeout — external drag tools (ripdrag, dragon, etc.) are now killed after 30 seconds if they don't exit, instead of blocking forever.
- Fix: wl-copy no longer blocks — the copy command now fires wl-copy without waiting for it to finish.
- Configurable drag command — set
drag_commandin your config to use ripdrag, dragon, or any drag tool of your choice. Useful for dragging files into XWayland browsers where native Wayland DnD doesn't work. Defaults to the builtin GTK4 drag overlay. - Fix: waybar freeze —
pkill -RTMIN+8 waybarwas accidentally killing waybar's child processes (like a runningglance status), leaving waybar with an orphaned pipe that it busy-loops on. Now targets only the main waybar process with-x -oflags. - Fix: waybar polling interval — changed from
"interval": 1(spawned 3600 processes/hr) to"interval": 5, massively reducing process spawning overhead. - Fix: full binary paths —
glance initnow writes absolute paths in Waybar and Hyprland configs, so glance works even when~/.local/binor~/.cargo/binaren't in waybar's PATH. - Fix: menu scroll — scroll inside the dropdown menu now uses the full binary path, fixing scroll not working when launched from waybar.

Dependencies
Arch Linux:
Fedora:
You also need a Rust toolchain and Hyprland (uses hyprctl for overlay placement).
swappy is a lightweight Wayland screenshot annotation tool used by the Edit button. If not installed, glance will fall back to opening files with your default app. You can also set a different editor in the config.
Install
From crates.io:
If
cargo installfails with "gtk4.pc not found", try:PKG_CONFIG_PATH=/usr/lib64/pkgconfig cargo install wayglance
From source:
Then run the setup wizard:
This automatically:
- Creates the default config at
~/.config/glance/config.toml - Adds the Waybar module to your Waybar config (with full binary paths)
- Appends CSS styles to your Waybar
style.css - Adds
exec-onceandSUPER+Vkeybind to your Hyprland config
Restart Waybar and you're done.
Autostart
Add to your Hyprland config (~/.config/hypr/hyprland.conf):
exec-once = /path/to/glance watch
bind = SUPER, V, exec, /path/to/glance drag
Waybar module
Add to your Waybar config (~/.config/waybar/config.jsonc):
"custom/glance": {
"exec": "/path/to/glance status",
"return-type": "json",
"interval": 5,
"signal": 8,
"on-click": "/path/to/glance menu",
"on-click-right": "/path/to/glance copy",
"on-scroll-up": "/path/to/glance scroll up",
"on-scroll-down": "/path/to/glance scroll down"
}
Use the full path to the glance binary (e.g.
/home/you/.local/bin/glance) since waybar may not have~/.local/binin its PATH.
Then add "custom/glance" to your bar layout (e.g. modules-right).
A complete snippet is in waybar-module.jsonc.
Waybar styling
Add to your Waybar CSS (~/.config/waybar/style.css):
}
}
}
Config
Optional. Copy config.example.toml to ~/.config/glance/config.toml
and edit to taste. Everything has sane defaults.
# directories to watch for new files
= ["~/Pictures/Screenshots", "~/Downloads"]
# RTMIN+N signal to poke waybar
= 8
# auto-dismiss the waybar widget after N seconds
= 10
# skip partial downloads etc.
= [".part", ".crdownload", ".tmp"]
# waybar bar height in px (for menu placement)
= 57
# number of files to remember in history
= 5
# editor command for the Edit button (default: "swappy -f")
# supports full commands with arguments, e.g. "gimp -n" or "swappy -f"
= "swappy -f"
# which buttons to show in the dropdown
= ["drag", "open", "edit", "copy"]
# auto-dismiss the dropdown after N seconds (0 = never)
= 8
# drag command: "builtin" for GTK4 native drag, or an external tool
# use "ripdrag --and-exit" for better browser compatibility (XWayland)
= "builtin"
# customize menu appearance
[]
= "rgba(30,30,46,0.95)"
= "#cdd6f4"
= "#a6adc8"
= "rgba(255,255,255,0.08)"
= "rgba(255,255,255,0.15)"
= 12
Commands
glance init # set up config, waybar module, CSS, and autostart
glance watch # run the inotify watcher (long-running)
glance status # JSON for waybar (called by exec)
glance menu # dropdown menu below waybar with actions
glance copy # wl-copy the selected file path
glance drag # drag-and-drop overlay at cursor
glance scroll up|down # navigate through file history