clipmenu

cli clipboard manager

clipctl


#!/usr/bin/env bash

if [[ -z  ]] || [[  == --help ]] || [[  == -h ]]; then
    cat << 'EOF'
clipctl provides controls for the clipmenud daemon.

You can temporarily disable clip collection without stopping clipmenud entirely
by running "clipctl disable". You can then reenable with "clipctl enable".
EOF
    exit 0
fi

_CLIPMENUD_PID=$(pgrep -u "$(id -u)" -nf '.*/?clipmenud$')

if [[ -z "$_CLIPMENUD_PID" ]]; then
    echo "clipmenud is not running"
    exit 2
fi

case  in
    enable) kill -USR2 "$_CLIPMENUD_PID" ;;
    disable) kill -USR1 "$_CLIPMENUD_PID" ;;
    *)
        printf 'Unknown command: %s\n' ""
        exit 1
    ;;
esac

Download

raw zip tar