NeoLAB
34 subscribers
150 photos
29 videos
94 files
335 links
Lab of @neo_is_kal

🐧 | @ArchLinuxIndia
🐚 | @PrivacyToolsIOChat
🍬 | @FossMemes

This is a Journal + Shrine of links
Website: https://neovoid.is-cool.dev
Download Telegram
# DIY clipboard manager #Notes #MyCreation

This was the part of larbs but i never able to get it working until now.

Using xclip, xdotool and dmenu to fetch clipboard contents

*Dependancies:
- xdotool
- xclip
- dmenu
- sxhkd (optional and depends on how you manage keybinds)

xclip -sel c -o will put selected clipboard content into file
using dmenu later we will get the list of copied texts
but this file need to updated everytime we copied something.
So we can either cron job it or use a trigger recognizing program like entr.

So i choose to create aliases instead

alias \
cc="{xclip -sel c -o -r; printf '\n'; } >> ~/.local/share/larbs/snippets" \
cr=" : > ~/.local/share/larbs/snippets"

cc will update the clipboard and cr will clear all the file

and this sxhkd hotkey will be use to get the list of content.

super + Insert
xdotool type "$(dmenu -i -l 50 < ~/.local/share/clipboard/snippets)"