From 93da81ec30939cd7f6376a079c84bfe3003b3ad2 Mon Sep 17 00:00:00 2001 From: Adam Simpson Date: Wed, 27 Nov 2013 08:08:36 -0500 Subject: [PATCH] feat: change vim alias, add launchd scripts --- bash/aliases | 2 +- launch-scripts/cleanDownloads.sh | 13 +++++++++++++ launch-scripts/com.simpson.move-downloads.plist | 17 +++++++++++++++++ .../com.simpson.skype-attachments.plist | 17 +++++++++++++++++ launch-scripts/skypeAttachments.sh | 11 +++++++++++ zsh/.zshrc | 2 +- 6 files changed, 60 insertions(+), 2 deletions(-) create mode 100755 launch-scripts/cleanDownloads.sh create mode 100644 launch-scripts/com.simpson.move-downloads.plist create mode 100644 launch-scripts/com.simpson.skype-attachments.plist create mode 100755 launch-scripts/skypeAttachments.sh diff --git a/bash/aliases b/bash/aliases index 266dc20..c0f9f5f 100755 --- a/bash/aliases +++ b/bash/aliases @@ -12,7 +12,7 @@ alias phpmamp='/Applications/MAMP/bin/php/php5.4.4/bin/php' alias pubkey='more ~/.ssh/id_rsa.pub | pbcopy | echo '\''=> Public key copied to pasteboard.'\''' alias server='open http://localhost:8000 && python -m SimpleHTTPServer' alias restart_apache='/Applications/MAMP/bin/apache2/bin/apachectl restart' -alias g='grunt ' +alias g='grunt' alias restart='source ~/.zshrc' alias rebuild='/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user' alias h='history' diff --git a/launch-scripts/cleanDownloads.sh b/launch-scripts/cleanDownloads.sh new file mode 100755 index 0000000..0122303 --- /dev/null +++ b/launch-scripts/cleanDownloads.sh @@ -0,0 +1,13 @@ +#!/bin/bash +function moveDownloads { + mkdir -p /Users/asimpson/Desktop/old-downloads + /usr/local/bin/tag --set Red /Users/asimpson/Desktop/old-downloads + for file in /Users/asimpson/Downloads/* + do + if [ "$file" ];then + mv "$file" /Users/asimpson/Desktop/old-downloads/ + fi + done +} + +moveDownloads diff --git a/launch-scripts/com.simpson.move-downloads.plist b/launch-scripts/com.simpson.move-downloads.plist new file mode 100644 index 0000000..277af78 --- /dev/null +++ b/launch-scripts/com.simpson.move-downloads.plist @@ -0,0 +1,17 @@ + + + + + Label + com.simpson.move-downloads + ProgramArguments + + /Users/asimpson/.dotfiles/launch-scripts/cleanDownloads.sh + + StartCalendarInterval + + Weekday + 1 + + + diff --git a/launch-scripts/com.simpson.skype-attachments.plist b/launch-scripts/com.simpson.skype-attachments.plist new file mode 100644 index 0000000..6184b15 --- /dev/null +++ b/launch-scripts/com.simpson.skype-attachments.plist @@ -0,0 +1,17 @@ + + + + + Label + com.simpson.skype-attachments + ProgramArguments + + /Users/asimpson/.dotfiles/launch-scripts/skypeAttachments.sh + + StartCalendarInterval + + Weekday + 1 + + + diff --git a/launch-scripts/skypeAttachments.sh b/launch-scripts/skypeAttachments.sh new file mode 100755 index 0000000..01e29f9 --- /dev/null +++ b/launch-scripts/skypeAttachments.sh @@ -0,0 +1,11 @@ +#!/bin/bash +function deleteSkype { + for file in /Users/asimpson/Desktop/skype-attachments/* + do + if [ "$file" ];then + mv "$file" /Users/asimpson/.Trash/ + fi + done +} + +deleteSkype diff --git a/zsh/.zshrc b/zsh/.zshrc index 3ee3c09..d90fa12 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -2,7 +2,7 @@ ZSH=$HOME/.oh-my-zsh if [ -x /usr/local/bin/mvim ]; then - alias vim="mvim -v" + alias v="mvim -v" fi # Set name of the theme to load.