From 3e6ddf99122e2e42a3e1e3f98bf82640ad422347 Mon Sep 17 00:00:00 2001 From: Knyffen Date: Sat, 17 Aug 2024 16:29:44 +0200 Subject: [PATCH] update --- .bash_aliases | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.bash_aliases b/.bash_aliases index 69d6813..806a482 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -3,6 +3,7 @@ export HOSTNAME=$(hostname 2>/dev/null || hostnamectl hostname) export RIPGREP_CONFIG_PATH=~/.ripgreprc export PATH="$PATH:/opt/cuda/nsight_systems/bin:/opt/cuda/nsight_compute" export PATH="$(systemctl --user show-environment | grep "^PATH" | sed -e 's/PATH=//g'):$PATH" +export HISTCONTROL=erasedups if [ $USER = 'knyffen' ] || ([ $HOSTNAME = 'jry-thinkpad-t470' ] && [ $USER = 'jry' ]); then alias rm="trash" @@ -52,7 +53,7 @@ alias disable_touch="xinput disable 'Wacom HID 51E3 Finger touch'" alias ack="ack -T junkFiles" function ack_open { nvim "$( ack -m 1 -T junkFiles "$@" | grep -Po "^(?:lib|t|tmpl|python)/[^:]+:\d+" | tr '\n' ' ' )"; } alias pacman="nice -n 19 pacman --config ~/Nextcloud/configfiles/pacman/pacman.conf" -alias pamac="nice -n 19 pamac" +alias downgrade="nice -n 19 downgrade --pacman-conf ~/Nextcloud/configfiles/pacman/pacman.conf" alias yay="nice -n 19 yay --config ~/Nextcloud/configfiles/pacman/pacman.conf" alias makepkg="nice -n 19 makepkg" alias restartplasma='systemctl --user restart plasma-plasmashell' @@ -64,6 +65,17 @@ alias decolor="sed -e 's/\x1b\[[0-9;]*m//g'" alias restart_vban="systemctl --user restart vban; ssh knyffen@192.168.0.20 sudo systemctl restart vban" alias count_files_in_folders="du -a | cut -d/ -f2 | sort | uniq -c | sort -n" function zip_it { zip -r "$1" "$1"; } +# function unzip { +# if (( "$#" == 1 )) +# then +# FOLDER=$(basename "$1" .zip) +# command unzip "$1" -d "$FOLDER" +# return +# fi + +# command git "$@" +# unzip -r "$1" "$1"; +# } # git alias gst="git status" @@ -228,11 +240,11 @@ pdfpagepicker() { if [ -z "$(pacman -Qs poppler | grep 'local/poppler ')" ]; then echo "This script requires poppler to be installed." echo "sudo pacman -S poppler" - exit + return fi if [ $# != 3 ]; then echo "Usage: input.pdf 1,3-5,7 output.pdf" - exit + return fi IN=$1