diff options
author | DX37 | 2017-05-11 20:46:18 +0700 |
---|---|---|
committer | DX37 | 2017-05-11 20:46:18 +0700 |
commit | 1b1223439b7dffd1deaab19f418483d36463ba3c (patch) | |
tree | 546d5c1aa5d79ed5629d0afc0414ddff3bb9e7b2 | |
parent | 74de005747e4c6731030e8fabc30a175cf1e6296 (diff) | |
download | aur-1b1223439b7dffd1deaab19f418483d36463ba3c.tar.gz |
Updates
- Add install of ghost icon
- Test add/remove entries again
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 12 | ||||
-rw-r--r-- | xlunch-conf-install.hook | 2 | ||||
-rw-r--r-- | xlunch-conf-remove.hook | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | xlunch-create-entry | 24 |
5 files changed, 27 insertions, 19 deletions
@@ -1,7 +1,7 @@ pkgbase = xlunch-git pkgdesc = Graphical app launcher for X with little dependencies - pkgver = 2.4.1.r1.g0468acc - pkgrel = 3 + pkgver = 2.4.2.r10.g6232b65 + pkgrel = 2 url = http://xlunch.org/ arch = i686 arch = x86_64 @@ -20,7 +20,7 @@ pkgbase = xlunch-git source = xlunch-conf-install.hook source = xlunch-conf-remove.hook md5sums = SKIP - md5sums = ebf49f8a249a0ff0f4f19a713064fb5c + md5sums = 40ad36fdfdba2889033bd2d7582f9643 md5sums = 5cedcafe1ba39961a84f1634958ca478 md5sums = b3e91a3ded90c24d56a42df84124df29 md5sums = aa9654e2adae39523d5d56abd4cbca92 @@ -2,8 +2,8 @@ _pkgname=xlunch pkgname=xlunch-git -pkgver=2.4.1.r1.g0468acc -pkgrel=3 +pkgver=2.4.2.r10.g6232b65 +pkgrel=2 pkgdesc="Graphical app launcher for X with little dependencies" arch=('i686' 'x86_64') url="http://xlunch.org/" @@ -18,10 +18,10 @@ source=('git+https://github.com/Tomas-M/xlunch.git' 'xlunch-conf-install.hook' 'xlunch-conf-remove.hook') md5sums=('SKIP' - 'ebf49f8a249a0ff0f4f19a713064fb5c' + '58a813e6c232489f887a32966addde8a' '5cedcafe1ba39961a84f1634958ca478' - 'b3e91a3ded90c24d56a42df84124df29' - 'aa9654e2adae39523d5d56abd4cbca92') + 'ccaf7547b8ceeb11badb2a08b3c592f7' + '832317d10246dd7b2ac17c599b19f441') pkgver() { cd "$_pkgname" @@ -39,6 +39,8 @@ package() { install -Dm755 extra/genconf "$pkgdir"/usr/bin/xlunch-genconf install -Dm755 extra/sample_config.cfg "$pkgdir"/etc/xlunch/icons.conf install -Dm755 ../xlunch-create-entry "$pkgdir"/usr/bin/xlunch-create-entry + + install -Dm644 extra/ghost.png "$pkgdir"/usr/share/icons/hicolor/48x48/apps/xlunch_ghost.png install -Dm644 ../xlunch-conf-gen.hook "$pkgdir"/usr/share/libalpm/hooks/xlunch-conf-gen.hook install -Dm644 ../xlunch-conf-install.hook "$pkgdir"/usr/share/libalpm/hooks/xlunch-conf-install.hook install -Dm644 ../xlunch-conf-remove.hook "$pkgdir"/usr/share/libalpm/hooks/xlunch-conf-remove.hook diff --git a/xlunch-conf-install.hook b/xlunch-conf-install.hook index 9645d9e465fc..fb6b0661e65f 100644 --- a/xlunch-conf-install.hook +++ b/xlunch-conf-install.hook @@ -6,6 +6,6 @@ Target = usr/share/applications/* [Action] Description = Updating xlunch icons.conf... -Exec = bin/sh -c 'while read -r f; do xlunch-create-entry "$f" >> /etc/xlunch/icons.conf; cat /etc/xlunch/icons.conf | sort | uniq > /etc/xlunch/icons-new.conf; mv /etc/xlunch/icons-new.conf /etc/xlunch/icons.conf; done' +Exec = bin/bash -c 'while read -r f; do xlunch-create-entry "$f" >> /etc/xlunch/icons.conf; cat /etc/xlunch/icons.conf | sort | uniq > /etc/xlunch/icons-new.conf; mv /etc/xlunch/icons-new.conf /etc/xlunch/icons.conf; done 2>/dev/null' When = PostTransaction NeedsTargets diff --git a/xlunch-conf-remove.hook b/xlunch-conf-remove.hook index e364174ae357..91c92db8fb62 100644 --- a/xlunch-conf-remove.hook +++ b/xlunch-conf-remove.hook @@ -5,6 +5,6 @@ Target = usr/share/applications/* [Action] Description = Updating xlunch icons.conf... -Exec = bin/sh -c 'while read -r f; do if [ '$f' != "/usr/share/applications" -a -n '$f' ]; then grep -v "$(xlunch-create-entry '$f')" /etc/xlunch/icons.conf > /etc/xlunch/icons-new.conf; fi; if [ -n "$(cat /etc/xlunch/icons-new.conf)" ]; then mv /etc/xlunch/icons-new.conf /etc/xlunch/icons.conf; fi; done' +Exec = bin/bash -c 'while read -r f; do grep -v "$(xlunch-create-entry '$f')" /etc/xlunch/icons.conf > /etc/xlunch/icons-new.conf; if [ -n "$(cat /etc/xlunch/icons-new.conf)" ]; then mv /etc/xlunch/icons-new.conf /etc/xlunch/icons.conf; fi; done' When = PreTransaction NeedsTargets diff --git a/xlunch-create-entry b/xlunch-create-entry index 178bc31e1555..0e9b17824e7f 100644..100755 --- a/xlunch-create-entry +++ b/xlunch-create-entry @@ -1,23 +1,29 @@ -#!/bin/sh +#!/bin/bash APPS=/usr/share/applications ICONS=/usr/share/icons/hicolor SIZE=48 -echo $1 | fgrep .desktop | while read DESKTOPFILE; do - NAME="$(cat $DESKTOPFILE | egrep -i "^Name=" | head -n 1 | cut -d "=" -f 2-)" - EXEC="$(cat $DESKTOPFILE | egrep -i "^Exec=" | head -n 1 | cut -d "=" -f 2-)" - ICON="$(cat $DESKTOPFILE | egrep -i "^Icon=" | head -n 1 | cut -d "=" -f 2-)" - TERM="$(cat $DESKTOPFILE | egrep -i "^Terminal=" | head -n 1 | cut -d "=" -f 2-)" +echo "/$1" | grep ".desktop" | while read DESKTOPFILE; do + FDATA="$(cat $DESKTOPFILE)" + NAME="$(echo "$FDATA" | grep -i "^Name=" | head -n 1 | cut -d "=" -f 2-)" + EXEC="$(echo "$FDATA" | grep -i "^Exec=" | head -n 1 | cut -d "=" -f 2-)" + ICON="$(echo "$FDATA" | grep -i "^Icon=" | head -n 1 | cut -d "=" -f 2-)" + USETERM="$(echo "$FDATA" | grep -i "^Terminal=" | head -n 1 | cut -d "=" -f 2-)" - if [ "$TERM" = "true" ]; then - EXEC="xterm -e ""$EXEC" + if [ "$USETERM" = "true" ]; then + EXEC="$TERM -e ""$EXEC" fi if [ "$ICON" != "" ]; then - ICON=$(find "$ICONS" | grep $SIZE"x"$SIZE | grep $ICON"[.]png" | head -n 1) + ICON="$(find "$ICONS" | grep $SIZE"x"$SIZE | grep $ICON"[.]png" | head -n 1)" if [ "$ICON" != "" -a "$EXEC" != "" -a "$NAME" != "" ]; then echo "$NAME;$ICON;$EXEC" + else + ICON="$(find "$ICONS" | grep "scalable" | grep -E $ICON"[.](png|svg)" | head -n 1)" + if [ "$ICON" != "" -a "$EXEC" != "" -a "$NAME" != "" ]; then + echo "$NAME;$ICON;$EXEC" + fi fi fi done | sort | uniq |