This commit is contained in:
Knyffen 2024-08-17 16:29:44 +02:00
parent af582ae049
commit 3e6ddf9912

View File

@ -3,6 +3,7 @@ export HOSTNAME=$(hostname 2>/dev/null || hostnamectl hostname)
export RIPGREP_CONFIG_PATH=~/.ripgreprc export RIPGREP_CONFIG_PATH=~/.ripgreprc
export PATH="$PATH:/opt/cuda/nsight_systems/bin:/opt/cuda/nsight_compute" 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 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 if [ $USER = 'knyffen' ] || ([ $HOSTNAME = 'jry-thinkpad-t470' ] && [ $USER = 'jry' ]); then
alias rm="trash" alias rm="trash"
@ -52,7 +53,7 @@ alias disable_touch="xinput disable 'Wacom HID 51E3 Finger touch'"
alias ack="ack -T junkFiles" alias ack="ack -T junkFiles"
function ack_open { nvim "$( ack -m 1 -T junkFiles "$@" | grep -Po "^(?:lib|t|tmpl|python)/[^:]+:\d+" | tr '\n' ' ' )"; } 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 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 yay="nice -n 19 yay --config ~/Nextcloud/configfiles/pacman/pacman.conf"
alias makepkg="nice -n 19 makepkg" alias makepkg="nice -n 19 makepkg"
alias restartplasma='systemctl --user restart plasma-plasmashell' 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 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" alias count_files_in_folders="du -a | cut -d/ -f2 | sort | uniq -c | sort -n"
function zip_it { zip -r "$1" "$1"; } 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 # git
alias gst="git status" alias gst="git status"
@ -228,11 +240,11 @@ pdfpagepicker() {
if [ -z "$(pacman -Qs poppler | grep 'local/poppler ')" ]; then if [ -z "$(pacman -Qs poppler | grep 'local/poppler ')" ]; then
echo "This script requires poppler to be installed." echo "This script requires poppler to be installed."
echo "sudo pacman -S poppler" echo "sudo pacman -S poppler"
exit return
fi fi
if [ $# != 3 ]; then if [ $# != 3 ]; then
echo "Usage: input.pdf 1,3-5,7 output.pdf" echo "Usage: input.pdf 1,3-5,7 output.pdf"
exit return
fi fi
IN=$1 IN=$1