Compare commits

..

21 Commits
master ... work

Author SHA1 Message Date
Christoph J. Scherr 7d8296fdd9 sync home manually 2024-09-05 10:53:51 +02:00
Christoph J. Scherr c2e4395297 Merge branch 'master' into work 2024-09-05 10:50:43 +02:00
Christoph J. Scherr 1da8ff2df0 git-verify-commit 2024-09-05 10:50:10 +02:00
Christoph J. Scherr a4d695a224 sync nvim 2024-09-05 10:48:50 +02:00
Christoph J. Scherr b80e40a67f cool function 2024-07-25 16:07:52 +02:00
Christoph J. Scherr 0f329689e6 sync nvim and make py function better 2024-07-16 12:30:46 +02:00
Christoph J. Scherr 86e8c713ee aliases and EDITOR (once more) 2024-07-15 11:32:33 +02:00
Christoph J. Scherr 9ab90604b2 user-dirs 2024-07-15 11:32:33 +02:00
Christoph J. Scherr b116dc1f3e technology hates me 2024-07-15 11:30:39 +02:00
Christoph J. Scherr 4da8e3e53d zsh-autoquoter 2024-07-15 11:26:00 +02:00
Christoph J. Scherr 865b9d8b0c sync nvim 2024-07-15 10:46:50 +02:00
Christoph J. Scherr 72a7a754ca sync nvim 2024-07-04 17:15:47 +02:00
Christoph J. Scherr 5009af90a0 diesel zfunc 2024-07-04 09:59:12 +02:00
Christoph J. Scherr fb542c40d0 idk btop shit 2024-06-25 16:36:22 +02:00
Christoph J. Scherr 73d148b384 sync nvim 2024-06-25 16:36:13 +02:00
Christoph J. Scherr 54167b6b54 rebase gitconfig 2024-06-25 16:36:03 +02:00
Christoph J. Scherr 1243e0a041 update stuff and nala 2024-06-24 10:40:35 +02:00
Christoph J. Scherr eced044e1d pyenv 2024-06-24 10:40:22 +02:00
Christoph J. Scherr 5b687124a1 work: set correct gitconfig 2024-06-24 10:39:32 +02:00
Christoph J. Scherr 7c820e6a0f ignore things 2024-06-24 10:38:55 +02:00
Christoph J. Scherr 7db6f78867 work: adjust gitconfig 2024-06-24 10:35:41 +02:00
7 changed files with 18 additions and 68 deletions

View File

@ -197,4 +197,3 @@ 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 69118b111d4cc6dc78edd64a5a724b6871cccff4
Subproject commit f10141d2a1ddcfcc84c1ea51a372c410578c9220

View File

@ -4,12 +4,12 @@
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
#
XDG_DESKTOP_DIR="$HOME/Desktop/"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

10
.gitconfig Normal file
View File

@ -0,0 +1,10 @@
[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

View File

@ -1,16 +0,0 @@
#!/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,8 +6,6 @@
!.zprofile
!.vimrc
!.ideavimrc
!.githooks
!.githooks/**
!.config
!.config/nvim
!.config/nvim/**
@ -21,6 +19,7 @@
!.zsh
!.zsh/**
!.tmux.conf
!.gitconfig
!.local/fzf
!.local/fzf/**
!.local/nvim

48
.zshrc
View File

@ -1,6 +1,4 @@
### 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'
@ -33,7 +31,6 @@ 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
@ -45,9 +42,6 @@ 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" }
@ -67,7 +61,7 @@ function condac() {
# calculate on shell with `c 1+1`
function c() { printf "%s\n" "$@" | bc -l; }
# Call Python and execute multiple statements from args
function py() {
function py() {
python <<< "
from math import *
@ -83,12 +77,12 @@ def evaluate_and_print(code):
if __name__ == \"__main__\":
expr = '$*'
evaluate_and_print(expr)
"
"
}
function countlines() {
find . -type f -name "$1" -exec wc -l {} \; | awk '{print $0} {total += $1} END {print "Total lines:", total}'
}
function git-verify-commit () {
function git-verify-commit () {
git verify-commit $1
ret=$?
if [ $ret -ne 0 ]; then
@ -98,27 +92,6 @@ 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
@ -237,7 +210,6 @@ 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 ------------------------------------
@ -287,17 +259,3 @@ 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