Skip to content

Commit

Permalink
break background and appearance apart, refresh more slowly, rename en…
Browse files Browse the repository at this point in the history
…compassing folder to LaunchAgents
  • Loading branch information
tbremer committed Feb 9, 2022
1 parent 10e1ab3 commit dd5f899
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 13 deletions.
16 changes: 16 additions & 0 deletions LaunchAgents/appearance.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.user.update-appearance</string>
<key>ProgramArguments</key>
<array>
<string>bash</string>
<string>-c</string>
<string>~/dotfiles/bash/update-appearance.sh</string>
</array>
<key>StartInterval</key>
<integer>30</integer>
</dict>
</plist>
15 changes: 15 additions & 0 deletions LaunchAgents/background.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.user.update.background</string><key>ProgramArguments</key>
<array>
<string>bash</string>
<string>-c</string>
<string>~/dotfiles/bash/update-background.sh</string>
</array>
<key>StartInterval</key>
<integer>30</integer>
</dict>
</plist>
12 changes: 0 additions & 12 deletions LaunchDaemons/background.plist

This file was deleted.

3 changes: 3 additions & 0 deletions bash/update-appearance.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

[[ $(defaults read -g AppleInterfaceStyle 2>/dev/null) == "Dark" ]] && echo "Default" > $HOME/.appearance || echo "Light" > $HOME/.appearance
1 change: 0 additions & 1 deletion bash/check-background.sh → bash/update-background.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#!/usr/bin/env bash
[[ $(defaults read -g AppleInterfaceStyle 2>/dev/null) == "Dark" ]] && osascript -e 'tell application "System Events" to tell every desktop to set picture to "/Users/bremert/Documents/Dracula PRO — Zeno Rocha/wallpapers/dracula-buffy/desktop-3440x1440.png"' || osascript -e 'tell application "System Events" to tell every desktop to set picture to "/Users/bremert/Documents/Dracula PRO — Zeno Rocha/wallpapers/dracula-buffy/light-desktop-3440x1440.png"';
[[ $(defaults read -g AppleInterfaceStyle 2>/dev/null) == "Dark" ]] && echo "Dark" > $HOME/.appearance || echo "Light" > $HOME/.appearance

0 comments on commit dd5f899

Please sign in to comment.