diff options
Diffstat (limited to '.config/shell')
| -rw-r--r-- | .config/shell/.bashrc | 27 | ||||
| -rw-r--r-- | .config/shell/aliasrc | 39 | ||||
| -rw-r--r-- | .config/shell/profile | 22 | ||||
| -rw-r--r-- | .config/shell/shortcutsrc | 27 |
4 files changed, 115 insertions, 0 deletions
diff --git a/.config/shell/.bashrc b/.config/shell/.bashrc new file mode 100644 index 0000000..1a66eb0 --- /dev/null +++ b/.config/shell/.bashrc | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | # Source aliases and shortcuts | ||
| 2 | source ~/.config/shell/aliasrc | ||
| 3 | source ~/.config/shell/shortcutsrc | ||
| 4 | |||
| 5 | # History file settings | ||
| 6 | HISTSIZE= | ||
| 7 | HISTFILE="~/.cache/bash_history" | ||
| 8 | HISTFILESIZE= | ||
| 9 | HISTTIMEFORMAT="%a, %d %b %Y %T %z " | ||
| 10 | |||
| 11 | # Shell Options | ||
| 12 | set -o vi | ||
| 13 | shopt -s autocd | ||
| 14 | shopt -s histappend | ||
| 15 | shopt -s checkwinsize | ||
| 16 | |||
| 17 | # Prompt | ||
| 18 | color_prompt=yes | ||
| 19 | PS1='\[\033[1;30m\][\u@\h:]\[\033[1;31m\]\W\[\033[1;30m\]\[\033[0m\]\$ ' | ||
| 20 | |||
| 21 | if ! shopt -oq posix; then | ||
| 22 | if [ -f /usr/share/bash-completion/bash_completion ]; then | ||
| 23 | . /usr/share/bash-completion/bash_completion | ||
| 24 | elif [ -f /etc/bash_completion ]; then | ||
| 25 | . /etc/bash_completion | ||
| 26 | fi | ||
| 27 | fi | ||
diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc new file mode 100644 index 0000000..c1a2de9 --- /dev/null +++ b/.config/shell/aliasrc | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # Add color to commands | ||
| 4 | alias \ | ||
| 5 | diff="diff --color=auto" \ | ||
| 6 | dir="dir --color=auto" \ | ||
| 7 | vdir="vdir --color=auto" \ | ||
| 8 | egrep="egrep --color=auto" \ | ||
| 9 | fgrep="fgrep --color=auto" \ | ||
| 10 | grep="grep --color=auto" \ | ||
| 11 | ls="ls --group-directories-first --color=auto" | ||
| 12 | |||
| 13 | # Git | ||
| 14 | alias \ | ||
| 15 | g='git' \ | ||
| 16 | gd='git --git-dir=$HOME/dotfiles/ --work-tree=$HOME' | ||
| 17 | |||
| 18 | # Shorten other commands | ||
| 19 | alias \ | ||
| 20 | ports="ss -tuanp" \ | ||
| 21 | py="python3" \ | ||
| 22 | rb="/usr/sbin/reboot" \ | ||
| 23 | sd="/usr/sbin/shutdown now" \ | ||
| 24 | sx="startx" \ | ||
| 25 | svm="sudo systemctl start libvirtd" \ | ||
| 26 | v="vim" \ | ||
| 27 | yta="youtube-dl -f bestaudio --download-archive ~/media/youtube/archive" \ | ||
| 28 | ytv="youtube-dl -f bestvideo[height\<=1080]+bestaudio/best[height\<=1080] --download-archive ~/media/youtube/archive" \ | ||
| 29 | z="zathura" | ||
| 30 | |||
| 31 | # Start commands with specific options always | ||
| 32 | alias \ | ||
| 33 | calcurse="calcurse -D ~/.config/calcurse" \ | ||
| 34 | cp="cp -iv" \ | ||
| 35 | ffmpeg="ffmpeg -hide_banner" \ | ||
| 36 | mv="mv -iv" \ | ||
| 37 | rm="rm -Iv" | ||
| 38 | |||
| 39 | source $XDG_CONFIG_HOME/shell/private-aliasrc | ||
diff --git a/.config/shell/profile b/.config/shell/profile new file mode 100644 index 0000000..e806ba1 --- /dev/null +++ b/.config/shell/profile | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # Profile file - executed by login shells | ||
| 3 | |||
| 4 | # Add ~/.local/bin and all subdirectories to path | ||
| 5 | script_dirs="$(find ~/.local/bin/ -type d | grep -v "git")" | ||
| 6 | script_dirs="$(echo $script_dirs | tr ' ' ':')" | ||
| 7 | export PATH=$PATH:$script_dirs | ||
| 8 | |||
| 9 | export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' | ||
| 10 | export LESSHISTFILE='-' | ||
| 11 | export XDG_CACHE_HOME="$HOME/.cache" | ||
| 12 | export XDG_CONFIG_HOME="$HOME/.config" | ||
| 13 | export XDG_DATA_HOME="$HOME/.local/share" | ||
| 14 | export XINITRC="$XDG_CONFIG_HOME/x11/xinitrc" | ||
| 15 | export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc" | ||
| 16 | export ZDOTDIR="$XDG_CONFIG_HOME/zsh" | ||
| 17 | export BROWSER="firefox" | ||
| 18 | export EDITOR="vim" | ||
| 19 | export TERMINAL="urxvtc" | ||
| 20 | |||
| 21 | eval `ssh-agent -s` | ||
| 22 | [ "$(tty)" = "/dev/tty1" ] && startx "$XINITRC" | ||
diff --git a/.config/shell/shortcutsrc b/.config/shell/shortcutsrc new file mode 100644 index 0000000..b8486be --- /dev/null +++ b/.config/shell/shortcutsrc | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | alias \ | ||
| 3 | bin='cd $HOME/.local/bin' \ | ||
| 4 | brc='vim $HOME/.bashrc' \ | ||
| 5 | cac='cd $HOME/.cache' \ | ||
| 6 | cfa='vim $HOME/.config/shell/aliasrc' \ | ||
| 7 | cff='vim $XDG_CONFIG_HOME/fontconfig/fonts.conf' \ | ||
| 8 | cfg='cd $HOME/.config/' \ | ||
| 9 | cfs='vim $HOME/.config/shell/shortcutsrc' \ | ||
| 10 | dat='cd $HOME/.local/share' \ | ||
| 11 | dbc='cd $HOME/.local/src/dwmblocks; vim ~/.local/src/dwmblocks/blocks.h' \ | ||
| 12 | dwc='cd $HOME/.local/src/dwm; vim ~/.local/src/dwm/config.h' \ | ||
| 13 | dws='cd $HOME/.local/src/dwm' \ | ||
| 14 | gms='cd $HOME/.steam/debian-installation/steamapps/common' \ | ||
| 15 | h='cd $HOME' \ | ||
| 16 | hkc='vim $HOME/.config/sxhkd/sxhkdrc' \ | ||
| 17 | i3b='cd $HOME/.config/i3blocks/' \ | ||
| 18 | i3c='vim $HOME/.config/i3/config' \ | ||
| 19 | mus='cd ~/media/music' \ | ||
| 20 | pro='cd $HOME/programs/' \ | ||
| 21 | pic='cd $HOME/pictures/' \ | ||
| 22 | sbs='cd $HOME/.local/bin/statusbar' \ | ||
| 23 | src='cd $HOME/.local/src' \ | ||
| 24 | vrc='vim $HOME/.vim/vimrc' \ | ||
| 25 | xrc='vim $HOME/.config/x11/xinitrc' \ | ||
| 26 | xrs='vim $HOME/.config/x11/xresources' \ | ||
| 27 | zrc='vim $HOME/.config/zsh/.zshrc' | ||
