You are not logged in.
is it possible?
Im only a newb but would like to find out if this is possible. My google fu is weak on this one.
Cheers
Steve
Offline
If you do actually mean CLIPBOARD, then try:
touch blank
xclip -selection clipboard blank
This could be scripted and the script called from a keybind in ~/.config/openbox/rc.xml
EDIT: actually, just use this in the "Execute" box in the GUI menu editor:
Sorry, it's very early in the morning
This can be added to rc.xml, but the quotes and stuff need to be handled specially in that file, I hope somebody else can help with this:
bash -c 'touch blank && xclip -selection clipboard blank ; rm blank'
To clear the PRIMARY buffer as well, use:
xclip -i /dev/null
http://unix.stackexchange.com/questions … ddle-wheel
https://packages.debian.org/jessie/xclip
Last edited by Head_on_a_Stick (2017-01-05 07:49:40)
Offline
Thanks Hoas,do you think this would work if i just add this to the rc.xml file under "keybindings for running application"?
Use keybind superkey plus lower case c
<keybind key="W-c">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>xclip</name>
</startupnotify>
<command>bash -c 'touch blank && xclip -selection clipboard blank ; rm blank'</command>
</action>
</keybind>
Offline
do you think this would work
I think that the quotes and commas need to be treated specially and "escaped" in that file but I may be wrong.
I'm in OpenBSD & dwm at the moment so you are in a better position to check these things than me
Anyway, good luck, I have to go to $DAY_JOB
Offline
Ok i give it a try.
Offline
Right, I'm back in BunsenLabs now and I can't be bothered figuring out the escape codes but a simple script does work.
We have no time to load up text editors so create the script with the tee(1) command and a here document, just enter these lines in order in a terminal window:
tee ~/bin/wipe <<"!"
touch blank
xclip -selection clipboard blank
rm blank
!
Now make the "wipe" script executable:
chmod +x ~/bin/wipe
Then this can be added to ~/.config/openbox/rc.xml:
<keybind key="W-c">
<action name="Execute">
<command>wipe</command>
</action>
</keybind>
This works in my BunsenLabs system
Offline
if that works for you, Steve, i'm pretty sure that you want this as well (or else tell us WHY you feelthe need to wipe only your secondary clipboard):
To clear the PRIMARY buffer as well, use:
xclip -i /dev/null
just add that line to the ~/bin/wipe script (which could, btw, have been created with a regular text editor, but HoaS is being inventive again!).
Offline
If you're using Clipit (default with BunsenLabs) simply clearing the clipboard may not be enough for you. Clipit keeps its own history.
Check the popup list after various xclip commands.
Last edited by johnraff (2017-01-06 07:04:25)
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
^ Also, I think if Clipit is running then it syncs the PRIMARY and the CLIPBOARD, which is incredibly annoying.
Offline
^indeed it would be, but that's an option, not enabled by default IIRC.
Anyway "Use Primary" is definitely switched off here.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Thanks for the help on this but its a bit over my head technically. Ill just use clipit.
Offline
What about Ctrl-C, with nothing selected - doesn't that effectively clear the clipboard?
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
What about Ctrl-C, with nothing selected - doesn't that effectively clear the clipboard?
Didnt work for me in geany or on a web browser search box.
Ctrl C + Ctrl V + Ctrl C. Still holds the data.
Offline
^ Also, I think if Clipit is running then it syncs the PRIMARY and the CLIPBOARD, which is incredibly annoying.
configurable, and configured right, extremely helpful (i can move clipboard content at will between primary & secondary).
but...
Thanks for the help on this but its a bit over my head technically. Ill just use clipit.
...this will do the exact opposite of what you originally requested?
i.e., it will store more, not less.
granted, the differences between primary & secondary clipboard are a little confusing at first.
another of those legacy things that the designers of desktop environments deemed necessary to hide under an extra layer.
maybe if you would tell us what are your actual concerns and reasons for asking the question in the first place?
Offline
@ohnonot
Maybe security (passwords) or maybe my understanding of the clipboard is wrong?
So if i use clipit that would be the opposite of clearing the clipboard but it has a function within it to clear the clipboard? What is the difference between primary and secondary clipboard?
Offline
... What is the difference between primary and secondary clipboard?
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
Thanks damo,
Funny that something rudimentary such as this brings up some complicated programming, or atleast that is how i see it.
Offline