Author |
Message |
stu90

Joined: 25 Feb 2010 Posts: 1399 Location: England. Dell Inspiron 1501. Dpup
|
Posted: Sun 20 Feb 2011, 08:52 Post subject:
PAP - Puppy Application Panels - Your favorite apps panel Subject description: Yad / Zenity script |
|
http://img11.imageshack.us/img11/3598/201102200323461280x800s.png
what is it?
Pap is an application panel / launcher.
What does it do?
It allows you to quickly configure a panel of all your favorite applications.
How to use?
On first run a folder is created /root/control this is where the applications links for the panel are stored.
To add a new application to the pap panel click on the 'Add application' button this will open a new GUI with:
1. Application 'name' option
2. Application 'icon' option
3. Application 'executable' option.
Enter a name you wish to use for the application.
Enter or Drag and drop the path to an icon you wish to display ( i find like the desktop icons 48x48 size to be the best )
Enter or drag and drop the path to the application executable - or this could be a terminal command i.e 'rxvt -e mc' for midnight commander file manger.
Now click the 'ok' button and the application should be added to the pap panel
To remove an application from the panel navigate to the /root/control directory and delete which ever application/s you no longer want on the panel.
pap requires Yad / Zenity for the GUI - only a small 26K download here:
http://www.murga-linux.com/puppy/viewtopic.php?t=58306
To install.
Download and move to /root/my-applications/bin
It is a self extracting file just click on it in location.
http://dl.dropbox.com/u/3009188/pap.gz
To uninstall.
Just delete the pap script in /root/my-applications/bin and delete the /root/control directory.
To run.
Click on the script or drag a link to desktop or terminal command: pap.
cheers.
Last edited by stu90 on Thu 24 Feb 2011, 10:48; edited 1 time in total
|
Back to top
|
|
 |
stu90

