Rofi Clipboard-Menü mit Catppuccin-Theme und eigenem Script

Clipboard-History (Super+C) nutzte bisher rofi ohne Theme.
Neues clipboard.rasi und moonarch-clipboard Script analog zu
den anderen Rofi-Menüs (vpn, volume, session etc.).
This commit is contained in:
2026-03-27 15:13:03 +01:00
parent c3213cc0ce
commit 3acfe42ece
3 changed files with 71 additions and 1 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# ABOUTME: Rofi-based clipboard history manager using cliphist and wl-copy.
# ABOUTME: Lists clipboard entries and copies the selected one.
CLIPHIST_DB="/run/user/1000/cliphist/db"
function start_rofi() {
local content="$1"
echo -e "$content" | rofi -dmenu -theme /etc/xdg/rofi/themes/clipboard.rasi -mesg "󰅍 Clipboard History"
}
function main() {
local entries
local result
entries=$(cliphist -db-path "$CLIPHIST_DB" list)
result=$(start_rofi "$entries")
if [ -n "$result" ]; then
echo "$result" | cliphist -db-path "$CLIPHIST_DB" decode | wl-copy
else
exit 1
fi
}
main