Stop using login shell, reconfigure bash
This commit is contained in:
parent
ac8cccb7c6
commit
da7bdbebbd
6 changed files with 32 additions and 40 deletions
|
@ -9,14 +9,6 @@ function parse_branch {
|
|||
$scmexe branch 2> /dev/null | awk '/^*/{$1="";sub(/^ /, "");print "("$0")"}'
|
||||
}
|
||||
|
||||
function appendpath {
|
||||
if ! [[ "$PATH" =~ $1 ]]
|
||||
then
|
||||
PATH="$1:$PATH"
|
||||
fi
|
||||
export PATH
|
||||
}
|
||||
|
||||
yell() { echo "$0: $*" >&2; }
|
||||
die() { yell "$*"; exit 1; }
|
||||
try() { "$@" || die "failed while trying to: $*"; }
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
# vim: set ft=sh:
|
||||
|
||||
EDITOR=nvim
|
||||
GIT_EDITOR=$EDITOR
|
||||
HISTCONTROL=ignoredups:erasedups # Avoid duplicates
|
||||
HISTFILESIZE=100000000 # big big history
|
||||
HISTSIZE=100000000 # big big history
|
||||
LIBVIRT_DEFAULT_URI='qemu:///system'
|
||||
MANWIDTH=80
|
||||
RIPGREP_CONFIG_PATH=$HOME/.ripgreprc
|
||||
SYSTEMD_EDITOR=$EDITOR
|
||||
TERM=alacritty
|
||||
|
||||
PYTHONDONTWRITEBYTECODE=1
|
||||
PYTHONUSERBASE=$HOME/.env/python
|
||||
|
||||
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
||||
|
||||
# opam configuration
|
||||
test -r /home/vladan/.opam/opam-init/init.sh && . /home/vladan/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
|
|
@ -4,9 +4,8 @@
|
|||
[[ $- != *i* ]] && return
|
||||
|
||||
# Source global definitions.
|
||||
if [ -f /etc/bashrc ]; then
|
||||
. /etc/bashrc
|
||||
fi
|
||||
[[ -f /etc/bashrc ]] && source /etc/bashrc
|
||||
[[ -f $HOME/.environ ]] && . $HOME/.environ
|
||||
|
||||
# Append to history, don't overwrite.
|
||||
shopt -s histappend
|
||||
|
@ -16,11 +15,6 @@ shopt -s histappend
|
|||
[[ -f $HOME/.bash_colors ]] && source "$HOME/.bash_colors"
|
||||
[[ -f $HOME/.bash_functions ]] && source "$HOME/.bash_functions"
|
||||
|
||||
# Local user bins
|
||||
appendpath $HOME/.local/bin
|
||||
appendpath $HOME/.cargo/bin
|
||||
appendpath $HOME/.env/python/bin
|
||||
|
||||
# Save working dir on every prompt.
|
||||
export PROMPT_COMMAND='pwd > $HOME/.cwd'
|
||||
export PS1="${Yellow}\d \A ${Off}${Green}\u@\h: ${Off}\w ${Red}\$(parse_branch git)${BRed}\$(parse_branch fossil)${Off}\n-$ "
|
||||
|
@ -35,6 +29,5 @@ if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
|||
SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
export SSH_AUTH_SOCK
|
||||
fi
|
||||
GPG_TTY=$(tty)
|
||||
export GPG_TTY
|
||||
export GPG_TTY=$(tty)
|
||||
gpg-connect-agent updatestartuptty /bye >/dev/null
|
||||
|
|
|
@ -401,7 +401,7 @@ key = "Minus"
|
|||
mods = "Control"
|
||||
|
||||
[mouse]
|
||||
hide_when_typing = false
|
||||
hide_when_typing = true
|
||||
|
||||
[[mouse.bindings]]
|
||||
action = "PasteSelection"
|
||||
|
@ -415,7 +415,6 @@ save_to_clipboard = true
|
|||
semantic_escape_chars = ",│`|:\"' ()[]{}<>\t"
|
||||
|
||||
[shell]
|
||||
args = ["--login"]
|
||||
program = "/bin/bash"
|
||||
|
||||
[window]
|
||||
|
|
19
dotfiles/.environ
Normal file
19
dotfiles/.environ
Normal file
|
@ -0,0 +1,19 @@
|
|||
# vim: set ft=sh:
|
||||
|
||||
export EDITOR=nvim
|
||||
export GIT_EDITOR=$EDITOR
|
||||
export HISTCONTROL=ignoredups:erasedups # Avoid duplicates
|
||||
export HISTFILESIZE=100000000 # big big history
|
||||
export HISTSIZE=100000000 # big big history
|
||||
export LIBVIRT_DEFAULT_URI='qemu:///system'
|
||||
export MANWIDTH=80
|
||||
export RIPGREP_CONFIG_PATH=$HOME/.ripgreprc
|
||||
export SYSTEMD_EDITOR=$EDITOR
|
||||
export TERM=alacritty
|
||||
export PYTHONDONTWRITEBYTECODE=1
|
||||
export TZ="Europe/Belgrade"
|
||||
|
||||
# Local user bins
|
||||
add_path() case :$PATH: in *:$1:*) ;; *) PATH=$1:$PATH;; esac
|
||||
add_path $HOME/.local/bin
|
||||
add_path $HOME/.cargo/bin
|
9
dotfiles/.profile
Normal file
9
dotfiles/.profile
Normal file
|
@ -0,0 +1,9 @@
|
|||
# vim: set ft=sh:
|
||||
|
||||
[ -f $HOME/.environ ] && source $HOME/.environ
|
||||
[ $BASH == "/usr/bin/bash" ] && source $HOME/.bashrc
|
||||
|
||||
MOZ_ENABLE_WAYLAND=1
|
||||
XDG_CURRENT_DESKTOP=sway
|
||||
SDL_VIDEODRIVER=wayland
|
||||
_JAVA_AWT_WM_NONREPARENTING=1
|
Loading…
Reference in a new issue