i3 Desktop Part 5: Clipboard, Notifications, and Screenshots

Some desktop features are not exciting, but I miss them immediately when they are not there.

Clipboard history is one. Notification control is another. Screenshots are another.

In this i3 setup, each of those is handled by a small wrapper script around a boring tool:

  • CopyQ for clipboard history
  • dunst for notifications
  • maim and xclip for screenshots

The goal is not to replace those tools. It is to make them fit the desktop.

Clipboard history without the tray

Clipboard history is handled by CopyQ, but I do not run it like a normal tray app.

i3-start-copyq starts the server and disables the tray. The interaction happens through .local/bin/i3-clipboard-menu.

The main bindings are:

  • Mod+c to search clipboard history and copy the selected item
  • Mod+Control+v to pick an item and paste it immediately
  • Mod+Shift+v to open the CopyQ window
  • Mod+Control+c to open clipboard actions

The script asks CopyQ for its history and formats each item for rofi. Text items are shortened. URI items are labelled. Images show as image entries. HTML and other data types get sensible labels. Source window titles are included when available.

That makes the history searchable without exposing the full CopyQ interface most of the time.

The management menu can delete an item, pause capture, resume capture, clear history, open the full CopyQ window, open CopyQ’s own item menu, or quit CopyQ. Clearing history asks for confirmation.

That is the right level for me: fast history search in normal use, full CopyQ still available when needed.

Notifications as state, not just popups

Dunst handles notifications. The wrapper is .local/bin/i3-notifications.

It exposes the actions I actually need:

  • close current notification
  • close all notifications
  • pop latest history item
  • open a history menu
  • clear history
  • pause or resume notifications
  • open notification actions
  • reload dunst

The status bar notification block uses dunstctl counts to show whether notifications are clear, displayed, queued, in history, or paused. The menu uses the same information.

This makes notifications feel controllable. If I am focusing, I can pause them. If I missed something, I can pop it from history. If history is noisy, I can clear it.

The dunst config itself is simple and themed. Notifications appear in the top-right, use JetBrains Mono, Papirus icons, Catppuccin colours, and keep a history length of 50. Critical notifications stay until handled.

Screenshots that match how I work

Screenshots use .local/bin/i3-screenshot.

The actions are split into copy and save variants:

  • copy selected area
  • copy full screen
  • copy focused window
  • save selected area
  • save full screen
  • save focused window

The keybindings follow that shape:

  • Print copies an area
  • Shift+Print copies the full screen
  • Control+Print copies the focused window
  • Mod+Print saves an area
  • Mod+Shift+Print saves the full screen
  • Mod+Control+Print saves the focused window

Under the hood, the script finds maim and xclip, including local fallback paths under ~/.local/opt/screenshot-tools. Area selection uses a themed selection colour. Focused-window screenshots use the i3 tree and jq to find the focused window ID, then pass that to maim.

Saved screenshots go to ~/Pictures/Screenshots with timestamped filenames. Copied screenshots go to the clipboard as PNG images. Both paths send dunst notifications for success, failure, or cancellation.

Why these belong together

Clipboard, notifications, and screenshots are all small workflow loops.

They are not worth a big application window most of the time. They need to be one shortcut away, searchable or confirmable where appropriate, and quiet otherwise.

The scripts all follow the same desktop pattern:

  • direct keybindings for common actions
  • rofi menus for choice
  • dunst feedback
  • standard command-line tools underneath
  • no permanent tray clutter

That is exactly the kind of polish that makes i3 feel less like a bare window manager.