Compare commits

..

10 Commits
work ... master

7 changed files with 68 additions and 18 deletions

View File

@ -197,3 +197,4 @@ selected_battery = "Auto"
#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
log_level = "WARNING"

@ -1 +1 @@
Subproject commit f10141d2a1ddcfcc84c1ea51a372c410578c9220
Subproject commit 69118b111d4cc6dc78edd64a5a724b6871cccff4

View File

@ -8,8 +8,8 @@
XDG_DESKTOP_DIR="$HOME/Desktop/"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_PUBLICSHARE_DIR="$HOME/"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_MUSIC_DIR="$HOME/"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

View File

@ -1,10 +0,0 @@
[user]
email = Christoph.Scherr@newtec.de
name = Christoph J. Scherr
signingkey = Christoph.Scherr@newtec.de
[credential]
helper = store --file ~/.git-credentials
[commit]
gpgsign = false
[pull]
rebase = false

16
.githooks/pre-push Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
wips=$(git log --oneline --no-decorate | grep -i wip )
wips_n=$(echo "$wips" | wc -l)
LOCKFILE=/tmp/githook.allow_wip
if [[ ! -f $LOCKFILE && -n "$wips" ]]; then
# Allows us to read user input below, assigns stdin to keyboard
exec < /dev/tty
echo "contains $wips_n WIP commit(s)"
read -p "Really push? (Y/N) " -n 1 -r
case "$REPLY" in
y|Y ) echo -e "\ncontinuing..."; touch $LOCKFILE;;
* ) echo -e "\naborting."; exit 1;;
esac
fi

3
.gitignore vendored
View File

@ -6,6 +6,8 @@
!.zprofile
!.vimrc
!.ideavimrc
!.githooks
!.githooks/**
!.config
!.config/nvim
!.config/nvim/**
@ -19,7 +21,6 @@
!.zsh
!.zsh/**
!.tmux.conf
!.gitconfig
!.local/fzf
!.local/fzf/**
!.local/nvim

42
.zshrc
View File

@ -1,4 +1,6 @@
### ENVVARS
# zmodload zsh/zprof # for profiling, also uncomment last line
source "$HOME/.zprofile"
source "$HOME/.config/user-dirs.dirs"
export TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P'
@ -31,6 +33,7 @@ alias isotime='date +"%Y-%m-%dT%H:%M:%S%z"'
alias isodate='date +%Y-%m-%dT%H:%M:%S%z'
alias datefmt='date $DATEFMT'
alias gg=lazygit
alias sg=sourcegit
alias reload="source ~/.zshrc"
alias gls=/bin/ls
alias bat=batcat
@ -42,6 +45,9 @@ alias psa="ps -eadf"
alias fsize="stat --printf='%s'"
alias rg="rg --no-ignore"
alias home="cd $HOME"
alias ff=firefox
alias fd=fdfind
# alias shutdown="confirm shutdown"
### Functions
function largefiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(G|T|P|E)\s" }
@ -92,6 +98,27 @@ else
fi
return $ret
}
function confirm() {
bash -c "
echo \"To be executed: $@\";
read -p \"Confirm (Y/N): \" -n 1 -r;
case \"\$REPLY\" in
y|Y ) echo \"es\"; eval $@;;
n|N ) echo \"o\";;
* ) echo -e \"\ninvalid\";;
esac" $@
}
function confirm-important() {
echo "Write 'yes do as i say' to confirm that you REALLY want to do this: $@"
read
if [[ "${REPLY,,}" = "yes do as i say" ]]
then
eval $@
else
echo "aborting"
fi
}
### ---- zsh options -------------------------------------
setopt autocd
@ -210,6 +237,7 @@ fpath=($ZSH/plugins/zsh-completions/src $fpath)
ZAQ_PREFIXES+=('git commit( [^ ]##)# -[^ -]#m')
ZAQ_PREFIXES_GREEDY+=('py #')
ZAQ_PREFIXES_GREEDY+=('c #')
ZAQ_PREFIXES_GREEDY+=('countlines #')
### --- fzf Config ------------------------------------
@ -259,3 +287,17 @@ eval "$(pyenv virtualenv-init - zsh)"
zstyle ':completion:*' menu select
fpath+=~/.zfunc
export NVM_DIR="$HOME/.config/nvm"
# diese Scheiße läd so ewig, wer auch immer dachte dass das so eine gute idee
# ist gehört gefeuert. Das muss jeden Tag viele leute minuten kosten.
# [ -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
# on demand nvm
function load_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
}
alias nvim="load_nvm && nvim"
# zprof