Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 29 Aug 2014, 18:47
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
How to show my custom Menu on all desktops?SOLVED
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [10 Posts]  
Author Message
oldyeller


Joined: 15 Nov 2011
Posts: 779
Location: Mishawaka IN

PostPosted: Fri 13 Jun 2014, 14:21    Post subject:  How to show my custom Menu on all desktops?SOLVED  

Hello Everyone,

I have made a menu and would like to have it show up on all the desktops when switching from one to the other.

I have no idea on how to do this. This is the code for the menu.

Code:

#! /bin/bash

if [ "`which gtkdialog4`" ]; then
 GTKDIALOG=gtkdialog4
elif [ "`which gtkdialog3`" ]; then
 GTKDIALOG=gtkdialog3
else
 GTKDIALOG=gtkdialog
fi


export WORKDIR="/usr/local/MannaMenu"
export ICONSDIR="/usr/local/MannaMenu/icons"

if [ "`which ParallelBible`" ]; then
PARALLELBIBLE='
<button tooltip-text="Parallel Bible"  height-request="0" width-request="0">
  <input file>'$ICONSDIR'/Bible.png</input><height>30</height><width>60</width>
  <action>ParallelBible &</action>
</button>'
else
PARALLELBIBLE=''
fi

if [ "`which ISBE`" ]; then
ISBE='
<button tooltip-text="THE INTERNATIONAL STANDARD BIBLE ENCYCLOPEDIA"  height-request="0" width-request="0">
  <input file>'$ICONSDIR'/Book2.png</input><height>30</height><width>60</width>
  <action>ISBE &</action>
</button>'
else
ISBE=''
fi

if [ "`which STRONGS`" ]; then
STRONGS='
<button tooltip-text="Strongs"  height-request="0" width-request="0">
  <input file>'$ICONSDIR'/Book2.png</input><height>30</height><width>60</width>
  <action>STRONGS &</action>
</button>'
else
STRONGS=''
fi

if [ "`which /usr/local/Kiyut/Alkitab-2_9_1/bin/alkitab`" ]; then
ALKITAB='
<button tooltip-text="Alkitab Bible Study"  height-request="0" width-request="0">
  <input file>'$ICONSDIR'/alkitab48.png</input><height>30</height><width>60</width>
  <action>/usr/local/Kiyut/Alkitab-2_9_1/bin/alkitab &</action>
</button>'
else
ALKITAB=''
fi

if [ "`which /root/bibledesktop-1.6/BibleDesktop.sh`" ]; then
BIBLEDESKTOP='
<button tooltip-text="Bible Desktop"  height-request="0" width-request="0">
  <input file>'$ICONSDIR'/BibleDesktop128.png</input><height>30</height><width>60</width>
  <action>/root/bibledesktop-1.6/BibleDesktop.sh &</action>
</button>'
else
BIBLEDESKTOP=''
fi

if [ "`which bibleanalyzer4.sh`" ]; then
   BibleAnalyzer4='
<button tooltip-text="BibleAnalyzer"  height-request="0" width-request="0">
  <input file>'$ICONSDIR'/75DE_BibleAnalyzer4.0.png</input><height>30</height><width>60</width>
  <action>bibleanalyzer4.sh &</action>
</button>'
else
   BibleAnalyzer4=''
fi

if [ "`which bibletime`" ]; then
   bibletime='
<button tooltip-text="bibletime"  height-request="0" width-request="0">
  <input file>'$ICONSDIR'/bibletime.xpm</input><height>30</height><width>60</width>
  <action>bibletime &</action>
</button>'

else
   bibletime=''
fi

if [ "`which e-Sword.sh`" ]; then
   eSword='
<button tooltip-text="esword"  height-request="0" width-request="0">
  <input file>'$ICONSDIR'/esword.png</input><height>30</height><width>60</width>
  <action>e-Sword.sh &</action>
</button>'

else
   eSword=''
fi

if [ "`which theword.sh`" ]; then
   theWord='
<button tooltip-text="theWord"  height-request="0" width-request="0">
  <input file>'$ICONSDIR'/CB2C_theword.0.png</input><height>30</height><width>60</width>
  <action>theword.sh &</action>
</button>'

 else
   theWord=''
fi

if [ "`which xiphos`" ]; then
   xiphos='
<button tooltip-text="xiphos"  height-request="0" width-request="0">
  <input file>'$ICONSDIR'/xiphos.svg</input><height>30</height><width>60</width>
  <action>xiphos &</action>
</button>'

else
   xiphos=''
fi

RIGHT=10 DOWN=200= WIDTH=0 HEIGHT=0

export MAIN_DIALOG='
<window title="MannaMenu" icon-name="Com" decorated="false" skip_taskbar_hint="true" >
<vbox>

<button tooltip-text="Bible Reader" height-request="0" width-request="0">
  <input file>'$ICONSDIR'/KJV.png</input><height>30</height><width>60</width>
  <action>Manna &</action>
</button>

'$PARALLELBIBLE'

<button tooltip-text="Teachings"  height-request="0" width-request="0">
  <input file>'$ICONSDIR'/Com.png</input><height>30</height><width>60</width>
  <action>studies &</action>
</button>

'$ISBE'

'$STRONGS'

'$ALKITAB'

'$BibleAnalyzer4'

'$BIBLEDESKTOP'

'$bibletime'

'$eSword'

'$theWord'

'$xiphos'

<button tooltip-text="Editor"  height-request="0" width-request="0">
  <input file>'$ICONSDIR'/typewriter.png</input><height>30</height><width>60</width>
  <action>Editor &</action>
</button>

<hbox homogeneous="true">
<button tooltip-text="Refesh">
  <input file>'$ICONSDIR'/refresh.png</input><height>15</height><width>30</width>
  <action>'$WORKDIR'/Manna-Menu &</action>
      <action type="exit">quit_now</action>
  </button>
  </hbox>
</vbox>
</window>
'

gtkdialog --program=MAIN_DIALOG -G ${1-${WIDTH}x${HEIGHT}+${RIGHT}+${DOWN}}


Any help with this would be great.

Last edited by oldyeller on Sat 14 Jun 2014, 18:58; edited 1 time in total
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4231
Location: Gatineau (Qc), Canada

PostPosted: Sat 14 Jun 2014, 00:03    Post subject:  

Code:
#!/bin/sh
# oy-menu-wrapper.sh
####
oy-menu.sh &
# Your MannaMenu dialog (above)
sleep 0.5s
wmctrl -r MannaMenu -b toggle,sticky


More below.

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)

Last edited by musher0 on Sat 14 Jun 2014, 00:29; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
musher0


Joined: 04 Jan 2009
Posts: 4231
Location: Gatineau (Qc), Canada

PostPosted: Sat 14 Jun 2014, 00:25    Post subject:  

Hi, oldyeller.

If your window manager is jwm, there are explanations about making
programs and menus sticky here:
http://joewing.net/projects/jwm/config.shtml
The reference is out of charity Confused, since I thoroughly dislike jwm.

You may be able to add a <Group> called "MannaMenu" with the "sticky"
option in file /root/.jwm/jwmrc-personal.
Someone with thorough experience of jwm (meaning: not me!) should be
advising you if you choose that route.

That said, wmctrl does a fine job of displaying it on all desktops. Of
course, I do not have your underlying programs, but do you see the little
white vertical bar in the dark grey pager in the picture? That's your Manna
Menu with the sticky attribute set up by wmctrl, displayed on all desktops.

wmctrl is available from http://tomas.styblo.name/wmctrl/

Taking "all desktops" in another sense, you could of course add an icon
to the ROX backdrop for your menu.

Best regards.

musher0
stickyMannaMenu-with-wmctrl.jpg
 Description   (Magnification: 200 %)
 Filesize   26.44 KB
 Viewed   127 Time(s)

stickyMannaMenu-with-wmctrl.jpg


_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
musher0


Joined: 04 Jan 2009
Posts: 4231
Location: Gatineau (Qc), Canada

PostPosted: Sat 14 Jun 2014, 01:01    Post subject:  

An improvement! Smile

Code:
#!/bin/sh
# MannaMenu-wrapper.sh # As an on/off switch.
# musher0, Sat. June 14, 2014
####
if [ "`wmctrl -l | awk '$4=="MannaMenu"'`" ];then
# If MannaMenu is open,
   wmctrl -c MannaMenu
