Browse Source

cleanup + autostart skeleton update

master
Von Random 2 years ago
parent
commit
e59ac3138a
3 changed files with 2 additions and 32 deletions
  1. 2
    4
      autostart
  2. 0
    6
      pacman-du.zsh
  3. 0
    22
      pmah.zsh

+ 2
- 4
autostart View File

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

+ 0
- 6
pacman-du.zsh 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

+ 0
- 22
pmah.zsh 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

Loading…
Cancel
Save