remove redundant scripts

This commit is contained in:
Night Kaly 2024-05-19 16:35:56 +01:00
parent ab20782e27
commit 59a8d9355e
Signed by: night0721
GPG key ID: 957D67B8DB7A119B
5 changed files with 3 additions and 46 deletions

View file

@ -1,26 +0,0 @@
#!/bin/sh
packages=$(pacman -Qqe)
echo "Time Sort"
for pkg in $packages; do
install_date=$(pacman -Qi $pkg | awk -F': ' '/Install Date/ {print $2}')
install_timestamp=$(date -d "$install_date" "+%Y-%m-%d")
echo "$install_timestamp $pkg"
done | sort -n
echo ""
echo "Size Sort"
for pkg in $packages; do
size=$(pacman -Qi $pkg | grep "Installed Size" | awk -F':' '{print $2}')
unit=$(echo $size | awk '{print $2}')
size=$(echo $size | awk '{print $1}')
if [ "$unit" == "KiB" ]; then
kib+=("$size $unit $pkg")
else
mib+=("$size $unit $pkg")
fi
done
printf "%s\n" "${kib[@]}" | sort -k1,1n -r
printf "%s\n" "${mib[@]}" | sort -k1,1n -r

View file

@ -1,19 +0,0 @@
#!/bin/sh
set -e
HELP='Define by swindlesmccoop\n\nusage: define [word, -h]'
NUMBER_OF_DEFS=2
define_word() {
curl -so "$1.html" "https://www.merriam-webster.com/dictionary/$1"
#handle 404 words
[ "$(cat "$1.html")" = "" ] && echo "Sorry, the word you're looking for can't be found in the dictionary." && exit
printf "Word: $1\n$(grep -o ' <span class="dtText"><strong class="mw_t_bc">: </strong>.*</span>' "$1.html" | sed 's| <span class="dtText"><strong class="mw_t_bc">: </strong>||' | sed "s|<a href = \"/dictionary/.*#h1\" class = 'mw_t_d_link'>||g" | sed "s|<a href = \"/dictionary/extends\" class = 'mw_t_a_link'>||g" | sed 's/<strong class="mw_t_bc">//g' | sed 's/<\/strong>//g' | sed 's/<.*//g' | head -n $NUMBER_OF_DEFS)\n"
rm "$1.html"
}
[ "$1" = "" ] && printf "$HELP\n" && exit
case "$1" in
-h) printf "$HELP\n" ;;
--help) printf "$HELP\n" ;;
*) define_word "$@" ;;
esac

3
.local/bin/system/passmenu Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
argon -Q $(argon -L | wmenu) | tr -d '\n' | wl-copy

1
.rc
View file

@ -39,7 +39,6 @@ alias ipv4="echo \$(curl -s ipinfo.io/ip)"
alias fnf="fnf -l 50"
alias wmenu="wmenu -i -f 'MonaspiceKr Nerd Font 13' -N 1e1e2e -n cdd6f4 -M 1e1e2e -m f38ba8 -S 1e1e2e -s f9e2af -p 'Menu'"
alias hp="bluetoothctl power on && bluetoothctl connect '50:DE:06:D7:C7:30' && pactl set-default-sink 'bluez_output.50_DE_06_D7_C7_30.1'"
alias passmenu="argon -Q \$(argon -L | wmenu) | tr -d '\n' | wl-copy"
# Change directory aliases
alias .='cd ~'