From afff5ec4a92b23db42b6829b9f00b4d0eaead006 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 16 Aug 2016 14:40:56 -0700 Subject: [PATCH] Remove unused shell files --- dotfiles/lib/shellenv/git-sync.sh | 14 -------- dotfiles/lib/shellenv/mu4e.sh | 58 ------------------------------- dotfiles/lib/zsh/uber.sh | 2 -- 3 files changed, 74 deletions(-) delete mode 100644 dotfiles/lib/shellenv/git-sync.sh delete mode 100644 dotfiles/lib/shellenv/mu4e.sh delete mode 100644 dotfiles/lib/zsh/uber.sh diff --git a/dotfiles/lib/shellenv/git-sync.sh b/dotfiles/lib/shellenv/git-sync.sh deleted file mode 100644 index 3b42a40e..00000000 --- a/dotfiles/lib/shellenv/git-sync.sh +++ /dev/null @@ -1,14 +0,0 @@ -function git-sync { - local target="$1" - local destination="$2" - cd "$destination" - git fetch origin - # This won't work for branches other than master - git rebase origin/master - - rsync -rt $target/* $destination - git add . - git commit -am "$(date)" - git push origin HEAD - git clean -fd -} diff --git a/dotfiles/lib/shellenv/mu4e.sh b/dotfiles/lib/shellenv/mu4e.sh deleted file mode 100644 index 5f3d1f6a..00000000 --- a/dotfiles/lib/shellenv/mu4e.sh +++ /dev/null @@ -1,58 +0,0 @@ -MAILDIR="$HOME/Mail/" -SYNC_STAMP="$HOME/.mail-sync" -APP_ICON="$(dotfiles_directory)/resources/gmail_logo.png" -TIMEOUT="60" - -function mu4e_alert_for_filename { - local message="$(mu view $1 | grep -B 10 Date)" - local title="$(echo $message | grep From | sed 's/From: //')" - local subject="$(echo $message | grep Subject | sed 's/Subject: //')" - local mu4e_message_id="$(mu4e_get_msg_id_from_file $1)" - local view_message_command="$(which zsh) -c \"refresh_config && emacs_make_frame_if_none_exists && mu4e_view_message $mu4e_message_id\"" - reattach-to-user-namespace $(which terminal-notifier) \ - -title "$title" \ - -message "$subject" \ - -execute "$view_message_command" \ - -activate "org.gnu.Emacs" \ - -appIcon $APP_ICON -} - -function mu4e_update_index_and_alert { - if test -z "$(find "$MAILDIR" -cnewer "$SYNC_STAMP" -a -type f)"; then - echo "$(date) - No new messages, skipping alerting and indexing." - else - mu4e_update_index - mu4e_alerts - fi -} - -function mu4e_sync_command { - local flags='' - test -z "$*" || flags="-f $@" - timeout --kill-after "$TIMEOUT" "$TIMEOUT" zsh -c "offlineimap $flags" -} - -function mu4e_update_index { - execute_elisp "(mu4e-update-index)" -} - -function mu4e_alerts { - test -e $SYNC_STAMP || touch $SYNC_STAMP - touch "${SYNC_STAMP}.in-progress" - for f in $(find "$MAILDIR" -cnewer "$SYNC_STAMP" -a -type f); do - mu4e_alert_for_filename $f - done - mv "${SYNC_STAMP}.in-progress" $SYNC_STAMP -} - -function mu4e_get_msg_id_from_file { - mu view $1 -o sexp | grep "message-id" | get_cols ' -1' | sed 's/"//g' -} - -function mu4e_view_message_from_file { - mu4e_view_message "$(mu4e_get_msg_id_from_file $1)" -} - -function mu4e_view_message { - execute_elisp "(progn (email) (mu4e-view-message-with-msgid \"$1\"))" -} diff --git a/dotfiles/lib/zsh/uber.sh b/dotfiles/lib/zsh/uber.sh deleted file mode 100644 index 7e16248c..00000000 --- a/dotfiles/lib/zsh/uber.sh +++ /dev/null @@ -1,2 +0,0 @@ -autoload -U add-zsh-hook -add-zsh-hook precmd uber_set_user_email_to_imalison