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")"}'
|
$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; }
|
yell() { echo "$0: $*" >&2; }
|
||||||
die() { yell "$*"; exit 1; }
|
die() { yell "$*"; exit 1; }
|
||||||
try() { "$@" || die "failed while trying to: $*"; }
|
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
|
[[ $- != *i* ]] && return
|
||||||
|
|
||||||
# Source global definitions.
|
# Source global definitions.
|
||||||
if [ -f /etc/bashrc ]; then
|
[[ -f /etc/bashrc ]] && source /etc/bashrc
|
||||||
. /etc/bashrc
|
[[ -f $HOME/.environ ]] && . $HOME/.environ
|
||||||
fi
|
|
||||||
|
|
||||||
# Append to history, don't overwrite.
|
# Append to history, don't overwrite.
|
||||||
shopt -s histappend
|
shopt -s histappend
|
||||||
|
@ -16,11 +15,6 @@ shopt -s histappend
|
||||||
[[ -f $HOME/.bash_colors ]] && source "$HOME/.bash_colors"
|
[[ -f $HOME/.bash_colors ]] && source "$HOME/.bash_colors"
|
||||||
[[ -f $HOME/.bash_functions ]] && source "$HOME/.bash_functions"
|
[[ -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.
|
# Save working dir on every prompt.
|
||||||
export PROMPT_COMMAND='pwd > $HOME/.cwd'
|
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-$ "
|
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)
|
SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||||
export SSH_AUTH_SOCK
|
export SSH_AUTH_SOCK
|
||||||
fi
|
fi
|
||||||
GPG_TTY=$(tty)
|
export GPG_TTY=$(tty)
|
||||||
export GPG_TTY
|
|
||||||
gpg-connect-agent updatestartuptty /bye >/dev/null
|
gpg-connect-agent updatestartuptty /bye >/dev/null
|
||||||
|
|
|
@ -401,7 +401,7 @@ key = "Minus"
|
||||||
mods = "Control"
|
mods = "Control"
|
||||||
|
|
||||||
[mouse]
|
[mouse]
|
||||||
hide_when_typing = false
|
hide_when_typing = true
|
||||||
|
|
||||||
[[mouse.bindings]]
|
[[mouse.bindings]]
|
||||||
action = "PasteSelection"
|
action = "PasteSelection"
|
||||||
|
@ -415,7 +415,6 @@ save_to_clipboard = true
|
||||||
semantic_escape_chars = ",│`|:\"' ()[]{}<>\t"
|
semantic_escape_chars = ",│`|:\"' ()[]{}<>\t"
|
||||||
|
|
||||||
[shell]
|
[shell]
|
||||||
args = ["--login"]
|
|
||||||
program = "/bin/bash"
|
program = "/bin/bash"
|
||||||
|
|
||||||
[window]
|
[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