#!/usr/bin/env bash # Clipboard history through rofi, backed by greenclip (X11). # The daemon is started from bspwmrc. if ! command -v greenclip >/dev/null 2>&1; then notify-send -a "Clipboard" -u critical "greenclip is not installed" \ "Install it with: paru -S rofi-greenclip" exit 1 fi pgrep -f 'greenclip daemon' >/dev/null 2>&1 || (setsid greenclip daemon >/dev/null 2>&1 &) rofi -modi "clipboard:greenclip print" \ -show clipboard \ -run-command '{cmd}' \ -theme "$HOME/.config/rofi/control.rasi" \ -p "Clipboard"