Closed phemmer closed 1 year ago
This is possible using a combination of several rule conditions but requires knowledge of the notifications that the device produces. Adding a built-in test for this seems like a good idea. Note that there might be multiple notifications while the device is charging, not just when the device is initially plugged in.
PR #2005 should fix your problem. The new code is untested, though.
To clone and use Solar from its GitHub repository
git clone https://github.com/pwr-Solaar/Solaar.git
cd Solaar
Run Solaar as bin/solaar from this directory.
To run PR #2005, first clone Solaar if you have not already done so and cd to the clone directory. The first time you download the pull request, fetch it into a new branch and checkout that branch, as in:
git fetch origin pull/2005/head:pull_2005
git checkout pull_2005
To download a new version of the pull request, fetch it and then set your pull branch to the new fetch, as in:
git checkout pull_2005
git fetch origin pull/2005/head
git reset --hard FETCH_HEAD
Information
solaar --version
andgit describe --tags
): 1.1.8uname -srmo
): Linux 5.14.10-300.fc35.x86_64 x86_64 GNU/Linuxsolaar show
for the target device (if applicable):Is your feature request related to a problem? Please describe. I frequently forget to put mouse on charger and the battery dies mid-session.
Describe the solution you'd like I would like a rule condition which would detect when mouse is plugged in, which I could then use to perform actions.
Describe alternatives you've considered Replacing my brain with an upgraded model.
Additional context The goal is to create a rule to launch the screensaver when the mouse is plugged in. This would encourage me to use the mouse charging to launch the screensaver instead of the lock button on keyboard (I put a magnetic usb connector on mouse, so it's extremely easy to just move the mouse within range of the cable and it snaps into place). Yes this is a silly problem, but figure it can't hurt to ask, and others might benefit from it as well.