-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hey look, it scales! 🤓 and is lighter than ever! 🤔
High Sierra still does not work. next is menubar... then fix the high sierra bug.
- Loading branch information
Showing
47 changed files
with
203 additions
and
1,355 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.tmp | ||
.timestamp.txt |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# !/bin/bash | ||
screensaver=$1 | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
# run aerial application | ||
if [ -d ~/Library/Screen\ Savers/$screensaver ] | ||
then | ||
open ~/Library/Screen\ Savers/$screensaver | ||
elif [ -d /Library/Screen\ Savers/$screensaver ] | ||
then | ||
open /Library/Screen\ Savers/$screensaver | ||
else | ||
svn checkout https://github.com/MichaelDimmitt/sc/trunk/$screensaver; | ||
open $screensaver | ||
fi |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/bash | ||
|
||
# gather information to be able to run scripts from this file location. | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
# say $DIR | ||
# end gather information. | ||
|
||
# test_date() uninstall launch_agent if computer has slept twice quickly... | ||
# handling potential high sierra catestrophy | ||
check_launch_agent () { | ||
if [ "$(launchctl list | grep aerial)" -ge 1 ]; | ||
then | ||
osascript -e 'display notification "Please connect your computer to internet." with title "Aerial Desktop"'; | ||
$DIR/./../../uninstall/1_unstage_dyna_desktop.sh | ||
else | ||
$DIR/./../../uninstall/1_unstage_dyna_desktop.sh; | ||
fi | ||
} | ||
|
||
test_date() { | ||
num_lines=$(cat $DIR/.timestamp.txt | wc -l) | ||
case $(echo $num_lines) in | ||
[0-1]) | ||
date +%s >> $DIR/.timestamp.txt | ||
if curl --silent --head https://github.com/michaeldimmitt/aerial_desktop; | ||
then | ||
sleep 3; | ||
`/System/Library/Frameworks/ScreenSaver.framework/Resources/./ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background`;# echo Internet status: OK; | ||
else | ||
check_launch_agent | ||
fi | tail -n 1 | ||
;; | ||
2) | ||
old_time=`cat $DIR/.timestamp.txt`; | ||
count=`expr $(date +%s) - $(sed -n '2p' $DIR/.timestamp.txt)`; | ||
if [ "$count" -le 100 ]; then | ||
osascript -e 'display notification "Uninstalled because you put your computer to sleep twice really quickly.😍✌️" with title "Uninstalled due rapid sleep, please reinstall."' | ||
./$DIR/../uninstall/2_unstage_launch_agent.sh | ||
else | ||
sed -i '' '1d' $DIR/.timestamp.txt; | ||
date +%s >> $DIR/.timestamp.txt; | ||
if curl --silent --head https://github.com/michaeldimmitt/aerial_desktop; | ||
then | ||
sleep 3; | ||
`/System/Library/Frameworks/ScreenSaver.framework/Resources/./ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background`; | ||
# echo Internet status: OK; | ||
else | ||
check_launch_agent | ||
# echo Internet status: ERROR; | ||
fi | tail -n 1 | ||
fi | ||
;; | ||
*) | ||
say "should never be reached" | ||
esac | ||
} | ||
test_date; |
39 changes: 0 additions & 39 deletions
39
.hide/app/install/DesktopBackgroundChanger.app/Contents/Info.plist
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-116 KB
.hide/app/install/DesktopBackgroundChanger.app/Contents/MacOS/DesktopBackgroundChanger
Binary file not shown.
45 changes: 0 additions & 45 deletions
45
.hide/app/install/DesktopBackgroundChanger.app/Contents/Resources/AppSettings.plist
This file was deleted.
Oops, something went wrong.
Binary file removed
BIN
-28.2 KB
.hide/app/install/DesktopBackgroundChanger.app/Contents/Resources/MainMenu.nib
Binary file not shown.
46 changes: 0 additions & 46 deletions
46
.hide/app/install/DesktopBackgroundChanger.app/Contents/Resources/script
This file was deleted.
Oops, something went wrong.
16 changes: 9 additions & 7 deletions
16
.hide/app/install/3_install_launch_agent.sh → ...ll/launch_agent/3_install_launch_agent.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
# !/bin/bash | ||
screen=$1 | ||
saver='.saver' | ||
|
||
# write out path needed | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
echo $DIR | ||
|
||
#create .tmp file | ||
mkdir $DIR/.tmp | ||
cp $DIR/com.aerial.desktop.plist $DIR/.tmp/com.aerial.desktop.plist | ||
cp $DIR/com.desktop.$screen.plist $DIR/.tmp/com.desktop.$screen.plist | ||
cp $DIR/com.monitor.charge.plist $DIR/.tmp/com.monitor.charge.plist | ||
|
||
# create the string needed. | ||
pwd2=" <string>$DIR/./DesktopBackgroundChanger.app/Contents/Resources/script</string>" | ||
pwd2=" <string>$DIR/./../4_desktop_background_changer.sh</string>" | ||
pwd3=" <string>$DIR/./battery_check.sh</string>" | ||
echo $pwd2 | ||
# insert path needed into correct file. | ||
# line 9 in com.aerial.desktop.plist | ||
sed -i '' '9s?.*?'"$pwd2"'?' $DIR/.tmp/com.aerial.desktop.plist | ||
# line 9 in com.$screen.desktop.plist | ||
sed -i '' '9s?.*?'"$pwd2"'?' $DIR/.tmp/com.desktop.$screen.plist | ||
sed -i '' '9s?.*?'"$pwd3"'?' $DIR/.tmp/com.monitor.charge.plist | ||
|
||
# change environment appropriately | ||
chmod 644 $DIR/.tmp/com.aerial.desktop.plist | ||
chmod 644 $DIR/.tmp/com.desktop.$screen.plist | ||
chmod 645 $DIR/.tmp/com.monitor.charge.plist | ||
|
||
cp $DIR/.tmp/com.aerial.desktop.plist ~/Library/LaunchAgents/ | ||
cp $DIR/.tmp/com.desktop.$screen.plist ~/Library/LaunchAgents/ | ||
cp $DIR/.tmp/com.monitor.charge.plist ~/Library/LaunchAgents/ | ||
|
||
launchctl load ~/Library/LaunchAgents/com.aerial.desktop.plist | ||
launchctl load ~/Library/LaunchAgents/com.desktop.$screen.plist | ||
launchctl load ~/Library/LaunchAgents/com.monitor.charge.plist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?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.aerial.desktop</string> | ||
<key>ProgramArguments</key> | ||
<array> | ||
<string>This is a test. Check if the file has been exists or has been modified in /.tmp/com.example.plist. If not, navigate to repo and run ./install_launch_agent. | ||
</array> | ||
<key>RunAtLoad</key> | ||
<true/> | ||
<key>SuccessfulExit</key> | ||
<false/> | ||
<key>StartInterval</key> | ||
<integer>1</integer> | ||
</dict> | ||
</plist> |
File renamed without changes.
12 changes: 7 additions & 5 deletions
12
...app/install/2_local_install_workaround.sh → ...nd_defaults/2_local_install_workaround.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
# !/bin/bash | ||
if [ -d ~/Library/Screen\ Savers/Aerial.saver ] ; then | ||
screensaver=$1 | ||
if [ -d ~/Library/Screen\ Savers/$screensaver ] ; then | ||
defaults -currentHost write com.JohnCoates.Aerial shouldShowNameLabel 1 | ||
defaults -currentHost write com.apple.screensaver modulePath -string "/System/Library/Screen Savers/Shell.saver"; defaults -currentHost write com.apple.screensaver moduleName -string "Shell"; defaults -currentHost write com.apple.screensaver moduleDict -dict moduleName Shell path /System/Library/Screen\ Savers/Shell.saver/ type 0; | ||
defaults -currentHost write com.apple.screensaver modulePath -string "~/Library/Screen\ Savers/Aerial.saver"; defaults -currentHost write com.apple.screensaver moduleName -string "Aerial";defaults -currentHost write com.apple.screensaver moduleDict -dict moduleName Aerial path ~/Library/Screen\ Savers/Aerial.saver type 0; | ||
defaults -currentHost write com.apple.screensaver modulePath -string "~/Library/Screen\ Savers/$screensaver"; defaults -currentHost write com.apple.screensaver moduleName -string "Aerial";defaults -currentHost write com.apple.screensaver moduleDict -dict moduleName Aerial path ~/Library/Screen\ Savers/$screensaver type 0; | ||
osascript -e 'display notification "Installed for this user only, enjoy." with title "Success, Aerial Desktop"' | ||
elif [ -d /Library/Screen\ Savers/Aerial.saver ] ; then | ||
defaults -currentHost write com.apple.screensaver moduleDict -dict moduleName Aerial path /Library/Screen\ Savers/Aerial.saver type 0 | ||
elif [ -d /Library/Screen\ Savers/$screensaver ] ; then | ||
defaults -currentHost write com.apple.screensaver moduleDict -dict moduleName Aerial path /Library/Screen\ Savers/$screensaver type 0 | ||
osascript -e 'display notification "Installed for all users, enjoy." with title "Success, Aerial Desktop"' | ||
else | ||
else | ||
osascript -e 'display notification "Did you put your credentials? Uninstall and reinstall, thanks." with title "error 333 Aerial Desktop"' | ||
fi |
Oops, something went wrong.