# HG changeset patch # User Mallory MOLLO # Date 1242672320 -7200 # Node ID fbb5d580ddc3e70be34cc50e38734238fefd26e3 # Parent 192bfaa1ae87ef30471cd5024933ab39362bcbf7 Awesome: add entry into Slim sessions diff -r 192bfaa1ae87 -r fbb5d580ddc3 awesome/receipt --- a/awesome/receipt Mon May 18 20:44:43 2009 +0200 +++ b/awesome/receipt Mon May 18 20:45:20 2009 +0200 @@ -31,3 +31,22 @@ cp -a $_pkg/usr/share $fs/usr } +post_install() +{ + res=`cat $1/etc/slim.conf | grep ^session | sed s/"sessions. *"//` + # Adding WM to SLIM available sessions. + if ! echo "$res" | grep -q $PACKAGE; then + echo -n "Adding $PACKAGE to /etc/slim.conf..." + sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" /etc/slim.conf + status + fi +} + +post_remove() +{ + # Remove WM from SLIM available sessions. + if grep -q $PACKAGE $1/etc/slim.conf; then + sed -i s/,$PACKAGE// $1/etc/slim.conf + fi +} +