From bf873caffc6ea600dea6ffe95fc3d34b55a1cf95 Mon Sep 17 00:00:00 2001 From: eneller Date: Wed, 15 Nov 2023 18:05:10 +0100 Subject: [PATCH] shell tweaks --- .config/rofi/config.rasi | 2 +- .config/shell/alias.sh | 17 ++++++++++++++++- .profile | 3 +++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.config/rofi/config.rasi b/.config/rofi/config.rasi index 4ee0f4a..28b4dce 100644 --- a/.config/rofi/config.rasi +++ b/.config/rofi/config.rasi @@ -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";*/ diff --git a/.config/shell/alias.sh b/.config/shell/alias.sh index 980fe28..e2e5382 100644 --- a/.config/shell/alias.sh +++ b/.config/shell/alias.sh @@ -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 diff --git a/.profile b/.profile index dee8a2d..86689e7 100644 --- a/.profile +++ b/.profile @@ -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"