LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Blogs > linux-related notes
User Name
Password

Notices

Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Old

Bash script/utility to wait for keyboard and mouse inactivity

Posted 10-18-2013 at 06:42 PM by the dsc (linux-related notes)
Updated 10-22-2013 at 07:52 PM by the dsc

Sometimes you may want to have some script periodically popping up some interface or something, but it may be somewhat abrupt, interrupt something you're doing with the mouse, or keyboard. So I came up with this tiny utility that will wait for the time given as a parameter, then exit.



Code:
#!/bin/bash
a=0
time=$1
if [ -z $time ] ; then time="1.2s" ; fi

while true ; do

mouse1=$( xdotool getmouselocation --shell
...
Member
Posted in Uncategorized
Views 443 Comments 0 the dsc is offline

  



All times are GMT -5. The time now is 04:11 PM.

Main Menu

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration