shell tweaks

This commit is contained in:
eneller
2023-11-15 18:05:10 +01:00
parent a0da43b1ed
commit bf873caffc
3 changed files with 20 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ configuration {
/* location: 0;*/
/* yoffset: 0;*/
/* xoffset: 0;*/
/* fixed-num-lines: true;*/
fixed-num-lines: true;
show-icons: true;
terminal: "alacritty";
/* ssh-client: "ssh";*/

View File

@@ -1,4 +1,5 @@
alias diff='diff -u --color'
alias tree='eza --tree'
alias ls='eza' # make output more readable and show directories first
alias ll='ls --long --header --git'
@@ -13,12 +14,26 @@ alias r='R'
alias xar="xarchiver"
# Add an "alert" alias for long running commands. Use like so: 'sleep 10; alert'
alias notify='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
alias notify='notify-send --urgency=normal -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
#Add a "dotfiles" alias for .dotfile git repo
alias dotfiles='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
#alias 'dotfiles-update'='dotfiles commit -a && dotfiles push'
sleep() {
if [ "$1" = "-m" ]; then
if [ -n "$2" ]; then
sleep "$(( $2 * 60 ))"
else
echo "Please provide a duration in minutes after the -m flag."
fi
else
/usr/bin/sleep "$@"
fi
}
colors() {
local fgc bgc vals seq0

View File

@@ -44,3 +44,6 @@ export BROWSER=/usr/bin/firefox
export TERMINAL=/usr/bin/alacritty
export EXPLORER=/usr/bin/thunar
export MAILCLIENT=/usr/bin/thunderbird
# set BAT as man pager
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
export MANROFFOPT="-c"