aboutsummaryrefslogtreecommitdiff
path: root/shenanigans.sh
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2024-10-14 19:57:03 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2024-10-14 19:57:03 +0200
commit9ef9c789d8e919c161de14883ecf492693662343 (patch)
tree07548acb0708f4ce6fa538ad8b6fcddad50a7291 /shenanigans.sh
parentb3ab10161ce1ebc25c6cc1f62dca703935a4fe53 (diff)
downloaddotfiles-9ef9c789d8e919c161de14883ecf492693662343.tar.gz
Cleanup
Diffstat (limited to 'shenanigans.sh')
-rwxr-xr-xshenanigans.sh17
1 files 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 @@
1# Software list. 1# Software list.
2# cifs-utils tree hstr s3cmd xclip mc gnupg ripgrep jq xmlstarlet htop nvtop newsboat tmux ctags vim picom scrot 2# cifs-utils tree hstr s3cmd xclip mc gnupg ripgrep jq xmlstarlet htop nvtop tmux vim ctags picom scrot
3 3
4# Magical environment variables. 4# Magical environment variables.
5
6NIX_SHELL_PRESERVE_PROMPT=1 5NIX_SHELL_PRESERVE_PROMPT=1
7TERM=xterm-256color 6TERM=xterm-256color
8VISUAL=vim 7VISUAL=vim
9EDITOR=vim 8EDITOR=vim
10 9
11# Better prompt.
12
13parse_git_branch() { 10parse_git_branch() {
14 git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' 11 git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
15} 12}
@@ -21,10 +18,10 @@ is_inside_nix_shell() {
21 fi 18 fi
22} 19}
23 20
21# Better prompt.
24export PS1="[\033[38;5;166m\]\u@\h\[$(tput sgr0)\]]$(is_inside_nix_shell)\[\033[33m\]\$(parse_git_branch)\[\033[00m\] \w\[$(tput sgr0)\] \n$ " 22export PS1="[\033[38;5;166m\]\u@\h\[$(tput sgr0)\]]$(is_inside_nix_shell)\[\033[33m\]\$(parse_git_branch)\[\033[00m\] \w\[$(tput sgr0)\] \n$ "
25 23
26# General aliases. 24# General aliases.
27
28alias ls='ls --color=none' 25alias ls='ls --color=none'
29alias l='ls -lh --color=none' 26alias l='ls -lh --color=none'
30alias ll='ls -lha --color=none' 27alias ll='ls -lha --color=none'
@@ -38,19 +35,16 @@ alias newsraft='newsraft -f ~/.dotfiles/rssfeeds'
38alias server='python3 -m http.server 6969' 35alias server='python3 -m http.server 6969'
39 36
40# Custom folder jump commands. 37# Custom folder jump commands.
41
42alias p='cd ~/Vault/projects' 38alias p='cd ~/Vault/projects'
43alias j='cd ~/Junk/current' 39alias j='cd ~/Junk/current'
44alias d='cd ~/Downloads' 40alias d='cd ~/Downloads'
45 41
46# Additional path settings. 42# Additional path settings.
47
48export PATH=$HOME/Applications:$PATH 43export PATH=$HOME/Applications:$PATH
49export PATH=$HOME/go/bin:$PATH 44export PATH=$HOME/go/bin:$PATH
50export PATH=/usr/local/go/bin:$PATH 45export PATH=/usr/local/go/bin:$PATH
51 46
52# History and search. Stolen from J. 47# History and search. Stolen from J.
53
54HISTCONTROL=ignoreboth 48HISTCONTROL=ignoreboth
55shopt -s histappend 49shopt -s histappend
56export HISTSIZE= 50export HISTSIZE=
@@ -62,8 +56,7 @@ bind '"\e[B": history-search-forward'
62export HSTR_CONFIG=hicolor 56export HSTR_CONFIG=hicolor
63if [[ $- =~ .i. ]]; then bind '"\C-h": "\C-a hstr -- \C-j"'; fi 57if [[ $- =~ .i. ]]; then bind '"\C-h": "\C-a hstr -- \C-j"'; fi
64 58
65# Useful function. Much wow! 59# Backup to NAS function. Much wow!
66
67backup() { 60backup() {
68 CWD=$(pwd) 61 CWD=$(pwd)
69 VHOME=/home/$USER/Vault 62 VHOME=/home/$USER/Vault
@@ -72,12 +65,10 @@ backup() {
72 mkdir -p $VHOME/dotfiles 65 mkdir -p $VHOME/dotfiles
73 cd $VHOME/dotfiles 66 cd $VHOME/dotfiles
74 67
75 # Make a copy of dotfiles. 68 # Make a copy of certain files.
76 cp /home/$USER/.shenanigans.sh shenanigans.sh 69 cp /home/$USER/.shenanigans.sh shenanigans.sh
77 cp /home/$USER/.bash_history_infinite bash_history_infinite 70 cp /home/$USER/.bash_history_infinite bash_history_infinite
78 cp /home/$USER/.gitconfig gitconfig 71 cp /home/$USER/.gitconfig gitconfig
79 cp /home/$USER/.newsboat/urls urls
80 cp /home/$USER/.newsboat/cache.db cache.db
81 72
82 cp -Rf /home/$USER/.ssh/ ./ 73 cp -Rf /home/$USER/.ssh/ ./
83 cp -Rf /home/$USER/.aws/ ./ 74 cp -Rf /home/$USER/.aws/ ./