home dir cleanup
This commit is contained in:
parent
9126b569aa
commit
69c3b0a825
|
@ -0,0 +1,2 @@
|
||||||
|
[init]
|
||||||
|
defaultBranch = main
|
|
@ -0,0 +1,4 @@
|
||||||
|
prefix=${XDG_DATA_HOME}/npm
|
||||||
|
cache=${XDG_CACHE_HOME}/npm
|
||||||
|
tmp=${XDG_RUNTIME_DIR}/npm
|
||||||
|
init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js
|
|
@ -1,61 +1,62 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# sudo not required for some system commands
|
# sudo not required for some system commands
|
||||||
for command in mount umount sv pacman apt updatedb su shutdown poweroff reboot ; do
|
for command in mount umount sv pacman apt updatedb su shutdown poweroff reboot; do
|
||||||
alias $command="sudo $command"
|
command -v $command 1>/dev/null 2>&1 && alias $command="sudo $command"
|
||||||
done; unset command
|
done
|
||||||
|
unset command
|
||||||
|
|
||||||
# Verbosity and settings that you pretty much just always are going to want.
|
# Verbosity and settings that you pretty much just always are going to want.
|
||||||
alias \
|
alias \
|
||||||
cp="cp -iv" \
|
cp="cp -iv" \
|
||||||
mv="mv -iv" \
|
mv="mv -iv" \
|
||||||
rm="rm -vI" \
|
rm="rm -vI" \
|
||||||
bc="bc -ql" \
|
bc="bc -ql" \
|
||||||
mkd="mkdir -pv" \
|
mkd="mkdir -pv" \
|
||||||
ffmpeg="ffmpeg -hide_banner" \
|
ffmpeg="ffmpeg -hide_banner" \
|
||||||
exa="exa -abghHliS" \
|
exa="exa -abghHliS" \
|
||||||
duf="duf -all" \
|
duf="duf -all" \
|
||||||
ls="ls -hN --color=auto --group-directories-first" \
|
ls="ls -hN --color=auto --group-directories-first" \
|
||||||
grep="grep --color=auto" \
|
grep="grep --color=auto" \
|
||||||
diff="diff --color=auto" \
|
diff="diff --color=auto" \
|
||||||
|
nvidia-settings="nvidia-settings --config=$XDG_CONFIG_HOME/nvidia/settings"
|
||||||
|
|
||||||
# Colorize commands when possible.
|
# Colorize commands when possible.
|
||||||
alias \
|
alias \
|
||||||
ls="ls -hN --color=auto --group-directories-first" \
|
ls="ls -hN --color=auto --group-directories-first" \
|
||||||
grep="grep --color=auto" \
|
grep="grep --color=auto" \
|
||||||
diff="diff --color=auto" \
|
diff="diff --color=auto" \
|
||||||
ccat="highlight --out-format=ansi" \
|
ccat="highlight --out-format=ansi" \
|
||||||
ip="ip -color=auto"
|
ip="ip -color=auto"
|
||||||
|
|
||||||
# These common commands are just too long! Abbreviate them.
|
# These common commands are just too long! Abbreviate them.
|
||||||
alias \
|
alias \
|
||||||
ka="killall" \
|
ka="killall" \
|
||||||
e="$EDITOR" \
|
e="$EDITOR" \
|
||||||
z="zathura" \
|
z="zathura" \
|
||||||
p="pacman" \
|
p="pacman" \
|
||||||
ar="apt remove" \
|
ar="apt remove" \
|
||||||
are="apt reinstall" \
|
are="apt reinstall" \
|
||||||
ai="apt install" \
|
ai="apt install" \
|
||||||
aur="apt autoremove" \
|
aur="apt autoremove" \
|
||||||
au="apt upgrade" \
|
au="apt upgrade" \
|
||||||
kssh="kitty +kitten ssh"
|
kssh="kitty +kitten ssh"
|
||||||
|
|
||||||
# Misc.
|
# Misc.
|
||||||
alias \
|
alias \
|
||||||
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
|
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
|
||||||
weath="less -S ${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport" \
|
weath="less -S ${XDG_CACHE_HOME:-$HOME/.cache}/weatherreport" \
|
||||||
remvirt="virt-manager -c 'qemu+ssh://luca@192.168.178.200/system'" \
|
remvirt="virt-manager -c 'qemu+ssh://luca@192.168.178.200/system'" \
|
||||||
vim="nvim" \
|
vim="nvim" \
|
||||||
wikidown='rclone sync cloud:files/luca/Notes ~/Documents/vimwiki' \
|
wikidown='rclone sync cloud:files/luca/Notes ~/Documents/vimwiki' \
|
||||||
wikiup='rclone sync ~/Documents/vimwiki cloud:files/luca/Notes' \
|
wikiup='rclone sync ~/Documents/vimwiki cloud:files/luca/Notes' \
|
||||||
cam="mpv --untimed --no-cache --no-osc --no-input-default-bindings --profile=low-latency --input-conf=/dev/null --title=webcam $(ls /dev/video[0,2,4,6,8] | tail -n 1)" \
|
cam="mpv --untimed --no-cache --no-osc --no-input-default-bindings --profile=low-latency --input-conf=/dev/null --title=webcam $(ls /dev/video[0,2,4,6,8] | tail -n 1)" \
|
||||||
ahv="export ANSIBLE_VAULT_PASSWORD_FILE=~/.ansible/secrets/ansible-homelab && ansible-vault" \
|
ahv="export ANSIBLE_VAULT_PASSWORD_FILE=~/.ansible/secrets/ansible-homelab && ansible-vault" \
|
||||||
xpick=" xprop | awk '
|
xpick=" xprop | awk '
|
||||||
/^WM_CLASS/{sub(/.* =/, \"instance:\"); sub(/,/, \"\nclass:\"); print}
|
/^WM_CLASS/{sub(/.* =/, \"instance:\"); sub(/,/, \"\nclass:\"); print}
|
||||||
/^WM_NAME/{sub(/.* =/, \"title:\"); print}'"
|
/^WM_NAME/{sub(/.* =/, \"title:\"); print}'"
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
whed () {
|
whed() {
|
||||||
$EDITOR "$(which "$1")"
|
$EDITOR "$(which "$1")"
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,26 +15,28 @@ export BROWSER="librewolf"
|
||||||
export XDG_CONFIG_HOME="$HOME/.config"
|
export XDG_CONFIG_HOME="$HOME/.config"
|
||||||
export XDG_DATA_HOME="$HOME/.local/share"
|
export XDG_DATA_HOME="$HOME/.local/share"
|
||||||
export XDG_CACHE_HOME="$HOME/.cache"
|
export XDG_CACHE_HOME="$HOME/.cache"
|
||||||
export PYENVS_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/virtualenv"
|
export PYENVS_DIR="$XDG_DATA_HOME/virtualenv"
|
||||||
export KEYMAPS_DIR="$HOME/.local/bin/keymaps"
|
export KEYMAPS_DIR="$HOME/.local/bin/keymaps"
|
||||||
export ZSH_COMPDUMP="${XDG_CACHE_HOME:-$HOME/.cache}/zcompdump"
|
export ZSH_COMPDUMP="$XDG_CACHE_HOME/zcompdump"
|
||||||
export NOTMUCH_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/notmuch-config"
|
export NOTMUCH_CONFIG="$XDG_CONFIG_HOME/notmuch-config"
|
||||||
export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0"
|
export GTK2_RC_FILES="$XDG_CONFIG_HOME/.config}/gtk-2.0/gtkrc-2.0"
|
||||||
export LESSHISTFILE="-"
|
export LESSHISTFILE="-"
|
||||||
export WGETRC="${XDG_CONFIG_HOME:-$HOME/.config}/wget/wgetrc"
|
export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc"
|
||||||
export INPUTRC="${XDG_CONFIG_HOME:-$HOME/.config}/shell/inputrc"
|
export INPUTRC="$XDG_CONFIG_HOME/shell/inputrc"
|
||||||
export ZDOTDIR="${XDG_CONFIG_HOME:-$HOME/.config}/zsh"
|
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
|
||||||
export GNUPGHOME="${XDG_CONFIG_HOME:-$HOME/.config}/gnupg"
|
export GNUPGHOME="$XDG_CONFIG_HOME/gnupg"
|
||||||
export WINEPREFIX="${XDG_DATA_HOME:-$HOME/.local/share}/wineprefixes/default"
|
export WINEPREFIX="$XDG_DATA_HOME/wineprefixes/default"
|
||||||
export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
|
export TMUX_TMPDIR="$XDG_RUNTIME_DIR"
|
||||||
export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android"
|
export ANDROID_HOME="$XDG_DATA_HOME/android"
|
||||||
export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo"
|
export CARGO_HOME="$XDG_DATA_HOME/cargo"
|
||||||
export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go"
|
export GOPATH="$XDG_DATA_HOME/go"
|
||||||
export ANSIBLE_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/ansible/ansible.cfg"
|
export ANSIBLE_CONFIG="$XDG_CONFIG_HOME/ansible/ansible.cfg"
|
||||||
export UNISON="${XDG_DATA_HOME:-$HOME/.local/share}/unison"
|
export ANSIBLE_HOME="$XDG_DATA_HOME/ansible"
|
||||||
export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history"
|
export UNISON="$XDG_DATA_HOME/unison"
|
||||||
export GRADLE_USER_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/gradle"
|
export HISTFILE="$XDG_DATA_HOME/history"
|
||||||
|
export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle"
|
||||||
export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # WARN: This line can break some display managers
|
export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # WARN: This line can break some display managers
|
||||||
|
export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc
|
||||||
|
|
||||||
# Other program settings:
|
# Other program settings:
|
||||||
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
|
export FZF_DEFAULT_OPTS="--layout=reverse --height 40%"
|
||||||
|
@ -49,6 +51,4 @@ export LESS_TERMCAP_ue="$(printf '%b' '[0m')"
|
||||||
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
|
export LESSOPEN="| /usr/bin/highlight -O ansi %s 2>/dev/null"
|
||||||
export ANSIBLE_NOCOWS=1 # Stop those fucking cows in Ansible
|
export ANSIBLE_NOCOWS=1 # Stop those fucking cows in Ansible
|
||||||
|
|
||||||
[ ! -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" ] && shortcuts >/dev/null 2>&1 &
|
|
||||||
|
|
||||||
[ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startgraphical
|
[ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startgraphical
|
||||||
|
|
Loading…
Reference in New Issue