Topic continued from viewtopic.php?p=1590195#p1590195 but moved from the Newbie section to what comes closest to a programming section...
So, that was actually a fair amount of fun. The former systemd user daemon is now a D-Bus service complete with a Cinnamon applet to control it. The applet needs fairly current Cinnamon, i.e., Mint 19.x or LMDE3, seeing as how there was a major upgrade to the Cinnamon JavaScript engine between Mint 18/LMDE2 and now, providing for much nicer syntax.majpooper wrote: ⤴Mon Feb 04, 2019 3:30 pm A Cinnamon applet would be awesome (but huge amount of work) - setting the interval now I know how is easy - 10sec was a bit short, 60sec is working but just a tad too long maybe - I will probably experiment until I find the optimum time. But I can imagine situations where pause/resume would be ideal as there are times when copy/paste big files and editing clearing the clipboard so soon may be a problem or just wanting to set the interval on the fly.
Previously one had to start the daemon explicitly but the way this now works is that the applet autostarts it simply by contacting it over D-Bus. I.e., nothing to do except install it. I've also made a basic .deb package for it so you can install and remove it easily.
The applet once added to your panel betrays its current clearing period by hovering over it with the mouse, allows for disabling/enabling the automatic clearing and provides for manual clearing from its left-click menu, and can be set to be enabled on startup and have its clearing period set from its right-click "Configure" menu.
To install, please first uninstall the v0.1 version you installed:
Code: Select all
$ systemctl --user stop xselcd.service
$ sudo rm /etc/xdg/autostart/xselcd.desktop /etc/systemd/user/xselcd.service /usr/local/bin/xselcd
Code: Select all
sudo apt-get install build-essential libx11-dev libglib2.0-dev
Code: Select all
$ cd ~/xselc-2.0
$ make deb
$ sudo dpkg -i xselc_0.2-1_amd64.deb
sudo dpkg -r xselc
.Was a fair amount of fun to "design" a D-Bus service, and with the in Mint 19.x / LMDE3 newly available JavaScript syntax the applet turned out nice as well. There's quotes around "design" since as D-Bus services go, this one is extremely minimal, and may as such presumably function as a template for interested readers. Investigating all this newfangled infrastructure is what I myself got from it anyway; hope the thing itself is useful to you.