PAP - Puppy Application Panels - Your favorite apps panel

How to do things, solutions, recipes, tutorials
Message
Author
stu90

PAP - Puppy Application Panels - Your favorite apps panel

#1 Post 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.
Last edited by stu90 on Thu 24 Feb 2011, 14:48, edited 1 time in total.

stu90

#2 Post 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

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#3 Post 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)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#4 Post 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
Last edited by seaside on Fri 25 Feb 2011, 03:36, edited 1 time in total.

User avatar
harii4
Posts: 448
Joined: Fri 30 Jan 2009, 04:08
Location: La Porte City, IA , U.S.A.
Contact:

#5 Post 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
3.01 Fat Free / Fire Hydrant featherweight/ TXZ_pup / 431JP2012
----------------------------------------------------------------------------------------
Peace and Justice are two sides of the same coin.

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#6 Post 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: )
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#7 Post 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
Attachments
yad.tar.gz
Yad compiled in pup431
(128.09 KiB) Downloaded 811 times

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#8 Post 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..
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#9 Post 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)
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

stu90

#10 Post 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

stu90

#11 Post 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?

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#12 Post 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

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#13 Post 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]
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#14 Post by seaside »

technosaurus,

Very nice -

Code: Select all

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

User avatar
oldyeller
Posts: 889
Joined: Tue 15 Nov 2011, 14:26
Location: Alaska

#15 Post 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

User avatar
stu91
Posts: 145
Joined: Mon 06 Aug 2012, 15:11
Location: England. Dpup. Dell Inspiron 1501

#16 Post 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.

User avatar
oldyeller
Posts: 889
Joined: Tue 15 Nov 2011, 14:26
Location: Alaska

#17 Post 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

User avatar
vicmz
Posts: 1262
Joined: Sun 15 Jan 2012, 22:47

PAP

#18 Post 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?
[url=http://murga-linux.com/puppy/viewtopic.php?t=76948]Puppy Linux en español[/url]

User avatar
oldyeller
Posts: 889
Joined: Tue 15 Nov 2011, 14:26
Location: Alaska

#19 Post 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
Attachments
pap-3.0.pet
(4.81 KiB) Downloaded 280 times

User avatar
stu91
Posts: 145
Joined: Mon 06 Aug 2012, 15:11
Location: England. Dpup. Dell Inspiron 1501

Re: PAP

#20 Post 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.

Post Reply