From e47a92456cd3ff3cd57d66ca24de2d8976f9242c Mon Sep 17 00:00:00 2001 From: Thorsten Töpper Date: Thu, 19 Jun 2025 00:57:11 +0200 Subject: screen, vim, zsh: cleanup & reformat --- screenrc | 6 +++--- vimrc | 2 +- zshrc | 32 +++++++++++++++++--------------- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/screenrc b/screenrc index f73677f..7ba9987 100644 --- a/screenrc +++ b/screenrc @@ -29,7 +29,7 @@ attrcolor b ".I" termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' #termcapinfo xterm|xterms|xs|rxvt ti@:te@ # erase background with current bg color -defbce "on" +defbce "on" defutf8 on vbell off @@ -82,10 +82,10 @@ msgwait 1 #bind t screen -t top 0 htop #bind v screen -t vim 1 vim -bind r screen -t rtorrent 2 rtorrent +bind r screen -t rtorrent 2 rtorrent #screen -t zsh 0 zsh -#screen -t zsh 1 zsh +#screen -t zsh 1 zsh #use F7 and F8 to cycle trough the windows bindkey -k k7 prev bindkey -k k8 next diff --git a/vimrc b/vimrc index e70412e..0dd325c 100644 --- a/vimrc +++ b/vimrc @@ -35,7 +35,7 @@ set directory=/tmp " Make mouse behave the same across all terminals set mouse-=a " don't store .viminfo in $HOME -set viminfo+=n/tmp/.viminfo_atsu +set viminfo+=n/tmp/.viminfo_$USER " Highlighting for whitespaces highlight ExtraWhitespace ctermbg=red guibg=red diff --git a/zshrc b/zshrc index f6e2c1a..beb5797 100644 --- a/zshrc +++ b/zshrc @@ -1,31 +1,26 @@ setopt append_history #unsetopt share_history export GOPATH=~/go -#export PATH=$(ruby -rubygems -e "puts Gem.user_dir")/bin:/home/atsutane/bin:/home/atsutane/go/bin:$PATH:/opt/bsvc/usr/bin -export PATH=/home/atsutane/bin:/home/atsutane/go/bin:$PATH:/opt/bsvc/usr/bin +export PATH=~/bin:~/go/bin:$PATH:/opt/bsvc/usr/bin export OOO_FORCE_DESKTOP=gnome export KEYID="39F880E50E49A4D11341E8F939E4F17F295AFBF4" export GPGKEYID="295AFBF4" export VISUAL=vim -#export JAVA_HOME=/usr/lib/jvm/java-7-openjdk -export MSF_DATABASE_CONFIG=/home/atsutane/.armitage_dbconfig.yml export DEBUGINFOD_URLS="https://europe.mirror.pkgbuild.com/" # Edit a temporary file with my template for a C proof-of-concept alias cpoc='cd /tmp && FN=$(mktemp --suffix=.c) && cp ~/.poc-template.c $FN && vim $FN && echo "Proof-of-concept stored in $FN"' alias rm='nocorrect rm -I' -alias scr='screen -x || screen' -alias cscope='cscope -R' alias ltr='ls -ltr --color' if [ -f '/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh' ]; then - source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh + source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh fi if [ -f '/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh' ]; then - source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh + source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh fi @@ -39,21 +34,28 @@ function aurclone () { } function add-to-build-req-repo() { - if [ ! -f "${1}" ]; then - return - fi - _pkgname=`basename "${1}"` - mv ${1} /mnt/code/repo_build_requirements/x86_64/ - repo-add /mnt/code/repo_build_requirements/x86_64/build_requirements.db.tar.xz "/mnt/code/repo_build_requirements/x86_64/${_pkgname}" + if [ ! -f "${1}" ]; then + return + fi + _pkgname=`basename "${1}"` + mv ${1} /mnt/code/repo_build_requirements/x86_64/ + repo-add /mnt/code/repo_build_requirements/x86_64/build_requirements.db.tar.xz "/mnt/code/repo_build_requirements/x86_64/${_pkgname}" } function parse_git_branch() { print "%{\e[1;34m%}$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/')%{\e[0m%}\n" } +function remove_whitespaces_at_eol() { + if [ -z "${1}" ]; then + return + fi + sed -i -E 's/\s+$//' $* +} + #Run ssh-agent http://mah.everybody.org/docs/ssh -SSH_ENV="/tmp/.ssh_atsu_environment" +SSH_ENV="/tmp/.ssh_${USER}_environment" function start_agent { echo "Initialising new SSH agent..." /usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}" -- cgit v1.2.3-70-g09d2