diff --git a/README b/README index 31010cc..4c60a7a 100644 --- a/README +++ b/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: diff --git a/auto-shutdown.conf b/auto-idle-shutdown.conf similarity index 100% rename from auto-shutdown.conf rename to auto-idle-shutdown.conf diff --git a/auto-idle-shutdown.log b/auto-idle-shutdown.log new file mode 100644 index 0000000..57ac21f --- /dev/null +++ b/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) diff --git a/auto-shutdown.rb b/auto-idle-shutdown.rb similarity index 80% rename from auto-shutdown.rb rename to auto-idle-shutdown.rb index cdd1731..58b8e57 100644 --- a/auto-shutdown.rb +++ b/auto-idle-shutdown.rb @@ -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 @@ -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