From 9ef9c789d8e919c161de14883ecf492693662343 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Mon, 14 Oct 2024 19:57:03 +0200 Subject: Cleanup --- shenanigans.sh | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/shenanigans.sh b/shenanigans.sh index ea2dc97..29dbf0a 100755 --- a/shenanigans.sh +++ b/shenanigans.sh @@ -1,15 +1,12 @@ # Software list. -# cifs-utils tree hstr s3cmd xclip mc gnupg ripgrep jq xmlstarlet htop nvtop newsboat tmux ctags vim picom scrot +# cifs-utils tree hstr s3cmd xclip mc gnupg ripgrep jq xmlstarlet htop nvtop tmux vim ctags picom scrot # Magical environment variables. - NIX_SHELL_PRESERVE_PROMPT=1 TERM=xterm-256color VISUAL=vim EDITOR=vim -# Better prompt. - parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } @@ -21,10 +18,10 @@ is_inside_nix_shell() { fi } +# Better prompt. export PS1="[\033[38;5;166m\]\u@\h\[$(tput sgr0)\]]$(is_inside_nix_shell)\[\033[33m\]\$(parse_git_branch)\[\033[00m\] \w\[$(tput sgr0)\] \n$ " # General aliases. - alias ls='ls --color=none' alias l='ls -lh --color=none' alias ll='ls -lha --color=none' @@ -38,19 +35,16 @@ alias newsraft='newsraft -f ~/.dotfiles/rssfeeds' alias server='python3 -m http.server 6969' # Custom folder jump commands. - alias p='cd ~/Vault/projects' alias j='cd ~/Junk/current' alias d='cd ~/Downloads' # Additional path settings. - export PATH=$HOME/Applications:$PATH export PATH=$HOME/go/bin:$PATH export PATH=/usr/local/go/bin:$PATH # History and search. Stolen from J. - HISTCONTROL=ignoreboth shopt -s histappend export HISTSIZE= @@ -62,8 +56,7 @@ bind '"\e[B": history-search-forward' export HSTR_CONFIG=hicolor if [[ $- =~ .i. ]]; then bind '"\C-h": "\C-a hstr -- \C-j"'; fi -# Useful function. Much wow! - +# Backup to NAS function. Much wow! backup() { CWD=$(pwd) VHOME=/home/$USER/Vault @@ -72,12 +65,10 @@ backup() { mkdir -p $VHOME/dotfiles cd $VHOME/dotfiles - # Make a copy of dotfiles. + # Make a copy of certain files. cp /home/$USER/.shenanigans.sh shenanigans.sh cp /home/$USER/.bash_history_infinite bash_history_infinite cp /home/$USER/.gitconfig gitconfig - cp /home/$USER/.newsboat/urls urls - cp /home/$USER/.newsboat/cache.db cache.db cp -Rf /home/$USER/.ssh/ ./ cp -Rf /home/$USER/.aws/ ./ -- cgit v1.2.3