carrot69 / keep-presence Goto Github PK
View Code? Open in Web Editor NEWKeeps your computer awake by moving the mouse or pressing a key when you step away.
License: Creative Commons Zero v1.0 Universal
Keeps your computer awake by moving the mouse or pressing a key when you step away.
License: Creative Commons Zero v1.0 Universal
If you are to play FPS games, or any game that locks mouse movement through Wine or Proton, script does not check for activity outside of checking if cursor coordinates have been changed. In this case, with the cursor locked, it thinks that there is inactivity, forcing mouse to be moved. This causes the mouse to no longer be focused onto the game window.
Proposed fix: use mouse and keyboard listeners to check if there was activity in between the sleep calls apart from just checking pointer location
Hi, I would like to suggest to consider also scrolling as user activity that prevents the mouse from moving.
After removing this package with:
sudo snap remove keep-presence
And then reinstalling with:
sudo snap install keep-presence
I constantly get the following error:
cannot perform operation: mount --rbind /dev /tmp/snap.rootfs_HdE3tB//dev: No such file or directory
I've tried creating the folders in /tmp/ myself, but then when I try to re-launch the application, the path changes in this error and the error will simply reappear.
keep-presence failed on Windows after some number of iterations:
16:22:22 User activity detected
--------
16:24:02 Idle detection
Traceback (most recent call last):
File "C:\Users\<user>\keep-presence.py", line 160, in <module>
execute_keep_awake_action()
File "C:\Users\<user>\keep-presence.py", line 145, in execute_keep_awake_action
move_mouse()
File "C:\Users\<user>\keep-presence.py", line 114, in move_mouse
new_x = currentPosition[0] + delta_x
~~~~~~~~~~~~~~~^^^
TypeError: 'NoneType' object is not subscriptable
It never failed like this on FreeBSD for me.
Users should be able to install keep-presence
using pip.
Hi,
First of all let me tell you - I love your work, this tool is brilliant!
I am having an error when running following command: python.exe .\keep-presence.py -s 30 -p 5 -m both -c
on Windows 11, using Python 3.10 and running 'main' branch code which is identical with v1.0.7 tag.
10:20:49 User activity detected
--------
10:21:19 Idle detection
Traceback (most recent call last):
File "C:\Users\XXXX\OneDrive - XXXX\Documents\repositories\keep-presence\src\keep-presence.py", line 175, in <module>
execute_keep_awake_action()
File "C:\Users\XXX\OneDrive - XXXX\Documents\repositories\keep-presence\src\keep-presence.py", line 157, in execute_keep_awake_action
move_mouse()
File "C:\Users\XXXX\OneDrive - XXXX\Documents\repositories\keep-presence\src\keep-presence.py", line 121, in move_mouse
new_x = currentPosition[0] + delta_x
TypeError: 'NoneType' object is not subscriptable
It happens only when I lock my computer with CTRL+ALT+DEL. Otherwise it switches between active and idle just fine:
I am experimenting with currentPosition indices at line 121, as per error, at this time, but perhaps you can offer a better insight into the problem and/or a fix.
Thanks!
Jonas
Fedora 34 uses wayland and this one doesn't work on it
Just a note: I created a package for archlinux: https://aur.archlinux.org/packages/keep-presence
Feel free to ping me if you think anything should be changed there (and to close this issue after reading).
It would be cool if this was pip installable, I'd be happy to help with that.
It would be nice to have a daemon mode.
I installed on a fresh Ubuntu 23.10 install using the snap package. Running the app says it's moving the mouse but it doesn't in fact move the mouse. Therefore my screen turns off eventually.
How do i debug to found out what's going on?
Hi!
First of all, thank you and great job with this simple and effective tool.
However, since I moved from Ubuntu 20.10 to 21.04, the tool stopped working. I mean, it should be working, according to the logs, as it correctly detects when I'm idle, but the presence action doesn't work. The mouse mode never worked for me in reality, so I used the keyboard mode. But since the update, it doesn't seem to be effective either.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.