diff options
author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2023-03-06 00:45:55 +0900 |
---|---|---|
committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2023-03-06 00:45:55 +0900 |
commit | 21bc63dfddab4537d36af40b77cd3079d9acae8b (patch) | |
tree | 69fb0a3a3a4bddadfc4d80995e3ff9dfc9d52112 /nixos/.bashrc | |
parent | a25921635e018f57b014250fb06c9e38e5a8b971 (diff) | |
download | dotfiles-21bc63dfddab4537d36af40b77cd3079d9acae8b.tar.gz |
Update laptop's shell and X config
Diffstat (limited to 'nixos/.bashrc')
-rw-r--r-- | nixos/.bashrc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/nixos/.bashrc b/nixos/.bashrc index 520193d..d024a82 100644 --- a/nixos/.bashrc +++ b/nixos/.bashrc @@ -23,6 +23,9 @@ shopt -s checkwinsize # match all files and zero or more directories and subdirectories. shopt -s globstar +export NIX_SHELL_PRESERVE_PROMPT=1 +export PS1='\n\[\033[1;32m\]\u@\h${IN_NIX_SHELL:+-shell} \[\033[01;34m\]\w\[\033[00m\]\$ ' + # make less more friendly for non-text input files, see lesspipe(1) [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" @@ -36,16 +39,11 @@ alias la='exa -a' # See /usr/share/doc/bash-doc/examples in the bash-doc package. alias l='$(fc -ln -1) | less -r' alias r=ranger +alias grep='grep -P' +alias bat='bat -p --color=always --italic-text=always' alias gcc='gcc -Wall -Wextra -pedantic -O2 -lm' alias g++='g++ -Wall -Wextra -pedantic -O2 -lm' alias x='cd $HOME && startx && cd -' -alias backup='rsync -avh --delete /home/ /data/Home/' - -function ipfs-cors { - ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://127.0.0.1:8000", "http://127.0.0.1:5001", "https://webui.ipfs.io"]' - ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]' - systemctl restart --user ipfs -} # enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc and /etc/profile @@ -64,3 +62,4 @@ set -o emacs export EDITOR=vim export PAGER='less -r' +export BAT_THEME=ansi |