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
6 6
 {
7 7
     # check if the service is running and, if not, start it in the background
8 8
     # and detach
9
-    service=$1
10
-    if pgrep -u $USER ${service} >/dev/null; then
9
+    if pgrep -u $USER $1 >/dev/null; then
11 10
         return 0
12 11
     else
13
-        ${service} &
14
-        disown
12
+        $* &>/dev/null </dev/null & disown
15 13
     fi
16 14
 }
17 15
 #check_start nm-applet

+ 0
- 6
pacman-du.zsh View File

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

+ 0
- 22
pmah.zsh View File

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

Loading…
Cancel
Save