#!/bin/sh #author: Chris Sincock #This software is provided as-is and is not guaranteed to be free of defects. Use it only at your own risk. ok="" extramessage="" selected="pgpanel-" startwith="template" if [ "$1" = "-stdin" ] ; then startwith="stdin" shift elif [ "$1" = "-cfg" ] ; then startwith="$2" shift shift fi [ ! -z "$1" ] && selected="$1" while [ -z "$ok" ] ; do progname=`pgprompt-gtk2 field TITLE="PGPanel Wizard" MESSAGE=" $extramessage Enter the new pgpanel application name below. A new panel configuration will be created in ~/.appname/cfg. You can edit your panel by right clicking on it and using the menu. Remember to pick Panel->App->Save when you are done. You can then run the panel later by making a link called appname to the main pgpanel program and execute pgpanel via the link for example if you create a panel called pgpanel-xmms for controlling the xmms application, you might enter pgpanel-xmms here and then: ln -s /path/to/pgpanel /home/username/bin/pgpanel-movies and run it with: /home/username/bin/pgpanel-xmms " SELECTED="$selected"` [ -z "$progname" ] && exit 0 [ "$progname" = "." ] && exit 0 dir=~/."$progname" if [ -e "$dir" ] ; then extramessage="That directory '$dir' exists! You should manually do something with it, or choose a different name" selected="$progname" continue else mkdir "$dir" break fi done if [ "$startwith" = "stdin" ] ; then cat > "$dir/cfg"; elif [ -f "$startwith" ] ; then mv -f "$startwith" "$dir/cfg" elif [ "$startwith" = "template" ] ; then cfg=" ( #0 { 'GlobalConfig' => { 'debug' => 'false', 'Launcher-Icon' => '/usr/share/pixmaps/gnome-unknown.png', 'Drawer-Closed-Icon' => '/usr/share/pixmaps/panel-drawer.png', 'Logout-Icon' => '/usr/share/pixmaps/gnome-term-night.png', 'Pin-Up-Icon' => '/usr/kde/cur/share/apps/konqueror/pics/indicator_empty.png', 'Pin-Down-Icon' => '/usr/kde/cur/share/apps/konqueror/pics/indicator_viewactive.png', 'Menu-Icon' => '/usr/share/pixmaps/apple-red.png', 'Run-Icon' => '/usr/share/pixmaps/gnome-run.png', 'Lock-Icon' => '/usr/share/pixmaps/gnome-lockscreen.png', 'Unknown-Icon' => '/usr/share/pixmaps/gnome-unknown.png', 'Drawer-Open-Icon ' => '/usr/share/pixmaps/panel-drawer.png', 'applet_border_padding' => '5', 'applet_padding' => '0', 'scaleup' => 'false', 'wintype' => '-popup', 'scaledown' => '1', 'Name' => '', 'tooltips_enabled' => 'false', } }, #1 { 'cfg' => { 'backcolor' => 'black', 'num' => '1', 'exit' => 'exit', 'state' => 'autoshown', 'autohide' => 'true', 'minimize_delay' => '300', 'anchor' => 'top_or_left', 'sz' => '40', 'autohide_size' => '1', 'edge' => 0, 'vis' => 'false', 'offset' => 0, 'Id' => 'Panel', 'Comment' => '', 'orient' => 'top_horiz', 'back_type' => 'color', 'type' => 'sliding', 'scaledown' => 'false', 'Name' => 'Panel_1' }, 'children' => [ #0 { 'pinned' => 'false', 'Id' => 'Pin', 'Pin-Up-Icon' => undef, 'position' => 40, 'Pin-Down-Icon' => undef }, #1 { 'Id' => 'Launcher', 'position' => 280, 'Exec'=>'', }, ] } ) " echo "$cfg" > "$dir/cfg"; else echo the specified config file $startwith does not exist exit -1 fi echo pgpanel2 -n "$progname" pgpanel2 -n "$progname"