LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 1682 Comments 0 the dsc is offline

  



All times are GMT -5. The time now is 03:45 AM.

Main Menu
Advertisement
Advertisement
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
Open Source Consulting | Domain Registration