reverted to before zulu
This commit is contained in:
parent
6209d6f656
commit
3f5e822fb3
21 changed files with 216 additions and 48 deletions
27
.gitmodules
vendored
27
.gitmodules
vendored
|
@ -1,12 +1,27 @@
|
|||
[submodule "dotbot"]
|
||||
path = dotbot
|
||||
url = https://github.com/anishathalye/dotbot
|
||||
[submodule "lib/highlighting"]
|
||||
path = lib/highlighting
|
||||
url = https://github.com/zsh-users/zsh-syntax-highlighting
|
||||
[submodule "lib/completions"]
|
||||
path = lib/completions
|
||||
url = https://github.com/zsh-users/zsh-completions
|
||||
[submodule "lib/nano/syntax"]
|
||||
path = lib/nano/syntax
|
||||
url = https://github.com/scopatz/nanorc
|
||||
[submodule "lib/zulu/core"]
|
||||
path = lib/zulu/core
|
||||
url = https://github.com/zulu-zsh/zulu
|
||||
[submodule "lib/zulu/index"]
|
||||
path = lib/zulu/index
|
||||
url = https://github.com/zulu-zsh/index
|
||||
[submodule "lib/ohmyzsh"]
|
||||
path = lib/ohmyzsh
|
||||
url = https://github.com/robbyrussell/oh-my-zsh
|
||||
[submodule "lib/k"]
|
||||
path = lib/k
|
||||
url = https://github.com/rimraf/k
|
||||
[submodule "lib/fzf"]
|
||||
path = lib/fzf
|
||||
url = https://github.com/junegunn/fzf.git
|
||||
[submodule "lib/util"]
|
||||
path = lib/util
|
||||
url = https://github.com/skx/sysadmin-util
|
||||
[submodule "lib/dasht"]
|
||||
path = lib/dasht
|
||||
url = https://github.com/sunaku/dasht
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
eeleater, 22.02.2017, Cleaned up a bit
|
||||
|
||||
eeleater, 06.10.2015, Stuff (look at commits)
|
||||
|
||||
eeleater, 22.09.2015, removed Ansible Completion (again...)
|
||||
|
|
|
@ -5,3 +5,5 @@ This Repo contains my dotfiles
|
|||
|
||||
|
||||
Install with the ```./install``` script.
|
||||
|
||||
Also need to install xmlstarlet, use ```yaourt -S xmlstarlet```
|
||||
|
|
16
lib/bin/nma
Executable file
16
lib/bin/nma
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
out=$(mktemp /tmp/nma.XXXXXXXX)
|
||||
|
||||
curl --silent --data-ascii "apikey=1e9cfe3bddab21f271b742eb04f9918a76ad0ef0333be7d3" \
|
||||
--data-ascii "application=Server" --data-ascii "event=megumi.eeleater.org" \
|
||||
--data-asci "description=$1" --data-asci "priority=0" \
|
||||
"https://www.notifymyandroid.com/publicapi/notify" -o "$out"
|
||||
|
||||
if test $(xml sel -t -m "nma/success" -v "@code" "$out") == "200"; then
|
||||
echo "Sent"
|
||||
exit 0
|
||||
else
|
||||
echo "Not sent: $(xml sel -t -m "nma/error" -v "." "$out")"
|
||||
exit 1
|
||||
fi
|
1
lib/completions
Submodule
1
lib/completions
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit fb28eaf1d6c3c697f1e9721ee9ec911b8d0118ec
|
1
lib/dasht
Submodule
1
lib/dasht
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 7ea915837f7ca3227fe6ca8e8420e1ec2ae638e0
|
1
lib/fzf
Submodule
1
lib/fzf
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 1896aa174877da2e5c6be35219a0a1abcdc4fbf1
|
1
lib/highlighting
Submodule
1
lib/highlighting
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit aac4a4423898fccbd1ab72c369ac09995a9139f1
|
1
lib/k
Submodule
1
lib/k
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 1fa7c039d40684d39cb225599bda4a86a62e765d
|
1
lib/ohmyzsh
Submodule
1
lib/ohmyzsh
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 0b4bba4ca2d6115dabfdb0852ce516e30765d2e6
|
1
lib/util
Submodule
1
lib/util
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 2d69cda49b1f15b3026f2de0b7178f63b37b8b33
|
28
zsh/aliases.d/cd.zsh
Normal file
28
zsh/aliases.d/cd.zsh
Normal file
|
@ -0,0 +1,28 @@
|
|||
# CD
|
||||
alias ..='cd ../'
|
||||
alias ...='cd ../../'
|
||||
alias ....='cd ../../../'
|
||||
alias .....='cd ../../../../'
|
||||
|
||||
# Go up [n] directories
|
||||
function up()
|
||||
{
|
||||
local cdir="$(pwd)"
|
||||
if [[ "${1}" == "" ]]; then
|
||||
cdir="$(dirname "${cdir}")"
|
||||
elif ! [[ "${1}" =~ ^[0-9]+$ ]]; then
|
||||
echo "Error: argument must be a number"
|
||||
elif ! [[ "${1}" -gt "0" ]]; then
|
||||
echo "Error: argument must be positive"
|
||||
else
|
||||
for i in {1..${1}}; do
|
||||
local ncdir="$(dirname "${cdir}")"
|
||||
if [[ "${cdir}" == "${ncdir}" ]]; then
|
||||
break
|
||||
else
|
||||
cdir="${ncdir}"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
cd "${cdir}"
|
||||
}
|
5
zsh/aliases.d/find.zsh
Normal file
5
zsh/aliases.d/find.zsh
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Du/Find
|
||||
alias dud='du -d 1 -h'
|
||||
alias duf='du -sh *'
|
||||
alias fd='find . -type d -name'
|
||||
alias ff='find . -type f -name'
|
4
zsh/aliases.d/grep.zsh
Normal file
4
zsh/aliases.d/grep.zsh
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Grep
|
||||
alias grep='grep --color'
|
||||
alias sgrep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS}'
|
||||
alias psg='ps aux | grep -v grep | grep'
|
5
zsh/aliases.d/interactive.zsh
Normal file
5
zsh/aliases.d/interactive.zsh
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Interactive
|
||||
alias rm='rm -i'
|
||||
alias cp='cp -i'
|
||||
alias mv='mv -i'
|
||||
|
10
zsh/aliases.d/list.zsh
Normal file
10
zsh/aliases.d/list.zsh
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Listing
|
||||
alias l='ls -lFh' #size,show type,human readable
|
||||
alias la='ls -lAFh' #long list,show almost all,show type,human readable
|
||||
alias lr='ls -tRFh' #sorted by date,recursive,show type,human readable
|
||||
alias lt='ls -ltFh' #long list,sorted by date,show type,human readable
|
||||
alias ll='ls -l' #long list
|
||||
alias ldot='ls -ld .*'
|
||||
alias lS='ls -1FSsh'
|
||||
alias lart='ls -1Fcart'
|
||||
alias lrt='ls -1Fcrt'
|
20
zsh/aliases.d/own.zsh
Normal file
20
zsh/aliases.d/own.zsh
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Command Line Foo
|
||||
alias clf='clf --color'
|
||||
|
||||
# The Fuck
|
||||
TF_ALIAS=fuck alias fuck='eval $(thefuck $(fc -ln -1 | tail -n 1)); fc -R'
|
||||
|
||||
# PClear
|
||||
pclear () {
|
||||
clear
|
||||
printf '\033[3J'
|
||||
}
|
||||
|
||||
# Termbin
|
||||
alias tb='nc termbin.com 9999'
|
||||
|
||||
# Make Dir and enter it
|
||||
mkcd() {
|
||||
mkdir $1 >/dev/null 2>&1
|
||||
[ -e $1 ] && cd $1
|
||||
}
|
7
zsh/aliases.d/stuff.zsh
Normal file
7
zsh/aliases.d/stuff.zsh
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Stuff
|
||||
alias h='history'
|
||||
alias hgrep="fc -El 0 | grep"
|
||||
alias j='jobs'
|
||||
alias p='ps -f'
|
||||
alias sortnr='sort -n -r'
|
||||
|
2
zsh/aliases.d/tail.zsh
Normal file
2
zsh/aliases.d/tail.zsh
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Tail
|
||||
alias t='tail -f'
|
54
zsh/aliases.d/transfer.zsh
Normal file
54
zsh/aliases.d/transfer.zsh
Normal file
|
@ -0,0 +1,54 @@
|
|||
#
|
||||
# Defines transfer alias and provides easy command line file and folder sharing.
|
||||
#
|
||||
# Authors:
|
||||
# Remco Verhoef <remco@dutchcoders.io>
|
||||
#
|
||||
|
||||
transfer() {
|
||||
# check arguments
|
||||
if [ $# -eq 0 ];
|
||||
then
|
||||
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# get temporarily filename, output is written to this file show progress can be showed
|
||||
tmpfile=$( mktemp -t transferXXX )
|
||||
|
||||
# upload stdin or file
|
||||
file=$1
|
||||
|
||||
if tty -s;
|
||||
then
|
||||
basefile=$(basename "$file" | sed -e 's/[^a-zA-Z0-9._-]/-/g')
|
||||
|
||||
if [ ! -e $file ];
|
||||
then
|
||||
echo "File $file doesn't exists."
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -d $file ];
|
||||
then
|
||||
# zip directory and transfer
|
||||
zipfile=$( mktemp -t transferXXX.zip )
|
||||
cd $(dirname $file) && zip -r -q - $(basename $file) >> $zipfile
|
||||
curl --progress-bar --upload-file "$zipfile" "https://transfer.sh/$basefile.zip" >> $tmpfile
|
||||
rm -f $zipfile
|
||||
else
|
||||
# transfer file
|
||||
curl --progress-bar --upload-file "$file" "https://transfer.sh/$basefile" >> $tmpfile
|
||||
fi
|
||||
else
|
||||
# transfer pipe
|
||||
curl --progress-bar --upload-file "-" "https://transfer.sh/$file" >> $tmpfile
|
||||
fi
|
||||
|
||||
# cat output link
|
||||
cat $tmpfile
|
||||
|
||||
# cleanup
|
||||
rm -f $tmpfile
|
||||
}
|
||||
|
71
zsh/zshrc
71
zsh/zshrc
|
@ -1,61 +1,52 @@
|
|||
# Oh My ZSH Path
|
||||
# Exports
|
||||
export ZSH=${HOME}/dotfiles/lib/ohmyzsh
|
||||
|
||||
# Oh My ZSH Theme
|
||||
ZSH_THEME="mortalscumbag"
|
||||
|
||||
# Disable Auto Update of Oh My ZSH
|
||||
DISABLE_AUTO_UPDATE="true"
|
||||
|
||||
# Go Path
|
||||
export GOPATH=${HOME}/go
|
||||
|
||||
# Path
|
||||
export PATH="${GOPATH}/bin:${HOME}/.gem/ruby/2.2.0/bin:${HOME}/dotfiles/lib/util:${HOME}/dotfiles/lib/dasht/bin:${PATH}"
|
||||
|
||||
# Dasht
|
||||
export PATH="${GOPATH}/bin:${HOME}/.gem/ruby/2.3.0/bin:${HOME}/dotfiles/lib/util:${HOME}/dotfiles/lib/bin:${HOME}/dotfiles/lib/dasht/bin:${PATH}:/opt/android-sdk/build-tools/26.0.0/"
|
||||
export DASHT_DOCSETS_DIR=$HOME/.local/share/Zeal/Zeal/docsets
|
||||
export EDITOR='nano'
|
||||
export TERM=linux
|
||||
|
||||
# Plugins
|
||||
plugins=(gem bundler composer git vagrant docker python)
|
||||
plugins+=(npm systemd systemadmin gitignore tmux extract)
|
||||
plugins+=(command-not-found colored-man-pages fabric ansible)
|
||||
|
||||
if [ $(uname -n) = "megumi" -o $(uname -n) = "kimari" -o $(uname -n) = "sayaka" ]; then
|
||||
plugins=(gem bundler git vagrant docker python ansible)
|
||||
plugins+=(systemd systemadmin tmux command-not-found extract)
|
||||
case $(uname -n) in
|
||||
"megumi")
|
||||
plugins+=(archlinux)
|
||||
fi
|
||||
if [ $(uname -n) = "mx" -o $(uname -n) = "git" ]; then
|
||||
;;
|
||||
"sayaka")
|
||||
plugins+=(archlinux)
|
||||
;;
|
||||
"git")
|
||||
plugins+=(debian)
|
||||
fi
|
||||
;;
|
||||
"test")
|
||||
plugins+=(debian)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Preferred editor for local and remote sessions
|
||||
export EDITOR='nano'
|
||||
|
||||
# Load Oh My ZSH
|
||||
# OMZ
|
||||
source ${ZSH}/oh-my-zsh.sh
|
||||
|
||||
# Fix home/end key at work
|
||||
bindkey "^[[1~" beginning-of-line
|
||||
bindkey "^[[4~" end-of-line
|
||||
# Fix MobaXterm Home/End key with ZSH
|
||||
bindkey '^[[H' beginning-of-line
|
||||
bindkey '^[[F' end-of-line
|
||||
|
||||
# Source k.sh
|
||||
source ${HOME}/dotfiles/lib/k/k.sh
|
||||
|
||||
# Shell Syntax Highlighter
|
||||
# Syntax Highlighting
|
||||
source ${HOME}/dotfiles/lib/highlighting/zsh-syntax-highlighting.zsh
|
||||
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets)
|
||||
|
||||
# Aliases
|
||||
for file in ${HOME}/dotfiles/zsh/aliases.d/*.zsh; do
|
||||
source $file
|
||||
done
|
||||
|
||||
# FZF
|
||||
[ -f ${HOME}/.fzf.zsh ] && source ${HOME}/.fzf.zsh
|
||||
|
||||
# Dircolors
|
||||
eval `dircolors ${HOME}/dotfiles/zsh/dircolors`
|
||||
|
||||
# Source Aliases
|
||||
source ${HOME}/dotfiles/zsh/aliases.zsh
|
||||
|
||||
# Source FZF
|
||||
[ -f ${HOME}/.fzf.zsh ] && source ${HOME}/.fzf.zsh
|
||||
|
||||
# Completions Path
|
||||
fpath=(${HOME}/dotfiles/lib/completions/src $fpath)
|
||||
|
||||
# Source local zshrc
|
||||
[ -f ${HOME}/local.zshrc ] && source ${HOME}/local.zshrc
|
||||
|
|
Loading…
Add table
Reference in a new issue