From 4a51e02919572b0436340e23b07b7d893eecbad2 Mon Sep 17 00:00:00 2001 From: frosty Date: Mon, 9 Sep 2024 22:01:12 -0400 Subject: [PATCH] bash additions --- .bash_profile | 1 + .bashrc | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.bash_profile b/.bash_profile index 4e47246..4d999c8 100644 --- a/.bash_profile +++ b/.bash_profile @@ -27,6 +27,7 @@ export CUDA_CACHE_PATH="$XDG_CACHE_HOME/nv" # Other program settings export XIDLEHOOK_SOCK="$XDG_STATE_HOME/xidlehook.sock" +export SVDIR="$XDG_CONFIG_HOME/service" # $PATH additions export PATH="$PATH:$HOME/.local/bin" diff --git a/.bashrc b/.bashrc index 39846e3..e0b3e51 100644 --- a/.bashrc +++ b/.bashrc @@ -19,21 +19,23 @@ cd() { builtin cd "$@" && ls; } alias grep='grep --color=auto' alias wget='wget --no-hsts' alias vim='nvim' +alias emacs='emacsclient -ca emacs' +alias nnn='nnn -C' # Utilities alias ipp='curl https://ipinfo.io/ip && echo' ipl() { - if address="$(ip route get 1 2>/dev/null)"; then - address="${address#* via * dev * src }" - address="${address% uid *}" + if address=$(ip route get 1 2>/dev/null); then + address=${address#* via * dev * src } + address=${address% uid *} fi if [ -n "$address" ]; then - printf '%s' "$address" + prefix="$address" else - printf 'Offline' + prefix="Offline" fi - printf '\n' + printf '%s\n' "$prefix" } # Shorthands @@ -43,6 +45,7 @@ alias c='cd' alias v='nvim' alias g='git' alias ff='fastfetch' +alias em='emacs -nw' # Commands or options alias ll='ls -l'