diff options
author | davidpkj <davidpenkow1@gmail.com> | 2022-12-03 22:26:26 +0100 |
---|---|---|
committer | davidpkj <davidpenkow1@gmail.com> | 2022-12-03 22:26:26 +0100 |
commit | 5d4a749b7c51649bcd3953cd1686856408d08121 (patch) | |
tree | d0ddab7d5ee206e9b4403d4f177d942ec1608aa0 /bash | |
parent | 4f7ccffecdfa36c5e531654b8eec44199935d497 (diff) |
Merge in dotfiles
Diffstat (limited to 'bash')
-rw-r--r-- | bash/.bash_profile | 6 | ||||
-rwxr-xr-x | bash/.bashrc | 37 |
2 files changed, 43 insertions, 0 deletions
diff --git a/bash/.bash_profile b/bash/.bash_profile new file mode 100644 index 0000000..fe4ba32 --- /dev/null +++ b/bash/.bash_profile @@ -0,0 +1,6 @@ +# Startx +if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then + exec startx +fi + +[[ -f ~/.bashrc ]] && . ~/.bashrc diff --git a/bash/.bashrc b/bash/.bashrc new file mode 100755 index 0000000..6fbbaaf --- /dev/null +++ b/bash/.bashrc @@ -0,0 +1,37 @@ +# If not running interactively, don't do anything +[[ $- != *i* ]] && return + +# Define function for easy script sourcing +source_if_present () { [ -f "$1" ] && source $1 ; } + +# Load environment variables +source_if_present "$HOME/.config/env" + +# Load wal colors +source_if_present "$HOME/.cache/wal/colors.sh" +# Support TTYs +source_if_present "$HOME/.cache/wal/colors-tty.sh" + +# Load bash completion +source_if_present "/usr/share/bash-completion/bash_completion" + +# Enable tab to cycle-complete +bind '"\t":menu-complete' + +# Set aliases +alias lf='lfub' +alias vim='nvim' +alias ll="ls -lah" +alias tlmgr='tllocalmgr' +alias ls='ls --color=auto' +alias ip='ip --color=auto' +alias grep='grep --color=auto' +alias diff='diff --color=auto' +alias dmenu="dmenu -nb '$color0' -nf '$color15' -sb '$color1' -sf '$color0'" + +# Set prompt +PS1='[ \001\e[0;31m\002\u\001\e[0m\002@\001\e[0;32m\002\h\001\e[0m\002 ] \001\e[0;33m\002\W\001\e[0m\002 \$ ' + +# Enable wal colors +[ -f "$HOME/.cache/wal/sequences" ] && (cat "$HOME/.cache/wal/sequences" &) + |