Add files from home directory.
commit
6fe586d33a
|
@ -0,0 +1,26 @@
|
|||
URxvt.saveLines: 1000
|
||||
URxvt.scrollBar: false
|
||||
URxvt.foreground: white
|
||||
URxvt.background: black
|
||||
URxvt.secondaryScroll: true
|
||||
#URxvt.font: xft:Inconsolata:pixelsize=16:antialias=true
|
||||
|
||||
URxvt.font: xft:fantasquesansmono nerd font:size=12
|
||||
|
||||
URxvt.perl-ext-common: default,matcher,resize-font,tabbed
|
||||
URxvt.urlLauncher: chromium
|
||||
URxvt.matcher.button: 1
|
||||
URxvt.tabbed.saveLines: 1000
|
||||
URxvt.tabbed.scrollBar: false
|
||||
URxvt.tabbed.tabbar-fg: 3
|
||||
URxvt.tabbed.tabbar-bg: 0
|
||||
URxvt.tabbed.tab-fg: 0
|
||||
URxvt.tabbed.tab-bg: 1
|
||||
URxvt.tabbed.secondaryScroll: true
|
||||
#URxvt.tabbed.font: xft:Bitstream Vera Sans Mono:pixelsize=12
|
||||
URxvt*inheritPixmap: true
|
||||
URxvt*shading: 70
|
||||
|
||||
URxvt.resize-font.smaller: C-Down
|
||||
URxvt.resize-font.bigger: C-Up
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
xterm*foreground: lightgrey
|
||||
xterm*background: black
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
xterm*background: black
|
||||
xterm*foreground: lightgrey
|
||||
xterm*selectToClipboard: true
|
||||
xterm*locale: true
|
||||
xterm*metaSendsEscape: true
|
||||
XTerm.vt100.faceName: fantasquesansmono nerd font:size=12
|
||||
XTerm.vt100.font: 7x13
|
||||
xterm*utf8: 1
|
||||
|
||||
uxterm*background: black
|
||||
uxterm*foreground: lightgrey
|
||||
uxterm*selectToClipboard: true
|
||||
uxterm*locale: true
|
||||
uxterm*metaSendsEscape: true
|
||||
UXTerm.vt100.faceName: fantasquesansmono nerd font:size=12
|
||||
UXTerm.vt100.font: 7x13
|
||||
|
||||
URxvt.saveLines: 1000
|
||||
URxvt.scrollBar: false
|
||||
URxvt.foreground: white
|
||||
URxvt.background: black
|
||||
URxvt.secondaryScroll: true
|
||||
URxvt.letterSpace: 0
|
||||
urxvt*termName: rxvt-unicode-256color
|
||||
urxvt*font: xft:fantasquesansmono nerd font:regular:size=12, xft:PowerlineSymbols:regular:size=12
|
||||
urxvt*imFont: xft:fantasquesansmono nerd font:regular:size=12, xft:PowerlineSymbols:regular:size=12
|
||||
urxvt*boldFont: xft:fantasquesansmono nerd font:bold:size=12, xft:PowerlineSymbols:bold:size=12
|
||||
urxvt*italicFont: xft:fantasquesansmono nerd font:italic:size=12, xft:PowerlineSymbols:italic:size=12
|
||||
urxvt*boldItalicFont: xft:fantasquesansmono nerd font:bold:italic:size=12, xft:PowerlineSymbols:bold:italic:size=12
|
||||
URxvt.perl-ext-common: default,matcher,resize-font,tabbed
|
||||
URxvt.matcher.button: 1
|
||||
URxvt.tabbed.saveLines: 1000
|
||||
URxvt.tabbed.scrollBar: false
|
||||
URxvt.tabbed.tabbar-fg: 3
|
||||
URxvt.tabbed.tabbar-bg: 0
|
||||
URxvt.tabbed.tab-fg: 0
|
||||
URxvt.tabbed.tab-bg: 1
|
||||
URxvt.tabbed.secondaryScroll: true
|
||||
URxvt*inheritPixmap: true
|
||||
URxvt*shading: 70
|
||||
URxvt.resize-font.smaller: C-Down
|
||||
URxvt.resize-font.bigger: C-Up
|
||||
|
|
@ -0,0 +1 @@
|
|||
echo "~/.bash_profile is executed"
|
|
@ -0,0 +1,12 @@
|
|||
#
|
||||
# ~/.bashrc
|
||||
#
|
||||
|
||||
echo "~/.bashrc is executed"
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
alias ls='ls --color=auto'
|
||||
|
||||
#export PS1="\[\033[38;5;12m\][\[$(tput sgr0)\]\[\033[38;5;10m\]\u\[$(tput sgr0)\]\[\033[38;5;12m\]@\[$(tput sgr0)\]\[\033[38;5;7m\]\h\[$(tput sgr0)\]\[\033[38;5;12m\]]\[$(tput sgr0)\]\[\033[38;5;15m\]: \[$(tput sgr0)\]\[\033[38;5;7m\]\w\[$(tput sgr0)\]\[\033[38;5;12m\]>\[$(tput sgr0)\]\[\033[38;5;10m\]\\$\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]"
|
|
@ -0,0 +1,248 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "~/.profile is being executed"
|
||||
|
||||
# just for this profile code
|
||||
PROFILE_DEBUG="${PROFILE_DEBUG:-0}"
|
||||
|
||||
# features
|
||||
PROFILE_ALIAS=${PROFILE_ALIAS:-1}
|
||||
PROFILE_BIN=${PROFILE_BIN:-1}
|
||||
PROFILE_DEFAULT_TERM=${PROFILE_DEFAULT_TERM:-1}
|
||||
PROFILE_GO=${PROFILE_GO:-1}
|
||||
PROFILE_GPG_PINENTRY_FIX=${PROFILE_GPG_PINENTRY_FIX:-1}
|
||||
PROFILE_IBUS=${PROFILE_IBUS:-1}
|
||||
PROFILE_KEYCHAIN=${PROFILE_KEYCHAIN:-0}
|
||||
PROFILE_NANO=${PROFILE_NANO:-1}
|
||||
PROFILE_NANO_EXPLICIT_WIDE=${PROFILE_NANO_EXPLICIT_WIDE:-0}
|
||||
PROFILE_NO_BEEPS=${PROFILE_NO_BEEPS:-1}
|
||||
PROFILE_NODE=${PROFILE_NODE:-1}
|
||||
PROFILE_PRINT_REBOOT_REQUIRED=${PROFILE_PRINT_REBOOT_REQUIRED:-0} # hacky, see below
|
||||
PROFILE_RUBY=${PROFILE_RUBY:-1}
|
||||
PROFILE_RUST=${PROFILE_RUST:-1}
|
||||
PROFILE_SSH_AGENT=${PROFILE_SSH_AGENT:-1}
|
||||
PROFILE_SYSTEMD=${PROFILE_SYSTEMD:-1}
|
||||
PROFILE_THEFUCK=${PROFILE_THEFUCK:-1}
|
||||
PROFILE_YARN=${PROFILE_YARN:-1}
|
||||
|
||||
##############################################################################
|
||||
# Profile helper code from here
|
||||
|
||||
PROFILE_DEBUG_SECTION_START_PREFIX="\\ "
|
||||
PROFILE_DEBUG_INDENT="${PROFILE_DEBUG_INDENT:- |}"
|
||||
PROFILE_DEBUG_SECTION_END_TEXT="/"
|
||||
|
||||
DEBUG_INDENT=0
|
||||
|
||||
section() {
|
||||
if [ $PROFILE_DEBUG -gt 0 ]; then
|
||||
echo "${PROFILE_DEBUG_SECTION_START_PREFIX}$(tput smso)$*$(tput rmso)"
|
||||
fi
|
||||
DEBUG_INDENT=$(expr $DEBUG_INDENT + 1)
|
||||
}
|
||||
|
||||
section_end() {
|
||||
if [ $PROFILE_DEBUG -gt 0 ]; then
|
||||
echo "$PROFILE_DEBUG_SECTION_END_TEXT"
|
||||
fi
|
||||
DEBUG_INDENT=$(expr $DEBUG_INDENT - 1)
|
||||
}
|
||||
|
||||
log() {
|
||||
if [ $PROFILE_DEBUG -gt 0 ]; then
|
||||
indent=""
|
||||
if [ $DEBUG_INDENT -gt 0 ]; then
|
||||
for _ in $(seq 0 $(( DEBUG_INDENT-1 )) ); do
|
||||
indent="${indent}${PROFILE_DEBUG_INDENT}"
|
||||
done
|
||||
fi
|
||||
echo "$*" | while IFS= read -r line; do
|
||||
echo "$indent" "$line"
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
# Actual profile code from here
|
||||
|
||||
section "thefuck"
|
||||
if [ $PROFILE_THEFUCK -gt 0 ]; then
|
||||
eval "$(thefuck --alias)"
|
||||
fi
|
||||
section_end
|
||||
|
||||
# Keychain (GPG/SSH keys)
|
||||
section "keychain"
|
||||
if [ $PROFILE_KEYCHAIN -gt 0 ]; then
|
||||
eval "$(keychain --eval -Q --quiet id_ed25519 id_rsa)"
|
||||
eval "$(keychain --eval -Q --quiet --agents ssh,gpg)"
|
||||
fi
|
||||
section_end
|
||||
|
||||
# Default terminal
|
||||
section "term"
|
||||
if [ $PROFILE_DEFAULT_TERM -gt 0 ] && [ -z "$TERM" ]; then
|
||||
export TERM=linux
|
||||
fi
|
||||
section_end
|
||||
|
||||
# ruby
|
||||
section "ruby"
|
||||
if [ $PROFILE_RUBY -gt 0 ]; then
|
||||
printf "%s:" "$(gem env path)" | while IFS= read -rd: dir; do
|
||||
PATH="$PATH:$dir/bin"
|
||||
done
|
||||
export PATH
|
||||
fi
|
||||
section_end
|
||||
|
||||
# gpg password via console
|
||||
section "gpg pinentry fix"
|
||||
if [ $PROFILE_GPG_PINENTRY_FIX -gt 0 ]; then
|
||||
log "Changing GPG_TTY to: $(tty)"
|
||||
GPG_TTY=$(tty)
|
||||
export GPG_TTY
|
||||
if [ ! -z "$SSH_CONNECTION" ]; then
|
||||
log "Detected SSH connection, making pinentry use curses instead of x11."
|
||||
export PINENTRY_USER_DATA="USE_CURSES=1"
|
||||
else
|
||||
log "All good with pinentry itself it seems."
|
||||
fi
|
||||
fi
|
||||
section_end
|
||||
|
||||
# rust
|
||||
section "rust"
|
||||
if [ $PROFILE_RUST -gt 0 ]; then
|
||||
PATH="$PATH:$HOME/.cargo/bin"
|
||||
export PATH
|
||||
fi
|
||||
section_end
|
||||
|
||||
# go
|
||||
section "go"
|
||||
if [ $PROFILE_GO -gt 0 ]; then
|
||||
GOPATH="$HOME/go"
|
||||
export GOPATH
|
||||
PATH="$PATH:$GOPATH/bin"
|
||||
export PATH
|
||||
fi
|
||||
section_end
|
||||
|
||||
# nano
|
||||
section "nano"
|
||||
if [ $PROFILE_NANO -gt 0 ]; then
|
||||
EDITOR="nano"
|
||||
|
||||
section "explicit -w"
|
||||
if [ $PROFILE_NANO_EXPLICIT_WIDE -gt 0 ]; then
|
||||
EDITOR="$EDITOR -w"
|
||||
fi
|
||||
section_end
|
||||
|
||||
export EDITOR
|
||||
fi
|
||||
section_end
|
||||
|
||||
# Yarn
|
||||
section "yarn"
|
||||
if [ $PROFILE_YARN -gt 0 ]; then
|
||||
log "Adding yarn to path..."
|
||||
PATH="$HOME/.yarn/bin:$PATH"
|
||||
export PATH
|
||||
fi
|
||||
section_end
|
||||
|
||||
# node
|
||||
section "node"
|
||||
if [ $PROFILE_NODE -gt 0 ]; then
|
||||
# priority over system path (npm, yarn)
|
||||
npm_config_prefix="$HOME/.node_modules"
|
||||
PATH="$npm_config_prefix/bin:$PATH"
|
||||
export npm_config_prefix
|
||||
export PATH
|
||||
fi
|
||||
section_end
|
||||
|
||||
# home bin
|
||||
section "home bin"
|
||||
if [ $PROFILE_BIN -gt 0 ]; then
|
||||
PATH="$HOME/bin:$PATH"
|
||||
export PATH
|
||||
fi
|
||||
section_end
|
||||
|
||||
# alias
|
||||
section "alias"
|
||||
if [ $PROFILE_ALIAS -gt 0 ]; then
|
||||
alias ssh-seidemannweb="ssh seiaufjt@cloud3-vm449.de-nserver.de"
|
||||
alias ssh-pidashboard="ssh -p 10022 -L 5900:localhost:5900 ck@remote.seidemann.com"
|
||||
alias docker-pidashboard="DOCKER_CERT_PATH=~/.docker/sw-pi-dashboard docker -H tcp://192.168.100.225:2375 --tlsverify"
|
||||
alias docker-home="docker -H tcp://172.20.3.34:2375"
|
||||
alias docker-winsrv2016-a="docker -H tcp://vm-winsrv2016-a:2375 --tlsverify"
|
||||
alias wttr="curl -H 'Accept-Language: de' wttr.in/Reutlingen"
|
||||
|
||||
swproject() {
|
||||
dir=$(find $HOME/src/gitlab.seidemann-web.com -type d -path "*/$1" -and -not -path '*/\.*' -print -quit)
|
||||
if [ -z "$dir" ]; then
|
||||
echo "Could not find project directory for $1." >&2
|
||||
return 1
|
||||
fi
|
||||
cd "$dir" || exit 1
|
||||
return 0
|
||||
}
|
||||
export swproject
|
||||
fi
|
||||
section_end
|
||||
|
||||
# NO BEEPS
|
||||
section "no beeps"
|
||||
if [ $PROFILE_NO_BEEPS -gt 0 ]; then
|
||||
if [ ! -z "$DISPLAY" ]; then
|
||||
xset -b
|
||||
fi
|
||||
fi
|
||||
|
||||
# IBUS
|
||||
section "ibus"
|
||||
if [ $PROFILE_IBUS -gt 0 ]; then
|
||||
export GTK_IM_MODULE=ibus
|
||||
export XMODIFIERS=@im=ibus
|
||||
export QT_IM_MODULE=ibus
|
||||
ibus-daemon -drx
|
||||
fi
|
||||
section_end
|
||||
|
||||
# pulseaudio
|
||||
section "pulseaudio"
|
||||
if pulseaudio --check; then
|
||||
log "PulseAudio is active."
|
||||
else
|
||||
log "PulseAudio is inactive."
|
||||
fi
|
||||
section_end
|
||||
|
||||
# SSH agent
|
||||
section "ssh-agent"
|
||||
if [ $PROFILE_SSH_AGENT -gt 0 ]; then
|
||||
if [ -z "$SSH_AUTH_SOCK" ]; then
|
||||
eval "$(ssh-agent -s)"
|
||||
fi
|
||||
fi
|
||||
section_end
|
||||
|
||||
# Reboot required? (hacky code)
|
||||
section "reboot required?"
|
||||
if [ $PROFILE_PRINT_REBOOT_REQUIRED -gt 0 ]; then
|
||||
if [ "$(pacman -Q linux | cut -d " " -f 2)" -gt "$(uname -r | sed 's,-zen,,' | sed 's,-lts,,')" ]; then
|
||||
echo "$(tput setaf 1)$(tput bold)Reboot required!"
|
||||
fi
|
||||
fi
|
||||
section_end
|
||||
|
||||
section "systemd"
|
||||
if [ $PROFILE_SYSTEMD -gt 0 ]; then
|
||||
log "Making sure systemctl knows about our newly built PATH..."
|
||||
log "$(systemctl --user import-environment PATH)"
|
||||
fi
|
||||
section_end
|
|
@ -0,0 +1 @@
|
|||
echo "~/.zprofile is being executed"
|
|
@ -0,0 +1,151 @@
|
|||
#!/bin/zsh
|
||||
|
||||
echo "~/.zshrc is being executed!"
|
||||
|
||||
ZSH_DEBUG="${ZSH_DEBUG:-0}"
|
||||
|
||||
ZSH_ALIAS=${ZSH_ALIAS:-1}
|
||||
ZSH_DEFAULT_TERM=${ZSH_DEFAULT_TERM:-1}
|
||||
ZSH_GPG_PINENTRY_FIX=${ZSH_GPG_PINENTRY_FIX:-1}
|
||||
ZSH_POWERLINE="${ZSH_POWERLINE:-1}"
|
||||
ZSH_PRINT_REBOOT_REQUIRED=${ZSH_PRINT_REBOOT_REQUIRED:-0} # hacky, see below
|
||||
ZSH_SYNTAX_HIGHLIGHTING="${ZSH_SYNTAX_HIGHLIGHTING:-1}"
|
||||
ZSH_THEFUCK=${ZSH_THEFUCK:-1}
|
||||
|
||||
ZSH_DEBUG_SECTION_START_PREFIX="\\ "
|
||||
ZSH_DEBUG_INDENT="${ZSH_DEBUG_INDENT:- |}"
|
||||
ZSH_DEBUG_SECTION_END_TEXT="/"
|
||||
|
||||
DEBUG_INDENT=0
|
||||
|
||||
section() {
|
||||
if [ $ZSH_DEBUG -gt 0 ]; then
|
||||
echo "${ZSH_DEBUG_SECTION_START_PREFIX}$(tput smso)$*$(tput rmso)"
|
||||
fi
|
||||
(( DEBUG_INDENT++ ))
|
||||
}
|
||||
|
||||
section_end() {
|
||||
if [ $ZSH_DEBUG -gt 0 ]; then
|
||||
echo "$ZSH_DEBUG_SECTION_END_TEXT"
|
||||
fi
|
||||
(( DEBUG_INDENT-- ))
|
||||
}
|
||||
|
||||
log() {
|
||||
if [ $ZSH_DEBUG -gt 0 ]; then
|
||||
indent=""
|
||||
if [ $DEBUG_INDENT -gt 0 ]; then
|
||||
for i in $(seq 0 $(( DEBUG_INDENT-1 )) ); do
|
||||
indent+="$ZSH_DEBUG_INDENT"
|
||||
done
|
||||
fi
|
||||
echo "$*" | while IFS=$'\n' read line; do
|
||||
echo "$indent" "$line"
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
# Powerline
|
||||
section "powerline"
|
||||
if [ $ZSH_POWERLINE -gt 0 ]; then
|
||||
log "Running powerline daemon..."
|
||||
log "$(powerline-daemon 2>&1)"
|
||||
|
||||
log "Finding powerline..."
|
||||
POWERLINE_DIR="$(pip show powerline-status --isolated | grep '^Location:' | awk '{print $2}')"
|
||||
log "Powerline repository root: $POWERLINE_DIR"
|
||||
|
||||
log "Disabling current prompt theme..."
|
||||
prompt off
|
||||
|
||||
log "Preparing zstyle..."
|
||||
autoload -Uz promptinit
|
||||
promptinit
|
||||
|
||||
log "Loading powerline zsh plugin..."
|
||||
source "$POWERLINE_DIR/powerline/bindings/zsh/powerline.zsh"
|
||||
|
||||
#prompt -s powerline
|
||||
fi
|
||||
section_end
|
||||
|
||||
# zsh-syntax-highlighting
|
||||
section "zsh-syntax-highlighting"
|
||||
if [ $ZSH_SYNTAX_HIGHLIGHTING -gt 0 ]; then
|
||||
log "Loading plugin..."
|
||||
source "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
||||
fi
|
||||
section_end
|
||||
|
||||
|
||||
section "thefuck"
|
||||
if [ $ZSH_THEFUCK -gt 0 ]; then
|
||||
eval "$(thefuck --alias)"
|
||||
fi
|
||||
section_end
|
||||
|
||||
|
||||
# Default terminal
|
||||
section "term"
|
||||
if [ $ZSH_DEFAULT_TERM -gt 0 ] && [ -z "$TERM" ]; then
|
||||
export TERM=linux
|
||||
fi
|
||||
section_end
|
||||
|
||||
|
||||
# gpg password via console
|
||||
section "gpg pinentry fix"
|
||||
if [ $ZSH_GPG_PINENTRY_FIX -gt 0 ]; then
|
||||
log "Changing GPG_TTY to: $(tty)"
|
||||
GPG_TTY=$(tty)
|
||||
export GPG_TTY
|
||||
if [ ! -z "$SSH_CONNECTION" ]; then
|
||||
log "Detected SSH connection, making pinentry use curses instead of x11."
|
||||
export PINENTRY_USER_DATA="USE_CURSES=1"
|
||||
else
|
||||
log "All good with pinentry itself it seems."
|
||||
fi
|
||||
fi
|
||||
section_end
|
||||
|
||||
|
||||
# alias
|
||||
section "alias"
|
||||
if [ $ZSH_ALIAS -gt 0 ]; then
|
||||
alias ssh-seidemannweb="ssh seiaufjt@cloud3-vm449.de-nserver.de"
|
||||
alias ssh-pidashboard="ssh -p 10022 -L 5900:localhost:5900 ck@remote.seidemann.com"
|
||||
alias docker-pidashboard="DOCKER_CERT_PATH=~/.docker/sw-pi-dashboard docker -H tcp://192.168.100.225:2375 --tlsverify"
|
||||
alias docker-home="docker -H tcp://172.20.3.34:2375"
|
||||
alias docker-winsrv2016-a="docker -H tcp://vm-winsrv2016-a:2375 --tlsverify"
|
||||
alias wttr="curl -H 'Accept-Language: de' wttr.in/Reutlingen"
|
||||
|
||||
swproject() {
|
||||
dir=$(find $HOME/src/gitlab.seidemann-web.com -type d -path "*/$1" -and -not -path '*/\.*' -print -quit)
|
||||
if [ -z "$dir" ]; then
|
||||
echo "Could not find project directory for $1." >&2
|
||||
return 1
|
||||
fi
|
||||
cd "$dir" || exit 1
|
||||
return 0
|
||||
}
|
||||
export swproject
|
||||
fi
|
||||
section_end
|
||||
|
||||
|
||||
# Reboot required? (hacky code)
|
||||
section "reboot required?"
|
||||
if [ $ZSH_PRINT_REBOOT_REQUIRED -gt 0 ]; then
|
||||
if [ "$(pacman -Q linux | cut -d " " -f 2)" -gt "$(uname -r | sed 's,-zen,,' | sed 's,-lts,,')" ]; then
|
||||
echo "$(tput setaf 1)$(tput bold)Reboot required!"
|
||||
fi
|
||||
fi
|
||||
section_end
|
||||
|
||||
|
||||
# print env
|
||||
section "Environment variables"
|
||||
log "$(export)"
|
||||
section_end
|
||||
|
Loading…
Reference in New Issue