1
1
Fork 0
nixos/options/custom/scripts/clipboard.sh
Myned 53c8575116
git: migrate to forgejo
Squashes 1,331 commits

Signed-off-by: Myned <dev@bjork.tech>
2024-09-12 19:41:21 -05:00

14 lines
395 B
Bash

#! /usr/bin/env bash
# Toggle clipboard menu
# Kill menu if running
if ! pkill wofi; then
# Prompt clipboard for selection
selection="$(cliphist list | wofi --dmenu)"
# Decode and copy to clipboard
cliphist decode <<< "$selection" | tee >(xclip -rmlastnl -selection clipboard &> /dev/null) >(wl-copy --trim-newline &> /dev/null)
notify-send '> clipboard' 'Copied' --urgency low
fi