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.0
- Filename in menu — the dropdown now shows the filename alongside the thumbnail and file size
- Editor supports arguments — set
editor = "gimp -n"or any command with flags in your config - Scroll direction fixed — scroll up goes to newer files, scroll down to older
- Copy respects scroll selection — right-click copy now works on whichever file you've scrolled to
- Proper cleanup — menu no longer leaves orphaned lock/pid files after dismissal
- File locking on state — concurrent access to history state is now safe under flock
- Fix: waybar polling interval — changed from
"interval": 1(spawned 3600 processes/hr) to"interval": "once", relying on signal-based updates instead - Fix: shared lock for reads —
read_history()now uses a shared lock (LOCK_SH) instead of exclusive, preventing lock contention when waybar polls status

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:
On Fedora, you may need to set PKG_CONFIG_PATH first:
PKG_CONFIG_PATH=/usr/lib64/pkgconfig
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
- Appends CSS styles to your Waybar
style.css - Adds
exec-once = glance watchandSUPER+Vkeybind to your Hyprland config
Restart Waybar and you're done.
Autostart
Add to your Hyprland config (~/.config/hypr/hyprland.conf):
exec-once = glance watch
bind = SUPER, V, exec, glance drag
Waybar module
Add to your Waybar config (~/.config/waybar/config.jsonc):
"custom/glance": {
"exec": "glance status",
"return-type": "json",
"interval": 0,
"signal": 8,
"on-click": "glance menu",
"on-click-right": "glance copy",
"on-scroll-up": "glance scroll up",
"on-scroll-down": "glance scroll down"
}
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
# 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