![]() The point I guess is that I don't have to remember to clear the clipboard or empty the trash etc. I have several very basic scripts I run in cron just for security/house cleaning - one that cleans out my Downloads folder every night, empties the trash, deletes thumbnails, un-mounts USB etc. Automation is the key element otherwise I have a hot-key which is not the solution. I don't know where the OP went because this solves his issue as well as mine in that your solution is automated. I did this - I think assuming my primary sceen is :0 and setting the interval for 10 minutes - again I really do not grasp the concept of the DISPLAY environment variable. I am trying to understand DISPLAY environment variable a little better especially in light of the fact I actually have three "screens" (two 24" monitors and 42" TV) t : The clearing interval in seconds (default 10) d : The X display (default from the DISPLAY environment variable) Selections a configurable number of seconds from their selection. User daemon to automatically clear the PRIMARY, SECONDARY and CLIPBOARD X Install -Dm 644 rvice /etc/systemd/user/rvice Xselcd.c:69:4: warning: empty declaration Gcc -W -Wall -O2 xselcd.c -lX11 -o xselcd Xselcd-0.1.tar.gz (2.06 KiB) Downloaded 111 times It is/can be basically just a standard little program. Was for me certainly in the sense of a systemd user daemon being a rather useful construct. Password managers have that issue as well with their attempts to clear clipboard: basically, don't run a clipboard viewer if you find clipboard history to be sensitive - but I guess I can try and look into methods if really desired. ![]() Basically the issue is that there is no such thing as (a) clipboard (history) that a clipboard history viewer is not just a window onto pre-existing clipboard history from somewhere but that the viewer is the only thing that maintains said history in the first place. ![]() N.B., and explicitly also to OP: due to the manner in which X selections work, a clipboard history viewer such as ClipIt in fact interferes with clearing. Due to Mint/Ubuntu (for now?) not using the systemd user target graphical-session.target we launch the service through the desktop autostart as per the. Use xselcd -h for a usage screen if you want to provide an explicit display and/or clearing interval value in the service file. The daemon installs to /usr/local/bin and the service file to /etc/systemd/user. Note, you will at minimum need the build-essential and libx11-dev packages installed to be able to compile it. ![]() The clearing method is exactly the same as the one used by xsel. You can add a linear after killall -q polybar.You will have a user daemon running that by default every 10 seconds clears any of the PRIMARY, SECONDARY and/or CLIPBOARD selections that are at that point more than 10 seconds old. For example, the code should wait until the killing process have been completely finished. I think your code would benefit of some revisions. So you have to control killall's performance. Process behaves when it is delivered the signal. Killall is a tool which provide a way to kill a process by its name, it sends signal to a process by its name to terminate it.Įach signal has a current disposition, which determines how the Killall is extremely powerful and its performance is unpredictable, meaning we can't predict for how long it will take to completely terminate a process and its childs. In your code the first command killall -q polybar will kill polybar and then sleep for two seconds.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |