From df0b86039603454c8e66da2add097f8aee1a499f Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Sat, 25 Jan 2020 20:01:57 +0100 Subject: [PATCH] Remove scripts directory and enable basic autocompletion on dotgit command --- .zshrc | 1 + scripts/flameshot_upload.sh | 21 ------------------- scripts/flameshot_upload_latest.sh | 20 ------------------ .../list_packages_sorted_by_install_date.sh | 8 ------- scripts/security-updates-check.sh | 14 ------------- 5 files changed, 1 insertion(+), 63 deletions(-) delete mode 100755 scripts/flameshot_upload.sh delete mode 100755 scripts/flameshot_upload_latest.sh delete mode 100644 scripts/list_packages_sorted_by_install_date.sh delete mode 100755 scripts/security-updates-check.sh diff --git a/.zshrc b/.zshrc index b53a35f..aeff6bb 100644 --- a/.zshrc +++ b/.zshrc @@ -42,6 +42,7 @@ VISUAL=$EDITOR setopt complete_aliases alias dotgit='git --git-dir=$HOME/dotfiles/ --work-tree=$HOME' +compdef dotgit='git' alias authy="/usr/bin/electron4 --app /usr/lib/authy/app.asar" alias syslog="sudo journalctl -f | ccze" diff --git a/scripts/flameshot_upload.sh b/scripts/flameshot_upload.sh deleted file mode 100755 index 232dbc3..0000000 --- a/scripts/flameshot_upload.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -file_name=$(echo ~/Pictures/Screenshots/) -base_name=$(date +%F_%H-%M-%S) -base_name+=".png" - -file_name+=$base_name - -flameshot gui -r > $file_name - -sftp -oPort=4242 gaudonpr@ftp.gaudon.pro << EOT -cd public_html/push.arisu.fr/ -put $file_name -EOT - -url="https://push.arisu.fr/" -url+=$base_name - -echo $url | xclip -selection clipboard - -notify-send "File upload complete" "$url" --icon=flameshot.svg diff --git a/scripts/flameshot_upload_latest.sh b/scripts/flameshot_upload_latest.sh deleted file mode 100755 index acd96a3..0000000 --- a/scripts/flameshot_upload_latest.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -latest_screenshot=$(ls -t ~/Pictures/Screenshots/ | head -1) - -file_name=$(echo ~/Pictures/Screenshots/) -base_name=$latest_screenshot - -file_name+=$base_name - -sftp -oPort=4242 gaudonpr@ftp.gaudon.pro << EOT -cd public_html/push.arisu.fr/ -put $file_name -EOT - -url="https://push.arisu.fr/" -url+=$base_name - -echo $url | xclip -selection clipboard - -notify-send "File upload complete" "$url" --icon=flameshot.svg diff --git a/scripts/list_packages_sorted_by_install_date.sh b/scripts/list_packages_sorted_by_install_date.sh deleted file mode 100644 index dcf7a97..0000000 --- a/scripts/list_packages_sorted_by_install_date.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -for i in $(pacman -Qq) -do - grep "\[ALPM\] installed $i" /var/log/pacman.log -done | \ - sort -u | \ - sed -e 's/\[ALPM\] installed //' -e 's/(.*$//' diff --git a/scripts/security-updates-check.sh b/scripts/security-updates-check.sh deleted file mode 100755 index f1b89c5..0000000 --- a/scripts/security-updates-check.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -UPDATES=$(arch-audit --upgradable | sed "{s/\n/
/g}") - -if test "$1" != "true" -then - UPDATES=$(echo -e "$UPDATES" | grep -v "testing repos\!") -fi - -echo -e "$UPDATES" - -if [ ! -z "$UPDATES" ]; then - sudo -u arisu DISPLAY=:0 DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus notify-send -u critical -t 86400000 -i update-high "Security updates are available" "$UPDATES" --app-name="Security Updates Check" -fi