Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
rofi + gpaste
#!/usr/bin/env bash
# Use rofi to select an entry from gpaste
# Requirements:
# rofi, gpaste
line=`gpaste-client --oneline | \
rofi -dmenu -i -p gpaste -kb-custom-1 Ctrl+x $@`
index=`echo $line | cut -d ':' -f1`
if ! [[ $index =~ ^[0-9]+$ ]]; then
exit 0
if [ $exit_code == 0 ]; then
gpaste-client select $index
elif [ $exit_code == 10 ]; then
gpaste-client delete $index

This comment has been minimized.

Copy link
Owner Author

commented Jul 27, 2017

If you want me to change something, or have question, make sure to ping me directly (use @tadly) as otherwise I won't get a notification for your comment ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.