From b0c275b9d822e80763d1be33e7b15f019064dba2 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Thu, 16 Feb 2023 06:54:23 -0500 Subject: [PATCH] darkmode script --- darkmode | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 darkmode diff --git a/darkmode b/darkmode new file mode 100755 index 0000000..4e48830 --- /dev/null +++ b/darkmode @@ -0,0 +1,13 @@ +#!/usr/bin/env zsh + +if $1 +then + ~/Documents/elgato/dist/elgato 192.168.1.2 192.168.1.4 night + brightness -d 1 0.1; brightness -d 3 0.1 + osascript -e 'tell app "System Events" to tell appearance preferences to set dark mode to true' +else + ~/Documents/elgato/dist/elgato 192.168.1.2 192.168.1.4 day + brightness -d 1 1; brightness -d 3 1 + osascript -e 'tell app "System Events" to tell appearance preferences to set dark mode to false' +fi +