Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 569  / 1 Year ago, tue, december 27, 2022, 4:04:33

I have the following script



  while [ true ]
do
gnome-screensaver-command -l
xinput set-int-prop 10 "Device Enabled" 8 0
sleep 1m
xinput set-int-prop 10 "Device Enabled" 8 1
sleep 30m
done


I want to run it on startup. I have really bad neck pain so doctor suggested me to go for a walk or do minor exercise every 30 minutes or so. I created this script which will lock me out and disable mouse for one minute. I also want to add keyboard disabling which will totally lock me out of my computer for a minute. It would be really amazing if there is any better option for this.


More From » scripts

 Answers
4

Unless you've got a really good reason to make something new (some people do), I'd look at existing applications that do what you're asking.



Gnome used to have a Typing Break feature but that was six years ago and that's a lot of time when developers are hell-bent on ripping out all the useful features. It might still be there. (Pre-post-edit: Yeah, looks like this was nuked in 2010/11. Sigh.)



RSI is a long-standing issue so there are other applications that do what you want:




  • Workrave is probably the best option. More configuration than Typing Break and it allows you to do exactly what you're asking (it'll blank out the screen and disable input). It's also in the repos.

  • drwright is a port of Typing Break for Gnome 3 stuff but it should work in Unity too. You'll need to add a PPA (on the page) to install it but that's not a huge issue.


[#30691] Thursday, December 29, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fulpu

Total Points: 116
Total Questions: 118
Total Answers: 104

Location: Solomon Islands
Member since Fri, Oct 8, 2021
3 Years ago
;