# close it.
   else # Otherwise, open it.
   MannaMenu.sh &
   # Your MannaMenu dialog script
   sleep 0.5s
   wmctrl -r MannaMenu -b toggle,sticky
fi


This way, wmctrl's on-and-off switch feature ( -c ) can be used as well.
Let's say that you have this MannaMenu wrapper as the icon for Manna
Menu on the desktop. Click once, you open the MannaMenu. Click a 2nd
time, and you close it.

Enjoy!

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
oldyeller


Joined: 15 Nov 2011
Posts: 779
Location: Mishawaka IN

PostPosted: Sat 14 Jun 2014, 13:03    Post subject:  

musher0,
Do you have a ./configure for this?
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4231
Location: Gatineau (Qc), Canada

PostPosted: Sat 14 Jun 2014, 14:49    Post subject:  

oldyeller wrote:
musher0,
Do you have a ./configure for this?


Not really! Smile
wmctrl-1.07.pet
Description 
pet

 Download 
Filename  wmctrl-1.07.pet 
Filesize  19.3 KB 
Downloaded  35 Time(s) 

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
oldyeller


Joined: 15 Nov 2011
Posts: 779
Location: Mishawaka IN

PostPosted: Sat 14 Jun 2014, 15:03    Post subject:  

Thanks for the pet. Will give all a try see.

Cheers
Back to top
View user's profile Send private message 
oldyeller


Joined: 15 Nov 2011
Posts: 779
Location: Mishawaka IN

PostPosted: Sat 14 Jun 2014, 15:21    Post subject:  

musher0 wrote:
Code:
#!/bin/sh
# oy-menu-wrapper.sh
####
oy-menu.sh &
# Your MannaMenu dialog (above)
sleep 0.5s
wmctrl -r MannaMenu -b toggle,sticky


More below.


I did give it a try but no joy,
Would you be willy to code this and put it up as a .gz file for me
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4231
Location: Gatineau (Qc), Canada

PostPosted: Sat 14 Jun 2014, 18:15    Post subject:  

Hello, old yeller.

I'm surprised at such a request coming from an experienced Pupy-ist
such as yourself.

Surely you know how to do a copy-and-paste, from an insert in a post on
the forum to a window in an opened editor? Surely you know how to
save a script from your text editor? Surely you know how to make
executable the resulting saved bash script?

Sorry for being so blunt, but I do not wish to encourage laziness, and I
certainly don't like to feel I'm being taken advantage of. I am quite willing
to help a user, but I do need to feel there has been some sort of effort on
his(her) side.

Please do the steps above (in the 2nd paragraph) before proceeding to
anything else. We'll take it from there if some more help is necessary.

Those steps are really simple and basic. If you are not successful, a step-
by-step account of what you did would be most helpful in pinpointing what
step you missed or did wrong.

Respectfully.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
oldyeller


Joined: 15 Nov 2011
Posts: 779
Location: Mishawaka IN

PostPosted: Sat 14 Jun 2014, 18:58    Post subject:  

musher0 wrote:
Hello, old yeller.

I'm surprised at such a request coming from an experienced Pupy-ist
such as yourself.

Surely you know how to do a copy-and-paste, from an insert in a post on
the forum to a window in an opened editor? Surely you know how to
save a script from your text editor? Surely you know how to make
executable the resulting saved bash script?

Sorry for being so blunt, but I do not wish to encourage laziness, and I
certainly don't like to feel I'm being taken advantage of. I am quite willing
to help a user, but I do need to feel there has been some sort of effort on
his(her) side.

Please do the steps above (in the 2nd paragraph) before proceeding to
anything else. We'll take it from there if some more help is necessary.

Those steps are really simple and basic. If you are not successful, a step-
by-step account of what you did would be most helpful in pinpointing what
step you missed or did wrong.

Respectfully.

musher0


You are right of course Very Happy Just tired from doing a lot of coding these past few weeks. Will work it out, thanks for all of your input. Will get it going with this or checking into jwmrc.

Cheers
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [10 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0890s ][ Queries: 13 (0.0089s) ][ GZIP on ]