Skip to content

Commit

Permalink
Renaming to auto-idle-shutdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
vroy committed Sep 21, 2010
1 parent b934828 commit 7acc26c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README
@@ -1,6 +1,6 @@
What does this do:

You can configure this script to shut down your computer automatically after a specified amount of time that you haven't touched the mouse or keyboard. To make sure it does not shutdown when playing a movie or something similar where the keyboard and mouse does not move but you're in front of your computer, you can avoid the automatic shutdown by clicking cancel in the notification. You configure the time limits for the amount of time it idles before shutdown and how much time before the shutdown time should it display the notification in auto-shutdown.conf.
You can configure this script to shut down your computer automatically after a specified amount of time that you haven't touched the mouse or keyboard. To make sure it does not shutdown when playing a movie or something similar where the keyboard and mouse does not move but you're in front of your computer, you can avoid the automatic shutdown by clicking cancel in the notification. You configure the time limits for the amount of time it idles before shutdown and how much time before the shutdown time should it display the notification in auto-idle-shutdown.conf.

Requirements:

Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions auto-idle-shutdown.log
@@ -0,0 +1,4 @@
bash: ./autoshudown: No such file or directory
bash: ./autoshudown: No such file or directory
Test
ruby: No such file or directory -- auto-shutdown.rb (LoadError)
4 changes: 2 additions & 2 deletions auto-shutdown.rb → auto-idle-shutdown.rb
Expand Up @@ -8,7 +8,7 @@ def debug(msg)
puts msg if DEBUG
end

if !File.exists?("auto-shutdown.conf")
if !File.exists?("auto-idle-shutdown.conf")
puts "Missing configuration file."
exit!(1)
end
Expand All @@ -27,7 +27,7 @@ def debug(msg)
debug "Shutting down."
elsif @idle >= (@shutdown - @notification)
debug "Alerting user that PC will shut down in approximately #{@notification}."
`zenity --warning --text="AUTO-SHUTDOWN: Your PC will shut down in approximately 10 minutes if you don't touch your mouse or keyboard."`
`zenity --warning --text="AUTO-IDLE-SHUTDOWN: Your PC will shut down in approximately 10 minutes if you don't touch your mouse or keyboard."`
else
debug "Do nothing."
end

0 comments on commit 7acc26c

Please sign in to comment.