diff --git a/shell/dot-bashrc b/shell/dot-bashrc index 3c5baf2..24498e8 100644 --- a/shell/dot-bashrc +++ b/shell/dot-bashrc @@ -2,6 +2,56 @@ # ~/.bashrc # +export PATH="$PATH:$HOME/.local/bin" + +export XDG_CACHE_HOME="$HOME/.cache" +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_DATA_HOME="$HOME/.local/share" +export XDG_BIN_HOME="$HOME/.local/bin" +export XDG_MUSIC_DIR="$HOME/Music" +export XDG_DOCUMENTS_DIR="$HOME/Documents" +# export XDG_PICTURES_DIR="$HOME/Media/images" +# export XDG_VIDEOS_DIR="$HOME/Media/videos" + +# fix ansible dirs +export ANSIBLE_HOME="${XDG_CONFIG_HOME}/ansible/home" +export ANSIBLE_CONFIG="${XDG_CONFIG_HOME}/ansible/ansible.cfg" +export ANSIBLE_GALAXY_CACHE_DIR="${XDG_CACHE_HOME}/ansible/galaxy_cache" +#NOTE: for the tmp dir on remotes sould be configuard in ansible.cfg + +# fix rust dirs +export RUSTUP_HOME="$HOME/.local/rust/rustup" +export CARGO_HOME="$HOME/.local/rust/cargo" + +# fix discord dirs +# export DISCORD_USER_DATA_DIR="${XDG_DATA_HOME}" + +# fix docker dirs +export DOCKER_CONFIG="${XDG_CONFIG_HOME}/docker" + +# fix screen dirs +export SCREENRC="${XDG_CONFIG_HOME}/screen/screenrc" +export SCREENDIR="${XDG_RUNTIME_DIR}/screen" + +# fix texlive dirs +export TEXMFHOME="${XDG_DATA_HOME}/texmf" +export TEXMFVAR="${XDG_CACHE_HOME}/texlive/texmf-var" +export TEXMFCONFIG="${XDG_CONFIG_HOME}/texlive/texmf-config" + +# fix wget dirs +export WGETRC="${XDG_CONFIG_HOME}/wgetrc" +alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"' + +# fix npm dirs +export NPM_CONFIG_USERCONFIG="${XDG_CONFIG_HOME}/npm/npmrc" + +# fix gnupg dirs +#TODO: test this +# export GNUPGHOME="${XDG_DATA_HOME}/gnupg" + +# fix java dirs +export _JAVA_OPTIONS="-Djava.util.prefs.userRoot=${XDG_CONFIG_HOME}/java" + # If not running interactively, don't do anything [[ $- != *i* ]] && return @@ -10,7 +60,6 @@ alias la='ls --color=auto -plhA' alias grep='grep --color=auto' alias prusa-slicer='flatpak run com.prusa3d.PrusaSlicer' -export PATH="$PATH:$HOME/.local/bin" export EDITOR=vim # quartus @@ -29,10 +78,7 @@ export SSH_AGENT_PID; export SSH_AUTH_SOCK; # rust -# export RUSTUP_HOME="$HOME/.local/rust/rustup" -# export CARGO_HOME="$HOME/.local/rust/cargo" -# . $HOME/.local/rust/cargo -. "$HOME/.cargo/env" +. "$CARGO_HOME/env" # better tools export FZF_CTRL_T_OPTS=" diff --git a/shell/dot-config/npm/npmrc b/shell/dot-config/npm/npmrc new file mode 100644 index 0000000..a65b1c4 --- /dev/null +++ b/shell/dot-config/npm/npmrc @@ -0,0 +1,5 @@ + +prefix=${XDG_DATA_HOME}/npm +cache=${XDG_CACHE_HOME}/npm +init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js +logs-dir=${XDG_STATE_HOME}/npm/logs diff --git a/shell/dot-local/bin/displayfont b/shell/dot-local/bin/displayfont new file mode 100755 index 0000000..17c728b --- /dev/null +++ b/shell/dot-local/bin/displayfont @@ -0,0 +1,7 @@ +#!/bin/bash + +font="$(fc-list | fzf)" + +echo "$font" +display "$(echo "$font" | awk '{{ print $1 }}' | tr -d ':')" +