wok-current rev 12308
jwm,razor-qt,slim: fix sessions
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Apr 17 12:29:55 2012 +0200 (2012-04-17) |
parents | 6a1c389593ae |
children | 8b68b81bf9c7 |
files | jwm/receipt razor-qt/receipt slim/stuff/etc/slim.conf |
line diff
1.1 --- a/jwm/receipt Tue Apr 17 12:26:07 2012 +0200 1.2 +++ b/jwm/receipt Tue Apr 17 12:29:55 2012 +0200 1.3 @@ -38,3 +38,22 @@ 1.4 cp $stuff/simple.jwmrc $fs/etc/jwm/simple.jwmrc 1.5 cp $stuff/slitaz.jwmrc $fs/etc/jwm/system.jwmrc 1.6 } 1.7 + 1.8 +post_install() 1.9 +{ 1.10 + res=$(cat $1/etc/slim.conf | grep ^session | sed s/"sessions. *"//) 1.11 + # Adding WM to SLIM available sessions. 1.12 + if ! echo "$res" | grep -q $PACKAGE; then 1.13 + echo -n "Adding $PACKAGE to /etc/slim.conf..." 1.14 + sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" $1/etc/slim.conf 1.15 + status 1.16 + fi 1.17 +} 1.18 + 1.19 +post_remove() 1.20 +{ 1.21 + # Remove WM from SLIM available sessions. 1.22 + if grep -q $PACKAGE $1/etc/slim.conf; then 1.23 + sed -i s/,$PACKAGE// $1/etc/slim.conf 1.24 + fi 1.25 +}
2.1 --- a/razor-qt/receipt Tue Apr 17 12:26:07 2012 +0200 2.2 +++ b/razor-qt/receipt Tue Apr 17 12:29:55 2012 +0200 2.3 @@ -48,7 +48,7 @@ 2.4 # Adding WM to SLIM available sessions. 2.5 if ! echo "$res" | grep -q $PACKAGE; then 2.6 echo -n "Adding $PACKAGE to /etc/slim.conf..." 2.7 - sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" /etc/slim.conf 2.8 + sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" $1/etc/slim.conf 2.9 status 2.10 fi 2.11 }
3.1 --- a/slim/stuff/etc/slim.conf Tue Apr 17 12:26:07 2012 +0200 3.2 +++ b/slim/stuff/etc/slim.conf Tue Apr 17 12:29:55 2012 +0200 3.3 @@ -48,7 +48,7 @@ 3.4 # The current chosen session name is replaced in the login_cmd 3.5 # above, so your login command can handle different sessions. 3.6 # see the xinitrc.sample file shipped with slim sources 3.7 -sessions openbox,e17,jwm 3.8 +sessions openbox 3.9 3.10 # Executed when pressing F11 (requires imagemagick) 3.11 #screenshot_cmd mtpaint -s /root/slim-shot.png