From 21bc63dfddab4537d36af40b77cd3079d9acae8b Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Mon, 6 Mar 2023 00:45:55 +0900 Subject: Update laptop's shell and X config --- nixos/.Xdefaults | 4 +--- nixos/.bashrc | 13 ++++++------- nixos/.profile | 1 - nixos/.xinitrc | 1 - 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/nixos/.Xdefaults b/nixos/.Xdefaults index 7ca5bfd..d6016f5 100644 --- a/nixos/.Xdefaults +++ b/nixos/.Xdefaults @@ -14,7 +14,7 @@ *.color9: #f75341 *.color10: #98bc37 *.color11: #fed06e -*.color12: #68A8E4 +*.color12: #68a8e4 *.color13: #ff5c8f *.color14: #53fde9 *.color15: #fce8c3 @@ -33,5 +33,3 @@ URxvt.font-size.step: 3 URxvt.keysym.M-C-slash: perl:aAtt:word-complete URxvt.keysym.M-question: perl:aAtt:fuzzy-complete URxvt.keysym.M-quotedbl: perl:aAtt:undo - -Xcursor.theme: Mocu-White-Left 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 diff --git a/nixos/.profile b/nixos/.profile index d823876..6474061 100644 --- a/nixos/.profile +++ b/nixos/.profile @@ -8,7 +8,6 @@ # for ssh logins, install and configure the libpam-umask package. #umask 022 -export PATH="$HOME/.local/bin:$PATH" export MANPATH="$HOME/.local/share/man:$MANPATH" export GOPATH="$HOME/.local/share/go" export XMODIFIERS=@im=ibus diff --git a/nixos/.xinitrc b/nixos/.xinitrc index f028183..1f1c5cc 100644 --- a/nixos/.xinitrc +++ b/nixos/.xinitrc @@ -5,5 +5,4 @@ keynav & audacious & thread & autorandr --change -xinput set-button-map 'Logitech USB Optical Mouse' 3 2 1 4 5 exec awesome -- cgit 1.4.1