wok-6.x rev 18098
lxqt-common: Add lxqt in slim.conf
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Fri May 29 11:18:00 2015 +0200 (2015-05-29) |
parents | 31587c741a6f |
children | c8d6c4458d1b |
files | lxqt-common/receipt |
line diff
1.1 --- a/lxqt-common/receipt Thu May 28 12:43:56 2015 +0200 1.2 +++ b/lxqt-common/receipt Fri May 29 11:18:00 2015 +0200 1.3 @@ -36,3 +36,23 @@ 1.4 rm -rf $fs/usr/share/lxqt/themes/* 1.5 cp -a $install/usr/share/lxqt/themes/flat $fs/usr/share/lxqt/themes 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 lxqt to /etc/slim.conf..." 1.14 + sed -i "s/^sessions.*/sessions ${res},lxqt/" $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 lxqt $1/etc/slim.conf; then 1.23 + sed -i s/,lxqt// $1/etc/slim.conf 1.24 + fi 1.25 +} 1.26 +