Joined: 25 Feb 2010 Posts: 1399 Location: England. Dell Inspiron 1501. Dpup
|
Posted: Thu 24 Feb 2011, 10:47 Post subject:
|
|
Not much love for the PaP but here is an update for it anyway.
v.2
Now has a launch bar and support for multiple panels.
Panels of your own choosing can be added to the script on line 6. each panel needs a corresponding directory in: /root/pap/ of the exact same name.
For instance with the example panels that are in the pap v2 script, you would need to create directories:
/root/pap/pap-app
/root/pap/pap-desktop
/root/pap/pap-setup
/root/pap/pap-system
PaP script needs to be placed in:
/root/my-applications/bin
Code: | #!/bin/bash
#pap - bar v 0.2
#stu90
###add /remove panels line 6 - panels need a directory of the same name in /root/pap###
panels="pap-app!pap-setup!pap-desktop!pap-system"
###pap-bar script location line 9###
loc="/root/my-applications/bin/pap-bar"
bar="/tmp/pbar"
yad --title="PaP - Bar" --center --form \
--field="Open Panel":CB "$panels" \
--icons --button="Add To Panels:0" --button="gtk-cancel:1" --button="gtk-ok:2" > $bar
button=$?
case $button in
0)
###pap-add adds new applications to panels###
addap="/tmp/addap"
echo "opening PAP - add gui"
yad --title "PaP - Add Aplication " --width=500 --form --separator='|' \
--text " Add new applications to the panels. " \
--field="Panel Choice":CB "$panels" \
--field="Application Name" "Gnome Mplayer" \
--field="Application Icon" "/usr/share/pixmaps/gnome-mplayer.xpm" \
--field="Application Executable" "/usr/bin/gnome-mplayer" \
--icons --button="gtk-cancel:1" --button="gtk-ok:2" > $addap
button1=$?
case $button1 in
1)
echo "cancel pressed exiting"
exit 0 ;;
2)
panel=$(cut -s -d "|" -f 1 $addap)
name=$(cut -s -d "|" -f 2 $addap)
icon=$(cut -s -d "|" -f 3 $addap)
exec=$(cut -s -d "|" -f 4 $addap)
location="/root/pap/$panel"
echo "[Desktop Entry]" > $location/"$name".desktop
echo "Name=$name" >> $location/"$name".desktop
echo "Icon=$icon" >> $location/"$name".desktop
echo "Exec=$exec" >> $location/"$name".desktop
echo "added '$name' to $panel panel"
;;
esac
rm -f $addap && $loc
;;
1)
echo "cancel pressed exiting"
exit 0 ;;
2)
select=$(cut -s -d "|" -f 1 $bar)
echo "opening $select panel"
yad --title="$select" --geometry=550X350 --center --icons --read-dir="/root/pap/$select/" ;;
esac
rm -f $bar
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 4787 Location: Kingwood, TX
|
Posted: Thu 24 Feb 2011, 15:44 Post subject:
|
|
hmm now you made me think - why did you have to go and do that?
with the no buttons option, if yad can set a background image (not sure??? - may need to use a .gtkrc file for this), this _could_ provide a desktop
use the following jwm group settings
noborder, sticky, maximized, notitle, nofocus, nolist, layer:1
(it may be necessary to use a symlink to yad so that all yad apps don't behave this way)
_________________ Check out my github repositories. I may eventually get around to updating my blogspot.
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 917
|
Posted: Thu 24 Feb 2011, 21:32 Post subject:
|
|
It looks like you can get most of it from the command line-
Quote: |
--on-top
Place window over other windows.
--undecorated
Make window undecorated (remove title and window borders).
--sticky
Make window visible on all desktops.
--no-buttons
Don't show buttons.
--image (but I don't think this is a background image)
|
Cheers,
s
Last edited by seaside on Thu 24 Feb 2011, 23:36; edited 1 time in total
|
Back to top
|
|
 |
harii4

Joined: 30 Jan 2009 Posts: 449 Location: La Porte City, IA , U.S.A.
|
Posted: Thu 24 Feb 2011, 22:58 Post subject:
|
|
Neat!
This sounds much more easy to use than "tabble".
Have not tested it yet - some silly questions?
Can you leave the Application 'name' option blank or do you need to input something?
Is there away to get an tighter icon pattern? (less white/wasted space?)
Looking for an application speed launcher - think "speed dial" menu
_________________ 3.01 Fat Free / Fire Hydrant featherweight/ TXZ_pup / 431JP2012
----------------------------------------------------------------------------------------
Peace and Justice are two sides of the same coin.
|
Back to top
|
|
 |
sc0ttman

Joined: 16 Sep 2009 Posts: 2572 Location: UK
|
Posted: Thu 24 Feb 2011, 23:41 Post subject:
|
|
stu90 wrote: | Not much love for the PaP but here is an update for it anyway. |
I'm just waiting for a yad pet that works in 4.2 (waiting for myself to compile it will take longer )
_________________ Akita Linux, VLC-GTK, Pup Search, Pup File Search
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 917
|
Posted: Fri 25 Feb 2011, 00:01 Post subject:
|
|
sc0ttman wrote: | stu90 wrote: | Not much love for the PaP but here is an update for it anyway. |
I'm just waiting for a yad pet that works in 4.2 (waiting for myself to compile it will take longer ) |
I compiled Yad in 431- might work.
Regards,
s
Description |
Yad compiled in pup431
|

Download |
Filename |
yad.tar.gz |
Filesize |
128.09 KB |
Downloaded |
556 Time(s) |
|
Back to top
|
|
 |
sc0ttman

Joined: 16 Sep 2009 Posts: 2572 Location: UK
|
Posted: Fri 25 Feb 2011, 10:01 Post subject:
|
|
seaside wrote: | sc0ttman wrote: | stu90 wrote: | Not much love for the PaP but here is an update for it anyway. |
I'm just waiting for a yad pet that works in 4.2 (waiting for myself to compile it will take longer ) |
I compiled Yad in 431- might work.
Regards,
s |
Thanks very much for the effort, unfortunately not working...GTK errors or something.. I'll give it a go myself..
_________________ Akita Linux, VLC-GTK, Pup Search, Pup File Search
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 4787 Location: Kingwood, TX
|
Posted: Fri 25 Feb 2011, 10:52 Post subject:
|
|
IIRC it needed gtk-2.16 to compile, upgrade gtk and you should be OK (anything later than 2.16.6 can have some weird side effects on 4.x pups)
_________________ Check out my github repositories. I may eventually get around to updating my blogspot.
|
Back to top
|
|
 |
stu90

Joined: 25 Feb 2010 Posts: 1399 Location: England. Dell Inspiron 1501. Dpup
|
Posted: Fri 25 Feb 2011, 11:25 Post subject:
|
|
Update to v3
Now has ability to add applications from /usr/share/application directory (thanks seaside)
Code: | #!/bin/bash
#pap - bar v 0.3
#stu90
##added select application from existing .desktop/menu files - seaside##
###add /remove panels line 7 - panels need a directory of the same name in /root/pap###
panels="pap-app!pap-setup!pap-desktop!pap-system"
###pap-bar script location line 10###
loc="/root/my-applications/bin/pap-bar"
bar="/tmp/pbar"
yad --title="PaP - Bar" --center --form \
--field="Open Panel":CB "$panels" \
--icons --button="Add To Panels:0" --button="gtk-cancel:1" --button="gtk-ok:2" > $bar
button=$?
case $button in
0)
###pap-add adds new applications to panels###
addap="/tmp/addap"
DESK=`ls /usr/share/applications | yad --separator=" " --center --height=350 \
--text="To add a new Application to your panel select from the \n Application list and click the Add Application button. \n
To add a Custom Application that is not in the Application \n list click the Make Custom button." \
--list --column="Applications" --button="gtk-cancel:1" --button="Make Custom:0" --button="Add Application:0"`
if [ "$?" = "1" ]; then
echo "cancel pressed exiting"
exit 0
fi
for line in /usr/share/applications/$DESK;do
eval `grep -E '^Name|^Icon|^Exec' "$line" | tr " " "_"` # no spaces
done
yad --title "PaP - Add Application " --width=500 --form --separator="|" \
--text " Add new applications to the panels. " \
--field="Panel Choice":CB "$panels" \
--field="Application Name" "$Name" \
--field="Application Icon" "[Enter full path to a custom icon]" \
--field="Application Executable" "$Exec" \
--icons --button="gtk-cancel:1" --button="gtk-ok:2" > $addap
button1=$?
case $button1 in
1)
echo "cancel pressed exiting"
exit 0 ;;
2)
panel=$(cut -s -d "|" -f 1 $addap)
name=$(cut -s -d "|" -f 2 $addap)
icon=$(cut -s -d "|" -f 3 $addap)
exec=$(cut -s -d "|" -f 4 $addap)
location="/root/pap/$panel"
echo "[Desktop Entry]" > $location/"$name".desktop
echo "Name=$name" >> $location/"$name".desktop
echo "Icon=$icon" >> $location/"$name".desktop
echo "Exec=$exec" >> $location/"$name".desktop
echo "added '$name' to $panel panel"
;;
esac
rm -f $addap && $loc
;;
1)
echo "cancel pressed exiting"
exit 0 ;;
2)
select=$(cut -s -d "|" -f 1 $bar)
echo "opening $select panel"
yad --title="$select" --geometry=550X350 --center --icons --sort-by-name --read-dir="/root/pap/$select/" ;;
esac
rm -f $bar |
|
Back to top
|
|
 |
