2024-01-18 09:22:38 +01:00
|
|
|
#!/bin/bash
|
2024-05-06 22:55:03 +02:00
|
|
|
|
2024-05-07 00:44:37 +02:00
|
|
|
# deaktiviere alias von ll, wird von mir explizit gesetzt
|
|
|
|
unalias ll 2>/dev/null
|
|
|
|
|
2024-05-06 23:00:05 +02:00
|
|
|
# source extra files
|
2024-05-28 20:16:14 +02:00
|
|
|
source "${HOME}/dotfiles/.bash_aliases"
|
|
|
|
source "${HOME}/dotfiles/.bash_functions"
|
|
|
|
source "${HOME}/dotfiles/.bash_ps1"
|
2024-05-06 22:55:03 +02:00
|
|
|
|
2024-05-06 23:00:05 +02:00
|
|
|
### PATH
|
|
|
|
# add my scripts to PATH
|
2024-12-23 09:43:55 +01:00
|
|
|
PATH=$PATH:"${HOME}/dotfiles/scripts:${HOME}/.local/bin"
|
2024-01-18 09:22:38 +01:00
|
|
|
|
2024-09-13 19:06:40 +02:00
|
|
|
### tmux auto attach
|
|
|
|
# Check if the user ID is not 0 (root)
|
|
|
|
if [ "$EUID" -ne 0 ]; then
|
|
|
|
# then auto attach
|
|
|
|
if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then
|
|
|
|
tmux attach -t default || tmux new -s default
|
2024-01-18 09:22:38 +01:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
### keychain
|
|
|
|
eval "$(keychain -q --eval --timeout 60 --agents ssh,gpg)"
|
|
|
|
export GPG_TTY=$(tty)
|
|
|
|
|
|
|
|
### Praktische Dinge
|
|
|
|
# Deaktiviere FlowControl
|
|
|
|
# https://unix.stackexchange.com/questions/332791/how-to-permanently-disable-ctrl-s-in-terminal
|
|
|
|
stty -ixon
|
|
|
|
|
|
|
|
# farben fur manpages
|
|
|
|
# https://opensource.com/article/18/5/bash-tricks
|
|
|
|
export LESS_TERMCAP_mb=$'\E[01;31m'
|
|
|
|
export LESS_TERMCAP_md=$'\E[01;33m'
|
|
|
|
export LESS_TERMCAP_me=$'\E[0m'
|
|
|
|
export LESS_TERMCAP_se=$'\E[0m'
|
|
|
|
export LESS_TERMCAP_so=$'\E[01;42;30m'
|
|
|
|
export LESS_TERMCAP_ue=$'\E[0m'
|
|
|
|
export LESS_TERMCAP_us=$'\E[01;36m'
|
|
|
|
|
|
|
|
# bash history bei mehreren Session
|
|
|
|
shopt -s histappend
|
|
|
|
|
2024-08-12 15:20:45 +02:00
|
|
|
# bash History Zeitstempel am Anfang der Zeile
|
2024-01-18 09:22:38 +01:00
|
|
|
export HISTTIMEFORMAT='[%F_%T] '
|
2024-08-12 15:20:45 +02:00
|
|
|
# https://askubuntu.com/questions/15926/how-to-avoid-duplicate-entries-in-bash-history
|
|
|
|
export HISTCONTROL=ignoreboth:erasedups
|
2024-01-18 09:22:38 +01:00
|
|
|
|
|
|
|
# typo bei cd entfernen
|
|
|
|
shopt -s cdspell
|
|
|
|
|
|
|
|
# less mit maus scrollen
|
|
|
|
export LESS='--mouse --wheel-lines=3 eFRX'
|