Page 1 of 2

PAP - Puppy Application Panels - Your favorite apps panel

Posted: Sun 20 Feb 2011, 12:52
by stu90
Image
http://img11.imageshack.us/img11/3598/2 ... 0x800s.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.

Posted: Thu 24 Feb 2011, 14:47
by stu90
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

Image

Code: Select all

#!/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

Posted: Thu 24 Feb 2011, 19:44
by technosaurus
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)

Posted: Fri 25 Feb 2011, 01:32
by seaside
It looks like you can get most of it from the command line-
--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

Posted: Fri 25 Feb 2011, 02:58
by harii4
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

Posted: Fri 25 Feb 2011, 03:41
by sc0ttman
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 :lol: )

Posted: Fri 25 Feb 2011, 04:01
by seaside
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 :lol: )
I compiled Yad in 431- might work.

Regards,
s

Posted: Fri 25 Feb 2011, 14:01
by sc0ttman
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 :lol: )
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..

Posted: Fri 25 Feb 2011, 14:52
by technosaurus
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)

Posted: Fri 25 Feb 2011, 15:25
by stu90
Update to v3
Now has ability to add applications from /usr/share/application directory (thanks seaside)

Image

Code: Select all

#!/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

Posted: Fri 25 Feb 2011, 15:34
by stu90
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?

Posted: Fri 25 Feb 2011, 22:47
by seaside
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: Select all

--field="Application Icon" "[Enter full path]  $Icon" \ 
Regards,
s

Posted: Sat 26 Feb 2011, 13:20
by technosaurus
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]

Posted: Sat 26 Feb 2011, 16:28
by seaside
technosaurus,

Very nice -

Code: Select all

[ ${Icon:0:1} != / ] && Icon=`find /usr/share -iname $Icon` 
Thank you,
s

Posted: Thu 15 Aug 2013, 19:14
by oldyeller
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

Posted: Fri 23 Aug 2013, 14:30
by stu91
oldyeller wrote: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
Hi oldyeller,
Just seen you message here - been i while since i last look at this script - i'm not sure what you mean by making a button? - clicking on the icons will launch the app.

Posted: Fri 23 Aug 2013, 16:07
by oldyeller
Hi stu91,

I guess I just got use to doing one click for apps. So I though about a launcher button for this. Probably don't need one.


Cheers

PAP

Posted: Sat 24 Aug 2013, 13:24
by vicmz
I'd like to implement PAP (I'll gettext it for translators) in OpenboxPlus for the Tint2 panel, which doesn't have a menu. What's the latest version?

Posted: Sat 24 Aug 2013, 13:39
by oldyeller
Hi stu91

Here is the pet for this. I named it 3.0 not sure if this would be right, but we can fix it if you want to much the version number. I do think that it does though.

Let me know if any thing is broken so that it can get fixed

Cheers

Re: PAP

Posted: Sun 25 Aug 2013, 16:05
by stu91
vicmz wrote:I'd like to implement PAP (I'll gettext it for translators) in OpenboxPlus for the Tint2 panel, which doesn't have a menu. What's the latest version?
Hi vicmz,
Its been quite a while since i looked at this script - i think the latest version is whats posted on page one of this thread 0.3? i have a version 0.1 here but im not really sure if it something i started over again or just an earlier version to what i posted - i will have a look tomorrow.