stu90

Joined: 25 Feb 2010 Posts: 1399 Location: England. Dell Inspiron 1501. Dpup
|
Posted: Fri 25 Feb 2011, 11:34 Post subject:
|
|
technosaurus:
Sounds interesting - not sure if you can set the background for Yad or not, i think i recall being able to do something similar for Rox filer so maybe?
harii4:
I don't think it is possible to leave the names blank - Icon spacing seems to be dictated by the name length - bigger the name bigger the spacing, i did notice in Yad --help the option to set --item-width Set the width of dialog items so maybe yo u could get a tighter grouping not sure?
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 917
|
Posted: Fri 25 Feb 2011, 18:47 Post subject:
|
|
stu90,
Looking good.....
You might include the *.desktop icon name shown so it would be possible to track down the path to add.. e.g. Code: | --field="Application Icon" "[Enter full path] $Icon" \ |
Regards,
s
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 4787 Location: Kingwood, TX
|
Posted: Sat 26 Feb 2011, 09:20 Post subject:
|
|
You can get icon paths like this
[ ${ICON:0:1} != / ] && ICON='find /usr/share -iname $ICON'
(Note: I don't have backtick on my Droid for the find part)[/code]
_________________ Check out my github repositories. I may eventually get around to updating my blogspot.
|
Back to top
|
|
 |
seaside
Joined: 11 Apr 2007 Posts: 917
|
Posted: Sat 26 Feb 2011, 12:28 Post subject:
|
|
technosaurus,
Very nice -
Code: |
[ ${Icon:0:1} != / ] && Icon=`find /usr/share -iname $Icon`
|
Thank you,
s
|
Back to top
|
|
 |
oldyeller

Joined: 15 Nov 2011 Posts: 888 Location: Alaska
|
Posted: Thu 15 Aug 2013, 15:14 Post subject:
|
|
Hello stu90/91
This is a nice little app that you have done. Is there a way to make a button for launching the app that you click on?
I am making a pet for it with a desktop file. May put this in one of my remasters!
Cheers
|
Back to top
|
|
 |
|