A utility to make floating windows visible across all workspaces in niri — similar to "sticky windows" in other compositors.
A utility to make floating windows visible across all workspaces in niri — similar to "sticky windows" in other compositors.
A utility to make floating windows visible across all workspaces in niri — similar to "sticky windows" in other compositors.
Niri doesn’t natively support global floating windows. This tool forces float windows to persist on every workspace, mimicking the sticky behavior from X11/Wayland compositors like Sway or KWin.
go install github.com/probeldev/niri-float-sticky@latestparu -S niri-float-stickynix profile install github:probeldev/niri-float-sticky xbps-install niri-float-stickyTo automatically launch the utility on niri startup, add this line to your niri configuration:
spawn-at-startup "niri-float-sticky"Usage of niri-float-sticky:
-allow-moving-to-foreign-monitors
allow moving to foreign monitors
-app-id value
only move floating windows with app-id matching given patterns
-debug
enable debug logging
-disable-auto-stick
disable auto sticking for all windows
-ipc string
send IPC command to daemon: set_sticky, unset_sticky, toggle_sticky
-title value
only move floating windows with title matching this pattern
-version
print version and exitNotes:
-app-id and -title can be provided multiple times to specify different patterns.foo|bar).Example with debug log:
niri-float-sticky -debug >> /tmp/niri-float-sticky.log
# Configuring logrotate
cat /dev/null
/tmp/niri-float-sticky.log {
daily
rotate 5
compress
missingok
notifempty
copytruncate
maxsize 10M
su root root
}
EOFniri-float-sticky exposes a simple UNIX socket IPC interface to control window stickiness at runtime.
The daemon creates a socket at:
$XDG_RUNTIME_DIR/niri-float-sticky.sockThis allows external commands (for example, keybindings) to toggle stickiness of the currently focused window.
The binary has two modes:
Daemon mode (default) Runs the event loop and listens for IPC commands.
Client mode (-ipc)
Sends a command to the running daemon and exits immediately.
niri-float-sticky -ipc set_sticky
niri-float-sticky -ipc unset_sticky
niri-float-sticky -ipc toggle_stickyset_sticky — force window to be stickyunset_sticky — remove manual overridetoggle_sticky — toggle sticky stateYou can bind stickiness toggling to a key:
binds {
Mod+G {
spawn "niri-float-sticky" "-ipc" "toggle_sticky";
}
}The IPC protocol uses a JSON message over a UNIX domain socket:
{
"action": "toggle_sticky",
"window_id": 123456
}We welcome all contributions! To get started:
Open an Issue to:
Create a Pull Request for:
This project is licensed under the MIT License.
No open issues yet, or sync has not completed.