From d8542bad36ded022ad4d70fc0a40cd1634c8205c Mon Sep 17 00:00:00 2001 From: Michael Mrozek Date: Wed, 7 Apr 2010 00:29:55 +0200 Subject: [PATCH] op_switchgui: Changed to work with a config file. --- .../pandora-scripts/op_switchgui.sh | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) mode change 100644 => 100755 recipes/pandora-system/pandora-scripts/op_switchgui.sh diff --git a/recipes/pandora-system/pandora-scripts/op_switchgui.sh b/recipes/pandora-system/pandora-scripts/op_switchgui.sh old mode 100644 new mode 100755 index 051f55c..043e0e5 --- a/recipes/pandora-system/pandora-scripts/op_switchgui.sh +++ b/recipes/pandora-system/pandora-scripts/op_switchgui.sh @@ -1,14 +1,18 @@ -#!/bin/sh -launcher=$(zenity --height 240 --list --title="Switch to a different GUI" --text="Please select the GUI you want to switch to.\nNote: All running applications will be terminated!" --column "return" --print-column=1 --hide-column=1 --column "Pick a launcher" "startxfce4" "Switch to Xfce" "startmmenu" "Switch to MiniMenu" "pmenu" "Switch to PMenu" "startnetbooklauncher" "Switch to Netbook Launcher") +#!/bin/bash -if [ "$launcher" == "" ]; then - exit 0 +selection=$(cat /etc/pandora/conf/gui.conf | awk -F\; '{print $1 "\n" $2 }' | zenity --width=500 --height=300 --title="Switch to a different GUI" --list --multiple --column "name" --column "description" --text "Select a GUI you want to switch to" ) +echo $selection + +gui=$(grep $selection /etc/pandora/conf/gui.conf | awk -F\; '{print $3}') +stopnew=$(grep $selection /etc/pandora/conf/gui.conf | awk -F\; '{print $4}') + +echo $gui + +if [ $gui ]; then + echo "$gui" > /tmp/gui.load + echo "$stopnew" > /tmp/gui.stopnew + echo $selection will be started + /tmp/gui.stop else - echo "$launcher" > /tmp/gui.load - if [ "$(pidof xfce4-session)" ] - then - xfce4-session-logout --logout - else - killall netbook-launcher-efl - fi -fi + exit 0 +fi \ No newline at end of file -- 2.39.2