.agents/
.cargo/
.codex/
.config/
.gnupg/
.local/
.vim/
bin/
ag
189 B
book-counter
112 B
cargo-flow
321 B
cargo-flow-check
422 B
colors
210 B
conky-sync-status
554 B
git-delete-merged
92 B
git-forest
13.1 KiB
haskell-tags
230 B
haskell-watch-build
125 B
haskell-watch-lint
151 B
kitty-reload
35 B
kitty-switch-theme
283 B
lock
288 B
mount-tank
78 B
pinentry
46 B
pkgbuild-dl
87 B
record-window
996 B
refresh-display
38 B
screenshot
127 B
screenshot-region
176 B
seedbox-mount
621 B
seedbox-status
129 B
set-background
90 B
share-sync
577 B
spectrwm-status
22 B
start-streaming
904 B
sync-up
661 B
todo
60 B
todo-widget
235 B
toggle-displays
1.5 KiB
tty-record
200 B
twitch
68 B
waybar-audio-output-selector
2.0 KiB
waybar-clipboard
847 B
waybar-screenshot
554 B
xmobar-brightness
191 B
xmobar-dropbox-status
152 B
xmobar-sync-status
304 B
etc/
images/
.dircolors
4.2 KiB
.fzy.zsh
1.1 KiB
.ghci
501 B
.gitconfig
2.2 KiB
.gitignore
0 B
.gitsigners
282 B
.ignore
136 B
.rgrc
174 B
.vimrc
12.7 KiB
.vimrc.lua
113 B
.wacom
260 B
bin/waybar-clipboard
raw
| 1 | #!/bin/sh |
| 2 | |
| 3 | refresh_waybar() { |
| 4 | pkill -RTMIN+9 -x waybar |
| 5 | } |
| 6 | |
| 7 | case "$1" in |
| 8 | status) |
| 9 | count=$(cliphist list 2>/dev/null | wc -l) |
| 10 | printf '{"tooltip":"%s clipboard items"}\n' "$count" |
| 11 | ;; |
| 12 | has-items) |
| 13 | command -v cliphist >/dev/null 2>&1 || exit 1 |
| 14 | test "$(cliphist list 2>/dev/null | wc -l)" -gt 0 |
| 15 | ;; |
| 16 | copy) |
| 17 | item=$(cliphist list | fuzzel --dmenu --width 100) || exit |
| 18 | test -n "$item" || exit |
| 19 | printf '%s\n' "$item" | cliphist decode | wl-copy || exit |
| 20 | refresh_waybar |
| 21 | ;; |
| 22 | delete) |
| 23 | item=$(cliphist list | fuzzel --dmenu --width 100) || exit |
| 24 | test -n "$item" || exit |
| 25 | printf '%s\n' "$item" | cliphist delete || exit |
| 26 | refresh_waybar |
| 27 | ;; |
| 28 | wipe) |
| 29 | cliphist wipe || exit |
| 30 | refresh_waybar |
| 31 | ;; |
| 32 | *) |
| 33 | echo "usage: waybar-clipboard {status|has-items|copy|delete|wipe}" >&2 |
| 34 | exit 2 |
| 35 | ;; |
| 36 | esac |