From 0186f084b89a49932c834a7f18a17315aa3de999 Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Thu, 6 Oct 2022 19:30:05 +0200 Subject: Moved non-standard rcs to custom folder. --- stow/rcs/.bash_aliases | 54 -------------------- stow/rcs/.bash_vars | 105 -------------------------------------- stow/rcs/.bashrc | 5 +- stow/rcs/.config/rcs/bash_aliases | 56 ++++++++++++++++++++ stow/rcs/.config/rcs/bash_vars | 102 ++++++++++++++++++++++++++++++++++++ stow/rcs/.profile | 8 ++- 6 files changed, 167 insertions(+), 163 deletions(-) delete mode 100644 stow/rcs/.bash_aliases delete mode 100644 stow/rcs/.bash_vars create mode 100644 stow/rcs/.config/rcs/bash_aliases create mode 100644 stow/rcs/.config/rcs/bash_vars (limited to 'stow') diff --git a/stow/rcs/.bash_aliases b/stow/rcs/.bash_aliases deleted file mode 100644 index a4907f7..0000000 --- a/stow/rcs/.bash_aliases +++ /dev/null @@ -1,54 +0,0 @@ -# General abreviations -alias r='tmux rename-window ranger; ranger; tmux rename-window bash' -alias v='nvim' -alias vim='nvim' -alias cdf='cd "$(fzfPath.sh)"' -alias cdr='route="$(fzfPath.sh)" && [ -n "$route" ] && ranger "$route"' -alias mail='mail.sh' -alias ls='ls -hN --color=auto --group-directories-first' -alias cp='cp -iv' -alias grep='grep --color=auto' -alias fgrep='fgrep --color=auto' -alias egrep='egrep --color=auto' -alias nb='newsboat' -alias z='cd ~/docs/zettelkasten && vim "$(./porTema.sh)"' -alias zn='cd ~/docs/zettelkasten && vim "$(./nuevo.sh)"' -alias youtube-dl='yt-dlp' -alias cal='cal -m' - -# git -alias gs='git status' -alias gd='git diff' -alias ga='git add' -alias gc='git commit' -alias gp='git push' -alias gl='git log --oneline -n 10' -alias glg='git log --oneline --graph' - -# config files -alias cb="vim ~/.bashrc" -alias cba="vim ~/.bash_aliases" -alias cx="vim ~/.Xresources" -alias ci3="vim ~/.config/i3/config" -alias ci3b="vim ~/.config/i3blocks/config" -alias csx="vim ~/.config/sxhkd/sxhkdrc" -alias cbs="vim ~/.config/bspwm/bspwmrc" -alias csxbs="vim ~/.config/sxhkd/sxhkdrcbspc" -alias cdunst="vim ~/.config/dunst/dunstrc" -alias cv="vim ~/.vimrc" -alias cqb="vim ~/.config/qutebrowser/config.py" -alias cr="vim ~/.config/ranger/rc.conf" -alias crifle="vim ~/.config/ranger/rifle.conf" -alias ccmus="vim ~/.config/cmus/autosave" -alias cg="vim ~/.gitconfig" -alias cnb="vim ~/.config/newsboat/config" -alias cnbu="vim ~/.config/newsboat/urls" -alias ctmux="vim ~/.tmux.conf" - -alias upgrade="sudo pacman -Syu" - -alias starwars="telnet towel.blinkenlights.nl" -alias adormir="mpv -vo caca ~/videos/Adormir.mp4 && clear 2>/dev/null" -alias adormirloop="mpv --loop-file -vo caca ~/videos/Adormir.mp4 2>/dev/null && clear" -alias nintendos="mpv -vo caca https://www.youtube.com/watch?v=hYNcJj2QDhk 2>/dev/null" -alias netris="ssh netris.rocketnine.space" diff --git a/stow/rcs/.bash_vars b/stow/rcs/.bash_vars deleted file mode 100644 index 61bdb8d..0000000 --- a/stow/rcs/.bash_vars +++ /dev/null @@ -1,105 +0,0 @@ -# $HOME/.bash_vars: Non-standard file for environment variables agruppation. - -########### -# General # -########### - -export XDG_CONFIG_HOME="$HOME/.config" -export XDG_DATA_HOME="$HOME/.local/share" - -export EDITOR="nvim" -export TERM="rxvt-256color" -export TERMINAL="urxvt" -export BROWSER="qutebrowser" -export READER="zathura" -export VIEWER="sxiv" - -export PLANTUML="$HOME/programs/plantUML/plantuml.jar" - -export LEDGER_FILE="$HOME/docs/ledger.dat" -export REMOTE_LEDGER_FILE="taamas@taamas.xyz:data/ledger.dat" - -export CONFIG_VOL_CHANGE="1" -export CONFIG_BIG_VOL_CHANGE="10" - -export CONFIG_BRIGHT_CHANGE="4" -export CONFIG_BIG_BRIGHT_CHANGE="60" - -export CONFIG_DIC_ES="/usr/share/dict/spanish" -export CONFIG_DIC_EN="/usr/share/dict/british" -export CONFIG_DIC_PL="/usr/share/dict/słowa.txt" - -export CONFIG_FOLDER_WP="$HOME/media/images/wallpapers" -export CONFIG_FOLDER_RANDOMWP="$HOME/media/images/wallpapers/shufs/current" -export CONFIG_WPLIST="$HOME/.local/share/wpHistory.dat" -export CONFIG_WPPOINTER="/tmp/wppointer" - -export CONFIG_FOLDER_SCREENSHOTS="$HOME/media/images/screenshots" - -export CONFIG_FOLDER_LOGS="$HOME/logs" - -export CONFIG_WIFI_DEV="wlp2s0" -export CONFIG_ETH_DEV="" - -export CONFIG_BATTERY="BAT1" -export CONFIG_SENSORS_TEMP_REGEX="^Package" -export CONFIG_SENSORS_TEMP_COL="4" - -export CONFIG_FOLDER_DISROOT_INBOX="$HOME/.mail/disroot/INBOX/new" -export CONFIG_FOLDER_GMAIL_INBOX="$HOME/.mail/gmail/[Gmail]/INBOX/new" -export CONFIG_FOLDER_UNIOVI_INBOX="$HOME/.mail/uniovi/INBOX/new" - -# export ARDUINO_DIR="/usr/share/arduino" -# export ARDMK_DIR="/usr/share/arduino" -# export AVR_TOOLS_DIR="/usr" - -# Colors for grep -export GREP_COLORS='ms=04;32;49:mc=04;32;49:sl=:cx=:fn=01;34;49:ln=34:bn=34:se=36' - -# Colors for gcc -export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' - -# Colors for less -export LESS_TERMCAP_mb=$'\E[01;31m' -export LESS_TERMCAP_md=$(tput bold; tput setaf 14) -export LESS_TERMCAP_me=$'\E[0m' -export LESS_TERMCAP_so=$(tput setab 2; tput setaf 0) -export LESS_TERMCAP_se=$'\E[0m' -export LESS_TERMCAP_us=$(tput smul; tput setaf 3) -export LESS_TERMCAP_ue=$'\E[0m' - -# Set LS_COLORS (enable color support of ls and others) -if [ -x /usr/bin/dircolors ]; then - dircolorsFile="$HOME/.config/dircolors" - [ -r "$dircolorsFile" ] && - eval "$(dircolors -b $dircolorsFile)" || - eval "$(dircolors -b)" -fi - -# make less more friendly for non-text input files, see lesspipe(1) -[ -x "/usr/bin/lesspipe.sh" ] && eval "$(SHELL=/bin/sh lesspipe.sh)" - -######### -# $PATH # -######### - -# Add scripts folder plus its direct subfolders to path and at the beginning -for dir in $(find "$HOME/scripts" -type d | grep -v '/\.'); do - PATH="${dir}:${PATH}" -done - -# Add java bins folder to path -export JAVA_HOME="/usr/lib/jvm/default/" -PATH="${PATH}:${JAVA_HOME}/bin" - -# Add ruby bins (gems) folder to path -PATH="${PATH}:$(ruby -e 'puts Gem.user_dir')/bin" - -# Add cargo bins folder to path -PATH="${PATH}:${HOME}/.cargo/bin" - -# Add pip local bins to path -PATH="${PATH}:${HOME}/.local/bin" - -# Export final PATH -export PATH diff --git a/stow/rcs/.bashrc b/stow/rcs/.bashrc index 9a70ccd..ea22e1f 100644 --- a/stow/rcs/.bashrc +++ b/stow/rcs/.bashrc @@ -48,8 +48,9 @@ wd="$pur" umode="$blue" PS1="${keys}[${wd}\u${keys}@${wd}\h${keys}]${wd}\w${umode}\$${def} " -# Aliases are defined in $HOME/.bash_aliases for convenience. -[ -f "$HOME/.bash_aliases" ] && . "$HOME/.bash_aliases" +# Source general and device specific aliases +[ -f "$XDG_CONFIG_HOME/rcs/bash_aliases" ] && . "$XDG_CONFIG_HOME/rcs/bash_aliases" +[ -f "$XDG_CONFIG_HOME/rcs/device_aliases" ] && . "$XDG_CONFIG_HOME/rcs/device_aliases" # fzf goodies . /usr/share/fzf/key-bindings.bash diff --git a/stow/rcs/.config/rcs/bash_aliases b/stow/rcs/.config/rcs/bash_aliases new file mode 100644 index 0000000..624edae --- /dev/null +++ b/stow/rcs/.config/rcs/bash_aliases @@ -0,0 +1,56 @@ +# $XDG_CONFIG_HOME/rcs/bash_aliases: Non-standard file for aliases agruppation. + +# General abreviations +alias r='tmux rename-window ranger; ranger; tmux rename-window bash' +alias v='nvim' +alias vim='nvim' +alias cdf='cd "$(fzfPath.sh)"' +alias cdr='route="$(fzfPath.sh)" && [ -n "$route" ] && ranger "$route"' +alias mail='mail.sh' +alias ls='ls -hN --color=auto --group-directories-first' +alias cp='cp -iv' +alias grep='grep --color=auto' +alias fgrep='fgrep --color=auto' +alias egrep='egrep --color=auto' +alias nb='newsboat' +alias z='cd ~/docs/zettelkasten && vim "$(./porTema.sh)"' +alias zn='cd ~/docs/zettelkasten && vim "$(./nuevo.sh)"' +alias youtube-dl='yt-dlp' +alias cal='cal -m' + +# git +alias gs='git status' +alias gd='git diff' +alias ga='git add' +alias gc='git commit' +alias gp='git push' +alias gl='git log --oneline -n 10' +alias glg='git log --oneline --graph' + +# config files +alias cb="vim ~/.bashrc" +alias cba="vim ~/.bash_aliases" +alias cx="vim ~/.Xresources" +alias ci3="vim ~/.config/i3/config" +alias ci3b="vim ~/.config/i3blocks/config" +alias csx="vim ~/.config/sxhkd/sxhkdrc" +alias cbs="vim ~/.config/bspwm/bspwmrc" +alias csxbs="vim ~/.config/sxhkd/sxhkdrcbspc" +alias cdunst="vim ~/.config/dunst/dunstrc" +alias cv="vim ~/.vimrc" +alias cqb="vim ~/.config/qutebrowser/config.py" +alias cr="vim ~/.config/ranger/rc.conf" +alias crifle="vim ~/.config/ranger/rifle.conf" +alias ccmus="vim ~/.config/cmus/autosave" +alias cg="vim ~/.gitconfig" +alias cnb="vim ~/.config/newsboat/config" +alias cnbu="vim ~/.config/newsboat/urls" +alias ctmux="vim ~/.tmux.conf" + +alias upgrade="sudo pacman -Syu" + +alias starwars="telnet towel.blinkenlights.nl" +alias adormir="mpv -vo caca ~/videos/Adormir.mp4 && clear 2>/dev/null" +alias adormirloop="mpv --loop-file -vo caca ~/videos/Adormir.mp4 2>/dev/null && clear" +alias nintendos="mpv -vo caca https://www.youtube.com/watch?v=hYNcJj2QDhk 2>/dev/null" +alias netris="ssh netris.rocketnine.space" diff --git a/stow/rcs/.config/rcs/bash_vars b/stow/rcs/.config/rcs/bash_vars new file mode 100644 index 0000000..728196d --- /dev/null +++ b/stow/rcs/.config/rcs/bash_vars @@ -0,0 +1,102 @@ +# $XDG_CONFIG_HOME/rcs/bash_vars: Non-standard file for environment variables agruppation. + +########### +# General # +########### + +export EDITOR="nvim" +export TERM="rxvt-256color" +export TERMINAL="urxvt" +export BROWSER="qutebrowser" +export READER="zathura" +export VIEWER="sxiv" + +export PLANTUML="$HOME/programs/plantUML/plantuml.jar" + +export LEDGER_FILE="$HOME/docs/ledger.dat" +export REMOTE_LEDGER_FILE="taamas@taamas.xyz:data/ledger.dat" + +export CONFIG_VOL_CHANGE="1" +export CONFIG_BIG_VOL_CHANGE="10" + +export CONFIG_BRIGHT_CHANGE="4" +export CONFIG_BIG_BRIGHT_CHANGE="60" + +export CONFIG_DIC_ES="/usr/share/dict/spanish" +export CONFIG_DIC_EN="/usr/share/dict/british" +export CONFIG_DIC_PL="/usr/share/dict/słowa.txt" + +export CONFIG_FOLDER_WP="$HOME/media/images/wallpapers" +export CONFIG_FOLDER_RANDOMWP="$HOME/media/images/wallpapers/shufs/current" +export CONFIG_WPLIST="$HOME/.local/share/wpHistory.dat" +export CONFIG_WPPOINTER="/tmp/wppointer" + +export CONFIG_FOLDER_SCREENSHOTS="$HOME/media/images/screenshots" + +export CONFIG_FOLDER_LOGS="$HOME/logs" + +export CONFIG_WIFI_DEV="wlp2s0" +export CONFIG_ETH_DEV="" + +export CONFIG_BATTERY="BAT1" +export CONFIG_SENSORS_TEMP_REGEX="^Package" +export CONFIG_SENSORS_TEMP_COL="4" + +export CONFIG_FOLDER_DISROOT_INBOX="$HOME/.mail/disroot/INBOX/new" +export CONFIG_FOLDER_GMAIL_INBOX="$HOME/.mail/gmail/[Gmail]/INBOX/new" +export CONFIG_FOLDER_UNIOVI_INBOX="$HOME/.mail/uniovi/INBOX/new" + +# export ARDUINO_DIR="/usr/share/arduino" +# export ARDMK_DIR="/usr/share/arduino" +# export AVR_TOOLS_DIR="/usr" + +# Colors for grep +export GREP_COLORS='ms=04;32;49:mc=04;32;49:sl=:cx=:fn=01;34;49:ln=34:bn=34:se=36' + +# Colors for gcc +export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + +# Colors for less +export LESS_TERMCAP_mb=$'\E[01;31m' +export LESS_TERMCAP_md=$(tput bold; tput setaf 14) +export LESS_TERMCAP_me=$'\E[0m' +export LESS_TERMCAP_so=$(tput setab 2; tput setaf 0) +export LESS_TERMCAP_se=$'\E[0m' +export LESS_TERMCAP_us=$(tput smul; tput setaf 3) +export LESS_TERMCAP_ue=$'\E[0m' + +# Set LS_COLORS (enable color support of ls and others) +if [ -x /usr/bin/dircolors ]; then + dircolorsFile="$HOME/.config/dircolors" + [ -r "$dircolorsFile" ] && + eval "$(dircolors -b $dircolorsFile)" || + eval "$(dircolors -b)" +fi + +# make less more friendly for non-text input files, see lesspipe(1) +[ -x "/usr/bin/lesspipe.sh" ] && eval "$(SHELL=/bin/sh lesspipe.sh)" + +######### +# $PATH # +######### + +# Add scripts folder plus its direct subfolders to path and at the beginning +for dir in $(find "$HOME/scripts" -type d | grep -v '/\.'); do + PATH="${dir}:${PATH}" +done + +# Add java bins folder to path +export JAVA_HOME="/usr/lib/jvm/default/" +PATH="${PATH}:${JAVA_HOME}/bin" + +# Add ruby bins (gems) folder to path +PATH="${PATH}:$(ruby -e 'puts Gem.user_dir')/bin" + +# Add cargo bins folder to path +PATH="${PATH}:${HOME}/.cargo/bin" + +# Add pip local bins to path +PATH="${PATH}:${HOME}/.local/bin" + +# Export final PATH +export PATH diff --git a/stow/rcs/.profile b/stow/rcs/.profile index 0c17991..e58d10f 100644 --- a/stow/rcs/.profile +++ b/stow/rcs/.profile @@ -12,8 +12,12 @@ if [ -n "$BASH_VERSION" ]; then [ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc" fi -# Source environment variables -[ -f "$HOME/.bash_vars" ] && . "$HOME/.bash_vars" +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_DATA_HOME="$HOME/.local/share" + +# Source general and device specific environment variables +[ -f "$XDG_CONFIG_HOME/rcs/bash_vars" ] && . "$XDG_CONFIG_HOME/rcs/bash_vars" +[ -f "$XDG_CONFIG_HOME/rcs/device_vars" ] && . "$XDG_CONFIG_HOME/rcs/device_vars" # Login commands sudo loadkeys es -- cgit v1.2.1