aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2019-10-20 00:04:06 +0200
committerTeddy Wing2019-10-20 00:04:06 +0200
commit45d100a49bc1b88f25b61a1c23932088f374360b (patch)
treec070b31cff437f1ef577e1d7cd543bc1bcc753ba
parent86bed637ba3d69184616f468c47e82c88dae87f4 (diff)
downloaddothammerspoon-45d100a49bc1b88f25b61a1c23932088f374360b.tar.bz2
catalina_brightness_bullshit: Get current brightness on init
Instead of setting the arbitrary 50% brightness default, get the actual current brightness on initialisation so we can restore the real value in case the computer is locked/slept before the timer can store it.
-rw-r--r--catalina_brightness_bullshit.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/catalina_brightness_bullshit.lua b/catalina_brightness_bullshit.lua
index 63e54d7..1bc68c8 100644
--- a/catalina_brightness_bullshit.lua
+++ b/catalina_brightness_bullshit.lua
@@ -19,8 +19,7 @@
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
--- Default brightness to 50%.
-cbb_brightness = 50
+cbb_brightness = hs.brightness.get()
half_hour = 60 * 30