From ae1fa811bfa270a9124abb7aa8d4cc6af538071b Mon Sep 17 00:00:00 2001 From: clyhtsuriva Date: Sat, 21 May 2022 22:30:20 +0200 Subject: Modified bashrc according to xdg-ninja and some minor changes --- dot_bashrc | 23 ++++++++++++++++++----- dot_config/aliasrc | 3 ++- dot_config/i3/config | 2 +- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/dot_bashrc b/dot_bashrc index 4ccabd8..e5cc0d5 100644 --- a/dot_bashrc +++ b/dot_bashrc @@ -1,11 +1,11 @@ stty -ixon # Disable ctrl-s and ctrl-q. shopt -s autocd cdspell checkjobs extglob histappend -#autocd : Allows you to cd into directory merely by typing the directory name. -#cdspell : minor errors in the spelling of a directory component in a cd command are corrected -#checkjobs : bash lists the status of any stopped and running jobs before exiting an interactive shell -#extglob : extended globing, advanced pattern matching -#histappend: append to the history instead of overwriting (good for multiple connections) +# autocd : Allows you to cd into directory merely by typing the directory name. +# cdspell : minor errors in the spelling of a directory component in a cd command are corrected +# checkjobs : bash lists the status of any stopped and running jobs before exiting an interactive shell +# extglob : extended globing, advanced pattern matching +# histappend: append to the history instead of overwriting (good for multiple connections) HISTSIZE= HISTFILESIZE= # Infinite history. HISTCONTROL="ignorespace" @@ -13,6 +13,19 @@ HISTCONTROL="ignorespace" # ignore duplicate commands, ignore commands starting with a space export HISTCONTROL=erasedups +export XDG_DATA_HOME="$HOME"/.local/share +export XDG_CONFIG_HOME="$HOME"/.config +export XDG_STATE_HOME="$HOME"/.local/state +export XDG_CACHE_HOME="$HOME"/.cache +export ANSIBLE_HOME="$XDG_DATA_HOME"/ansible +export GNUPGHOME="$XDG_DATA_HOME"/gnupg +export GRADLE_USER_HOME="$XDG_DATA_HOME"/gradle +export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java +export ANDROID_HOME="$XDG_DATA_HOME"/android +export HISTFILE="$XDG_STATE_HOME"/bash/history +export LESSHISTFILE="$XDG_CACHE_HOME"/less/history +export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc +export PYTHONSTARTUP="$XDG_CONFIG_HOME"/python/pythonrc PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \[$(tput setaf 5)\]\w\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]" ; export PS1 diff --git a/dot_config/aliasrc b/dot_config/aliasrc index 712206d..c48eb19 100644 --- a/dot_config/aliasrc +++ b/dot_config/aliasrc @@ -22,4 +22,5 @@ alias mpv='mpv --input-ipc-server=/tmp/mpvsoc$(date +%s)' \ vv='cd ~/Videos && ls -A *' \ pp='cd ~/Pictures && ls -A *' \ mm='cd ~/Music && ls -A !(data-music)' \ - ipa='ip -c -h -s a' + ipa='ip -c -h -s a' \ + wget='wget --hsts-file="$XDG_DATA_HOME"/wget-hsts' diff --git a/dot_config/i3/config b/dot_config/i3/config index bbfe95c..54e7dd9 100644 --- a/dot_config/i3/config +++ b/dot_config/i3/config @@ -221,7 +221,7 @@ client.placeholder #20202D #20202D #FFFFFF #0C1746 #3C3C54 client.background #D52C70 # suspend and hibernate -bindsym $mod+Shift+S exec "i3-nagbar -t warning -f fixed -m 'You pressed the suspending shortcut. Do you really want to suspend your computer?' -B 'Yes, suspend it.' 'i3lock --image="$HOME/Pictures/superhot_wpp.png" && sudo /bin/zzz'" +bindsym $mod+Shift+S exec "i3-nagbar -t warning -f fixed -m 'You pressed the suspending shortcut. Do you really want to suspend your computer?' -B 'Yes, suspend it.' 'i3lock --image=$HOME/Pictures/superhot_wpp.png && sudo /bin/zzz'" bindsym $mod+Shift+Delete exec "i3-nagbar -t warning -f fixed -m 'You pressed the hibernating shortcut. Do you really want to put your computer to sleep?' -B 'Yes, do it.' 'sudo /bin/ZZZ'" # What happens when we hit the power button -- cgit v1.2.3