Skip to content

Alternative clipboard manager (cliphist + fzf) - fixes Walker clipboard crash #4316

@evandro-macedo

Description

@evandro-macedo

Problem

The default clipboard manager (Super Ctrl + V) using Walker crashes when clipboard entries contain multi-byte UTF-8 characters (emoji, box-drawing characters, CJK text) at certain byte boundaries:

thread 'main' panicked at src/preview/mod.rs:179:55:
byte index 10000 is not a char boundary; it is inside '─' (bytes 9998..10001)

This is a bug in Walker's preview truncation logic, not in Omarchy.

Solution

Replace Walker clipboard with cliphist + fzf, which provides:

  • Persistent history across reboots
  • Preview pane showing full content
  • No UTF-8 crashes
  • Fuzzy search

Setup

  1. Install: sudo pacman -S cliphist fzf

  2. Add to ~/.config/hypr/autostart.conf:

exec-once = wl-paste --type text --watch cliphist store
exec-once = wl-paste --type image --watch cliphist store
  1. Create ~/.local/bin/clipboard-manager:
#!/bin/bash
selected=$(cliphist list | fzf \
    --preview 'echo {} | cliphist decode' \
    --preview-window 'right:50%:wrap' \
    --layout reverse \
    --border \
    --prompt '📋 ' \
    --header 'Clipboard History (Enter to copy, Esc to cancel)')

[[ -n "$selected" ]] && echo "$selected" | cliphist decode | wl-copy

Then: chmod +x ~/.local/bin/clipboard-manager

  1. Add to ~/.config/hypr/bindings.conf:
unbind = SUPER CTRL, V
bindd = SUPER CTRL, V, Clipboard manager, exec, uwsm-app -- ghostty --class=org.omarchy.clipboard -e ~/.local/bin/clipboard-manager
  1. Add to ~/.config/hypr/hyprland.conf:
windowrule = float on, match:class org.omarchy.clipboard
windowrule = center on, match:class org.omarchy.clipboard
windowrule = size 1000 600, match:class org.omarchy.clipboard

Hope this helps others who run into the same issue!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions