Hacked aemenu

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

Hacked aemenu

#1 Post by vovchik »

Dear all,

I decided to add a feature to aemenu to permit pango markup to be used for menu items (fonts, colours, styles). I have attached my modded source and another archive with demos. The binary I included is 32-bit Tahr. If you are on 64-bit, you can run my compile script in the source. I have also done the same mods for myGtkMenu and will post if anybody is interested.

With kind regards,
vovchik
Attachments
aemenu-markup_src.tar.gz
(42.7 KiB) Downloaded 378 times
aemenu_testing.tar.gz
(15.06 KiB) Downloaded 356 times

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#2 Post by musher0 »

Hi vovchik.

I tried your hacked aemenu: "Ah! Now I understand!" :) (I didn't understand the first
time when you presented it on the French weather thread.)

That's great stuff actually.

What are the dependencies? Only pango?

Talk with you later (TWYL)
Attachments
aemenu-markup_2016-07-20(1).jpg
(21.73 KiB) Downloaded 736 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#3 Post by vovchik »

Dear Musher0,

Thanks. And good that you looked at it. No real dependencies of an unusual kind, since the cairo/pango stuff is really part and parcel of GTK, as is the X11 stuff. Everything there is pretty standard. Odd that the aemenu guys and the myGtkMenu guy failed to include that elementary markup facility in their original code. It is there, in GTK, for the taking, and gives you much more control over text display. I have used it in countless programs, including bcm and notify_svg. :)

With kind regards,
vovchik

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#4 Post by vovchik »

Dear all,

My modded myGtkMenu - permitting pango markup - is posted here:

http://murga-linux.com/puppy/viewtopic. ... &start=240

The source is there (single file - just run make after unpacking to build), as is a 32-bit Tahr binary.I also included some demos in the archive.

With kind regards,
vovchik

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#5 Post by musher0 »

I can't get your hacked aemenu to work outside of its untarred directory. Oh dear...
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#6 Post by vovchik »

Dear musher0,

Oh dear! Mine is sitting in /usr/bin - with no other copies elsewhere, and everything works. Could be that you have another (unmodded) copy somewhere in the exec path and that gets picked up first. My mods (four lines) did not change anything except adding pango capability. Strange!

I have attached a little utility I once wrote to find all execs in the path. Just run bwhich aemenu.

With kind regards,
vovchik
Attachments
bwhich.tar.gz
(11.19 KiB) Downloaded 334 times

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#7 Post by musher0 »

Sorry, vovchik, that explanation is not enough.

I know that. I checked that before I asked the question. I have your hacked aemenu
as aemenu-pango in /usr/bin and aemenu as a link to it.

You have all sorts of *rc files in your tar -- they have "includes" in them. Do these
*rc files need to be in a particular directory?

What about bcm? If "hacked aemenu" is in /usr/bin, does bcm need to be there too?

BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#8 Post by musher0 »

Never mind!

I finally got something!
Attachments
Got-something!_2016-07-23.jpg
(32.48 KiB) Downloaded 572 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#9 Post by vovchik »

Dear musher0,

I am glad you solved the aemenu problem. The bcm prog can be in any executable path - /root/my-applications/bin, /usr/local/bin, /usr/bin or one of the sbins.

With kind regards,
vovchik

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#10 Post by musher0 »

vovchik?

You know what? It just occurred to me that if you also performed your magic on the
aepanel-gtk code, it might just revive the entire aewm window manager? :)

Just a thought. BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#11 Post by vovchik »

Dear Musher0,

It is possible. I looked at the code and it is not all that much work. I could add markup and images to the buttons and add markup to the menus, like in aemenu. That would make the panel/bar look pretty decent. I'll do a few experiments. :)

With kind regards,
vovchik

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#12 Post by musher0 »

vovchik wrote:Dear Musher0,

It is possible. I looked at the code and it is not all that much work. I could add markup and images to the buttons and add markup to the menus, like in aemenu. That would make the panel/bar look pretty decent. I'll do a few experiments. :)

With kind regards,
vovchik
Thanks!
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

Hacked aemenu (and now aepanel)

#13 Post by vovchik »

Dear musher0,

Here is a hacked aepanel that knows pango markup. Menus are the same as those used for aemenu, specified on the command line with "-rc filename". In addition, because of many multilingual Puppy users, I made it possible to change the English "Launch" text (now "Menu") via an environmental variable. And the button also knows pango markup. Look at the click_for_test script in the archive to see how that can be done. I have included a tahr 32-bit binary and a compile script, too.

With kind regards,
vovchik
Attachments
aepanel_pango.tar.gz
(23.08 KiB) Downloaded 348 times

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#14 Post by musher0 »

Hi vovchik.

Pretty nice ! Works a treat ! Many thanks for your trouble !
The environmental variable for the menu button is a nice touch.

Again, thanks.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#15 Post by musher0 »

Hello vovchik and all.

Here's an example of what can be done with your hacked aemenu, using the
typical default* Puppy apps located in /usr/local/bin.

The advantage of such a menu is its simplicity and the fact that the apps are
labeled by what they do rather than by their actual name. A simple menu such as
this may help a beginner find his/her way around a Puppy, which is my hope.

For those who are new to this thread, to use this script, you will need vovchik's
package above containing his hacked aemenu (which I call "aemenu-pango") and
his "bcm" utility.

You can change the color of the title and of the separating lines simply by clicking
on a color in the appropriate sub-menu. (Please see attached screen captures.)

The general gtk theme is still controlled the usual way with the "chtheme" utility in
the desktop sub-menu in the window manager menu.

Enjoy!

~~~~~~~~~~~~~
P.S. -- Here is the list of the default Puppy apps I have used in this script:
  • defaultaudiomixer defaultaudioplayer defaultbrowser defaultburner
    defaultcalendar defaultcaptureutility defaultchat defaultconnect
    defaultcontact defaultdatabase defaultdraw defaultemail
    defaultfilemanager defaultftp defaulthtmleditor defaulthtmlviewer
    defaultimageeditor defaultimageviewer defaultrun defaultscreenshot
    defaultspreadsheet defaulttexteditor defaulttextviewer defaultvideoplayer
    defaultwordprocessor
Please note that I have eliminated the doubles; for ex., defaultimageeditor and
defaultpaint, defaultmediaplayer and defaultvideoplayer, are doubles.

For convenience, I also added a few of my own : defaultrun, defaultscreenshot and
defaultftp, for ex. (You can do that!) :) The script does the appropriate checks, so
if you don't have these additional default apps, they won't show in the menu.

Also the user will please note that the appearance of the menu will be slightly
different from the captures below (which I made with the initial version). But it has
the same functionalities. In particular, you will notice that the titles of the sub-
menus now have bullets in front of them, which I think highlights them nicely.

~~~~~~~~~

I know that nobody has downloaded the script yet, so it doesn't matter. But this is
its 3rd evolution, and it's quite compact now, considering what it does. I have
brought it down from 14k (initial version) to 8.6 k (this version). It's about only 100
bytes longer than the menu it creates, so I think this is a pretty good ratio.

BFN
Attachments
MenuDefaut.sh.zip
Unzip in /usr/local/bin, make executable and run. Optionally, for convenience, you may drag the script to your desktop and run it from there.
(2.48 KiB) Downloaded 247 times
default-menu_2016-07-31.JPG
With a gtk theme in light colors
(63.66 KiB) Downloaded 404 times
default-menu_2016-07-31(1).JPG
(53.91 KiB) Downloaded 412 times
default-menu_2016-07-31(2).JPG
With a gtk theme in dark colors
(60.13 KiB) Downloaded 404 times
default-menu_2016-07-31(3).JPG
(60.08 KiB) Downloaded 413 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#16 Post by vovchik »

Dear musher0,

Thanks for putting some of the stuff through its paces. It does seem to be working as envisaged, which is always encouraging. :) And a touch of colour and a nice font do much to make things a bit more lively and inviting.

With kind regards,
vovchik

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#17 Post by musher0 »

I am just starting to explore the possibilities of your wonderful new tool! :D
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#18 Post by musher0 »

Hello all!

This new menu is again based on the default Puppy apps, but it "casts a wider
net", so to speak.

It can add some file utilities, and your list of browsers if you have more than one
browser. At this point, you'll need to get your hands dirty, (I mean rework the
script a bit) to get those listings, but the capacity is there.

Also, a major breakthrough in this extended default menu, I think, is its
capacity to be "dressed-up" by the user from within (from the menu itself),
including for the title, the separators and the fonts.

What I find quite interesting in the aemenu-pango is that the menu can be scripted
to show the user, in the menu itself, which colors and which fonts are available to
him/her. (Please see screen capture.)

In this context, if you know of a good font or of efficient colors for this aemenu-
pango, please share them? It will be most appreciated.

~~~~~~~~~
This is again an example, still in beta. If you use it for production, please be
aware that it is at your own risk.

Kindly report all bugs. One such bug is about the LiberationSerif-Regular font: it's
applied quite ok from the gtk-chtheme utility, but it's the only font not showing
properly in the dress-up list. Why? :( "Mystery, mystery."

~~~~~~~~~
Again thanks to vovchik for having made available a wonderful tool! :)

And again, the same heads-up to users as before: to run this aemenu-pango
application properly, you will need to download the tools (bcm, etc.) that vovchik
has kindly provided on the previous page.

BTW, try NOT to enjoy it! (hehe) This aemenu-pango can really get addictive! :D

BFN.

~~~~~~~~~~~~
NOTE --
The "run", "partitions" and "Exit" entries in the main panel call scripts which are NOT
included in the attached zip archive. If you click on those entries, nothing will happen.

As I said, this is a "beta" example. But please feel free to adapt it to your needs.
Attachments
default-menu-plus_2016-08-02.JPG
In this screen capture, the main title and categories are shown with the "georgia" font.
-- But you can change the font and the colors "on the fly".
(60.17 KiB) Downloaded 419 times
MenuDefautPlus.sh.zip
To run, unzip in /usr/local/bin and make executable.
(3.16 KiB) Downloaded 211 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#19 Post by musher0 »

This version adds the choice of font sizes, plus the directories are now in their own
sub-menu.
Attachments
MenuDefautPlus.sh.zip
(3.47 KiB) Downloaded 207 times
default-menu-plus_2016-08-04.JPG
(27.93 KiB) Downloaded 345 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#20 Post by musher0 »

Hi vovchik.

I hope you are well. We've not heard from you in a little while.

When you have a minute, would you please double-check if the aemenu-
pango can really recognize the colors in hexadecimal? It says so in the doc
that you provided, but I can't get the hex colors to show. (Named colors
such as blue, white, cornsilk, chartreuse4, etc., show up ok.)

This is my context at the moment.

TIA. TWYL, hopefully.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Post Reply