cleanup + autostart skeleton update

This commit is contained in:
Von Random 2017-05-10 18:17:24 +03:00
parent 06dca61343
commit e59ac3138a
3 changed files with 2 additions and 32 deletions

View file

@ -6,12 +6,10 @@ function check_start
{ {
# check if the service is running and, if not, start it in the background # check if the service is running and, if not, start it in the background
# and detach # and detach
service=$1 if pgrep -u $USER $1 >/dev/null; then
if pgrep -u $USER ${service} >/dev/null; then
return 0 return 0
else else
${service} & $* &>/dev/null </dev/null & disown
disown
fi fi
} }
#check_start nm-applet #check_start nm-applet

View file

@ -1,6 +0,0 @@
#!/usr/bin/env zsh
pacman -Q|while read package _; do
pkg_size=$(pacman -Qi $package|grep 'Installed Size'|awk '{print $4$5}')
printf "%s %s\n" $pkg_size $package
done
exit 0

View file

@ -1,22 +0,0 @@
#!/usr/bin/env zsh
# poor man's aur helper
uri='https://aur.archlinux.org'
dldir='/tmp/aur'
for i in jq curl; do
whence $i &>/dev/null || { printf "missing %s!\n" $i >&2; exit 1 }
done
updates=()
pacman -Qm | while read package version; do
eval upstream=$(curl -s "$uri/rpc.php?type=info&arg=$package"|jq '.results.Version?')
if [[ -n $upstream && $version != $upstream ]]; then
printf "%s :: %s -> %s\n" $package $version $upstream
updates+=$package
fi
done
printf 'Do you want to download the pkgbuilds to %s? (C-c to cancel)' $dldir
read none
mkdir -p $dldir
cd $dldir
for i in $updates; do
git clone "$uri/$i.git"
done