aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
Diffstat (limited to 'bash')
-rw-r--r--bash/agents.sh20
-rw-r--r--bash/aliases.sh6
-rw-r--r--bash/config.sh6
-rw-r--r--bash/env.sh2
-rw-r--r--bash/facepalm/rotten-apple.sh26
-rw-r--r--bash/init.sh8
-rw-r--r--bash/npm.sh8
-rwxr-xr-xbash/tmuxinator-templates.sh2
-rw-r--r--bash/util.sh38
-rw-r--r--bash/x.sh4
-rw-r--r--bash/youtube.sh16
11 files changed, 68 insertions, 68 deletions
diff --git a/bash/agents.sh b/bash/agents.sh
index 0fd307a..1ef90ad 100644
--- a/bash/agents.sh
+++ b/bash/agents.sh
@@ -6,17 +6,17 @@ export GPG_TTY=$(tty)
export SSH_ENV="$HOME/.ssh/environment"
start_agent() {
- echo "Initialising new SSH agent..."
- ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
- echo succeeded
- chmod 600 "${SSH_ENV}"
- . "${SSH_ENV}" > /dev/null
- ssh-add
+ echo "Initialising new SSH agent..."
+ ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"
+ echo succeeded
+ chmod 600 "${SSH_ENV}"
+ . "${SSH_ENV}" > /dev/null
+ ssh-add
}
[ -f "${SSH_ENV}" ] && {
- . "${SSH_ENV}" > /dev/null
- ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
- start_agent
- }
+ . "${SSH_ENV}" > /dev/null
+ ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || {
+ start_agent
+ }
} || start_agent
diff --git a/bash/aliases.sh b/bash/aliases.sh
index 82781c4..f18cbe2 100644
--- a/bash/aliases.sh
+++ b/bash/aliases.sh
@@ -20,9 +20,9 @@ alias fim="play $DOTFILES/bash/Positive.ogg &> /dev/null"
alias mux="tmuxinator"
,u() {
- cd ~/annex;
- git annex info --fast | grep available;
- cd - > /dev/null;
+ cd ~/annex;
+ git annex info --fast | grep available;
+ cd - > /dev/null;
}
export -f ,u
diff --git a/bash/config.sh b/bash/config.sh
index 26ef085..ac9f7c2 100644
--- a/bash/config.sh
+++ b/bash/config.sh
@@ -7,8 +7,8 @@
# If not running interactively, don't do anything
case $- in
- *i*) ;;
- *) return;;
+ *i*) ;;
+ *) return;;
esac
# don't put duplicate linesin the history. # See bash(1) for more options
@@ -28,5 +28,5 @@ shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
isLinux && {
- shopt -s globstar
+ shopt -s globstar
}
diff --git a/bash/env.sh b/bash/env.sh
index b023163..9eeab51 100644
--- a/bash/env.sh
+++ b/bash/env.sh
@@ -58,7 +58,7 @@ export LEIN_SUPPRESS_USER_LEVEL_REPO_WARNINGS=1
isLinux && {
- export SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt
+ export SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt
}
diff --git a/bash/facepalm/rotten-apple.sh b/bash/facepalm/rotten-apple.sh
index 2d5c0e4..50d85c8 100644
--- a/bash/facepalm/rotten-apple.sh
+++ b/bash/facepalm/rotten-apple.sh
@@ -1,25 +1,25 @@
#!/usr/bin/env bash
isMac && {
- unalias open
+ unalias open
- alias limpar-derived-data="rm -rf ~/Library/Developer/Xcode/DerivedData/"
- alias fim="afplay $DOTFILES/bash/facepalm/Positive.mp3"
+ alias limpar-derived-data="rm -rf ~/Library/Developer/Xcode/DerivedData/"
+ alias fim="afplay $DOTFILES/bash/facepalm/Positive.mp3"
- if [ -f $(brew --prefix)/etc/bash_completion ]; then
- . $(brew --prefix)/etc/bash_completion
- fi
+ if [ -f $(brew --prefix)/etc/bash_completion ]; then
+ . $(brew --prefix)/etc/bash_completion
+ fi
- [ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion
+ [ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion
- [ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
+ [ -f /usr/local/etc/profile.d/autojump.sh ] && . /usr/local/etc/profile.d/autojump.sh
- alias ast="open -a \"Android Studio\""
+ alias ast="open -a \"Android Studio\""
- export NVM_DIR="$HOME/.nvm"
- [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
- [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
+ export NVM_DIR="$HOME/.nvm"
+ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
+ [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
- eval "$(rbenv init -)"
+ eval "$(rbenv init -)"
}
diff --git a/bash/init.sh b/bash/init.sh
index 1cb538f..a3e3075 100644
--- a/bash/init.sh
+++ b/bash/init.sh
@@ -13,10 +13,10 @@ pushd $DOTFILES > /dev/null
sizes=$(git diff-files --ignore-submodules | awk '{print $6}' | xargs du | awk '{print $1}')
for size in $sizes; do
- if [[ $size = 1 ]]; then
- # https://github.com/AGWA/git-crypt/issues/53
- echo "dotfiles contains encrypted file with 0 bytes"
- fi
+ if [[ $size = 1 ]]; then
+ # https://github.com/AGWA/git-crypt/issues/53
+ echo "dotfiles contains encrypted file with 0 bytes"
+ fi
done
popd > /dev/null
diff --git a/bash/npm.sh b/bash/npm.sh
index b8dd0a7..2784a44 100644
--- a/bash/npm.sh
+++ b/bash/npm.sh
@@ -1,10 +1,10 @@
#!/usr/bin/env bash
npm_i() {
- (which $1 &> /dev/null) || {
- yellow "Installing $2"
- npm i -g $2
- }
+ (which $1 &> /dev/null) || {
+ yellow "Installing $2"
+ npm i -g $2
+ }
}
npm_i eq edn-eq
diff --git a/bash/tmuxinator-templates.sh b/bash/tmuxinator-templates.sh
index 77cf461..adbbb5c 100755
--- a/bash/tmuxinator-templates.sh
+++ b/bash/tmuxinator-templates.sh
@@ -5,5 +5,5 @@ mkdir -p ~/.tmuxinator
templates=(annex pires songbooks sosps)
for template in ${templates[@]}; do
- cp $DOTFILES/tmux/projects/$template.yml ~/.tmuxinator/$template.yml
+ cp $DOTFILES/tmux/projects/$template.yml ~/.tmuxinator/$template.yml
done
diff --git a/bash/util.sh b/bash/util.sh
index dfdfc12..cdf4fd5 100644
--- a/bash/util.sh
+++ b/bash/util.sh
@@ -1,25 +1,25 @@
#!/usr/bin/env bash
extract () {
- if [ -f $1 ] ; then
- case $1 in
- *.tar.bz2) tar xvjf $1 ;;
- *.tar.gz) tar xvzf $1 ;;
- *.bz2) bunzip2 $1 ;;
- *.rar) unrar x $1 ;;
- *.gz) gunzip $1 ;;
- *.tar) tar xvf $1 ;;
- *.tbz2) tar xvjf $1 ;;
- *.tgz) tar xvzf $1 ;;
- *.zip) unzip $1 ;;
- *.Z) uncompress $1 ;;
- *.7z) 7z x $1 ;;
- *.xz) unxz $1 ;;
- *) echo "don't know how to extract '$1'..." ;;
- esac
- else
- echo "'$1' is not a valid file!"
- fi
+ if [ -f $1 ] ; then
+ case $1 in
+ *.tar.bz2) tar xvjf $1 ;;
+ *.tar.gz) tar xvzf $1 ;;
+ *.bz2) bunzip2 $1 ;;
+ *.rar) unrar x $1 ;;
+ *.gz) gunzip $1 ;;
+ *.tar) tar xvf $1 ;;
+ *.tbz2) tar xvjf $1 ;;
+ *.tgz) tar xvzf $1 ;;
+ *.zip) unzip $1 ;;
+ *.Z) uncompress $1 ;;
+ *.7z) 7z x $1 ;;
+ *.xz) unxz $1 ;;
+ *) echo "don't know how to extract '$1'..." ;;
+ esac
+ else
+ echo "'$1' is not a valid file!"
+ fi
}
merkle-tree () {
diff --git a/bash/x.sh b/bash/x.sh
index 5858d1f..85cb09c 100644
--- a/bash/x.sh
+++ b/bash/x.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
isLinux && {
- xmodmap ~/.Xmodmap
- xset r rate 250 50
+ xmodmap ~/.Xmodmap
+ xset r rate 250 50
}
diff --git a/bash/youtube.sh b/bash/youtube.sh
index da2d154..7077739 100644
--- a/bash/youtube.sh
+++ b/bash/youtube.sh
@@ -5,29 +5,29 @@ export DEFAULT_INC_STEP=10
download() {
- youtube-dl "$1" \
- --download-archive ~/Nextcloud/txt/youtube-dl-seen.conf \
- --prefer-free-formats \
- --playlist-end $2 \
- --output "~/Downloads/yt-dl/%(uploader)s/%(upload_date)s - %(title)s.%(ext)s"
+ youtube-dl "$1" \
+ --download-archive ~/Nextcloud/txt/youtube-dl-seen.conf \
+ --prefer-free-formats \
+ --playlist-end $2 \
+ --output "~/Downloads/yt-dl/%(uploader)s/%(upload_date)s - %(title)s.%(ext)s"
}
export -f download
download_user() {
- download "https://www.youtube.com/user/$1" ${2-$DEFAULT_PLAYLIST_END}
+ download "https://www.youtube.com/user/$1" ${2-$DEFAULT_PLAYLIST_END}
}
export -f download_user
download_channel() {
- download "https://www.youtube.com/channel/$1" ${2-$DEFAULT_PLAYLIST_END}
+ download "https://www.youtube.com/channel/$1" ${2-$DEFAULT_PLAYLIST_END}
}
export -f download_channel
download_playlist() {
- download "https://www.youtube.com/playlist?list=$1" ${2-$DEFAULT_PLAYLIST_END}
+ download "https://www.youtube.com/playlist?list=$1" ${2-$DEFAULT_PLAYLIST_END}
}
export -f download_playlist