Follow mouse widget for the KDE Plasma Desktop inspired by xfce4-eyes-plugin. A demo of getting KWin Script output from a Plasma Widget using D-Bus and Python
eyes-demo.mp4
- Vertical panel
- Appearance customization maybe?
Make sure you have python 3, python-gobject, dbus-python, qt6-tools (for qdbus6) packages installed
Install the widget from the KDE Store Plasma 6 version TODO
Right click on the Desktop > Edit Mode > Add Widgets > Get New Widgets > Download new...TODOSearch for "Cursor Eyes", install and add it to your Panel/Desktop.TODO
-
Install dependencies (please let me know if I missed something)
cmake extra-cmake-modules plasma-framework
-
Install the plasmoid
./install.sh
- A KWin Script that reads the cursor position x times per second (default is 30)
- Widget starts a D-Bus service (python script) to store and return the cursor position
- The KWin Script sends the cursor position to the D-Bus service using
callDbus
(orDBusCall
for the qml version) - The widget gets the last saved cursor position from the running D-Bus service
- When there are multiple instances of the widget only one runs the service
There are two versions of the script, one replaces the other. By default the Javascript version is what is installed and the qml one is provided mostly for demonstration purposes.
- Inspired by xfce4-eyes-plugin xorg/app/xeyes
- Related topic Determine when monitor is turned on or off via python dbus
- jinliu/kdotool for reading KWin script output inspiration
- c0d3xd3v/qt-tuxeyes