Puppy-like ICEWM menu?

What features/apps/bugfixes needed in a future Puppy
Message
Author
User avatar
torm
Posts: 186
Joined: Sat 07 Mar 2015, 19:56

Puppy-like ICEWM menu?

#1 Post by torm »

Hello.

Looking at icewm-BRANCH version 1.3.12.56,
it has pretty good and fast icewm-menu-fdo ( 14K installed ) with
icons, local language support, dynamic generation, etc.
However, most Puppy-apps end up in "Other" section...
I'm no good at C, so I'm kinda hoping someone with proper
knowledge for menus and C could help out here.

icewm-BRANCH can be found at GitHub,
file that needs some modification is fdomenu.cc ( added to this post, see below )
To compile that version of icewm, one may need:
autopoint ( for translations )
sgml2html ( for documentation )
.. it may compile the binaries before falling over on the
missing sgml2html, while.. it will "need" autopoint for autogen.sh to start with.
There is something strange about installing autopoint, so just extracted it to
/root/my-applications/bin/ for compiletime, to have it "on-path"..

For now I've got most apps to show up at least ..somewhere :)
All suggestions and examples and patches are welcome.


Other notes.
This version of icewm can be safely configured/compiled
without the built-in taskbar or sm ( 629K, with all in = 809K )
Will work with bmpanel2 without any noticeable errors, and looks way far better this way.
Removed the default "Unknown-x-event-blah-blah.." from the bmpanel2 source,
as it tends to flood xerrs.log with thousands of lines in a single session,
at least in TahrPup605(32bit) .
Attachments
fdomenu.cc.tar.gz
(3.83 KiB) Downloaded 440 times

User avatar
torm
Posts: 186
Joined: Sat 07 Mar 2015, 19:56

#2 Post by torm »

Also tested:

-xfwm4 ( version 4.11.1 )
xfwm4 will work with bmpanel2, gives pretty lite and solid impression,
while it may-or-not compile into something usable, if modified.
Any gtk2 theme change will drop it out of X.
Looks like there must be something in theme "refresh" code in apps:

------------------------------------------------------

Code: Select all

#include <gdk/gdk.h>

int main(int argc, char *argv[])
{
	gdk_init(&argc,&argv);
	GdkEventClient event;
	event.type = GDK_CLIENT_EVENT;
	event.send_event = TRUE;
	event.window = NULL;
	event.message_type = gdk_atom_intern("_GTK_READ_RCFILES", FALSE);
	event.data_format = 8;
	gdk_event_send_clientmessage_toall((GdkEvent *)&event);
}
-------------------------------------------------------

..that does it?

Inside events.c in xfwm4 source there is some similar-looking line 2750:

-------------------------------------------------------

Code: Select all

static gboolean
client_event_cb (GtkWidget * widget, GdkEventClient * ev, gpointer data)
{
	TRACE ("entering client_event_cb");

	if (!atom_rcfiles)
	{
		atom_rcfiles = gdk_atom_intern ("_GTK_READ_RCFILES", FALSE);
	}

	if (ev->message_type == atom_rcfiles)
	{
		set_reload (G_OBJECT (widget), (GdkEvent *) ev, data);
	}

	return (FALSE);
}
--------------------------------------------------------

..no idea.. :(



- metacity ( version 2.34.5 )
metacity should work with gtk2panel-0.1.1 or fbpanel,
( kinda unfriendly with bmpanel2, for some reason )
and may need extra workarounds for ( external only ) usable menus
+ custom apps ( - can be gtkdialog, etc ) for graphical UI settings,
then, one should probably comment out anything "zenity"-related from configure
to reduce some dependency-hell..
Then --disable some more misfeatures.

As a sidenote about gtk2panel-0.1.1
- can be found at SourceForge,
dependencies - libwnck/libwnck-common
compiletime dependencies - libwnck-dev
optional - glade 3.6.0 or later
size bin - 10K
size lib - 30K
size xml - ..depends on a number of menuitems?
-
features:
menu, launchbar, show-desktop, pager, tasklist, cpu-meter, volume, clock, logout
-
missing:
system-tray, vertical placement ( ? )
-
good:
pager features and look, tasklist grouping, volume, clock,
gtk2 theme support
-
no-good:
hardcoded cpu-meter, how to show clients from all workspaces? menu..
---

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

#3 Post by musher0 »

Hi torm.

We should have somewhere in this bazaar of a forum :) an icewm-xdg file
and corresponding plug-in for fixmenus -- used to create icewm menus in
Puppy.

Maybe have a look at how it's done by a pro!
http://murga-linux.com/puppy/viewtopic. ... 263#877417
Tronkel has produced a couple of icewm based Puppies in the past.

(Paragraph edited:)
I was successful in creating menu scripts for wmx and pekwm, but failed
at a menu creator for icewm, sorry. (Not true anymore! Please see below.)
So maybe hunt the tricks Tronkel used to get an icewm menu?

IHTH
Last edited by musher0 on Mon 25 Dec 2017, 03:55, edited 1 time in total.
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

#4 Post by musher0 »

Hi torm.

You may find this thread of interest, where French forum member Médor is
reporting his compilations of the recent icewm being developed on github:
http://murga-linux.com/puppy/viewtopic. ... ost#896814

On page 2 of that thread, I discovered that the developer, Médor,
understands English. So you may want to ask him your question directly or
via a Google translation.

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

User avatar
torm
Posts: 186
Joined: Sat 07 Mar 2015, 19:56

#5 Post by torm »

Almost somewhere :? however it will break translations and whatnot
.desktop files are one big mess..

Think I'll try to mix something up from PupMenu and Navig8or, to get a better picture
how this menu thing may work in general, at least it's faster to test..

Will report back if anything usable to share.
Attachments
fdo-dynamic-test1.jpg
dynamic test
(35.71 KiB) Downloaded 946 times

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

#6 Post by musher0 »

Hello torm.

The attached contains stuff extracted from:

an old Puppy with a template for the icewm menu when icewm
is chosen as the window manager;

and

a couple of menu-related executables in /usr/bin from the
icewm-githubmod-1.3.12.195-alt1.gitf199d1b.i586.rpm
archive. (You may already have the latter.)

IHTH.
Attachments
icewm-menu-stuff.zip
(12.38 KiB) Downloaded 292 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
torm
Posts: 186
Joined: Sat 07 Mar 2015, 19:56

#7 Post by torm »

xdgmenu is faster to load, on the other hand.. it is not "dynamic", depends on fixmenus to update.
Audacious and GIMP.. etc. may be found with multiple entries in the same sections..

Thanks for poining it out.

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

#8 Post by musher0 »

Hello all.

I have been testing a beautiful, soon to be published, Tahr variant during
the past few days.

Part of the test consisted of installing icewm to it. Somehow the icewm
menu wasn't working properly, even when I applied the package above.
Only the Settings and Themes part were showing.

I solved the problem with the following script. Please read the comments
carefully. A couple of screen shots are attached. Please feel free to improve
on the script if you need to.

"Caveat emptor":
this is meant basically for STUDY. It may not work with your icewm.


Still, IHTH someone somehow. BFN.

~~~~~~~~~~~

Code: Select all

#!/bin/ash
# ~/.icewm/icewm-menu2.sh
# © Christian L'Écuyer, Gatineau (Qc), Canada, sam. 28 janv. 2017, 00:03; GPL3.
#  (Alias « musher0 » [forum Puppy].) # Rév. 2017-09-02, 2017-09-03
################ # https://opensource.org/licenses/GPL-3.0
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
##########
# Objectif : construire un menu bilingue (FR, EN) pour icewm. |
# Goal : build a bilingual (EN, FR) menu for icewm.
#### set -xe
# LANG=en_CA.utf8 # to test. Otherwise automatic.
LC_ALL=C
SousMenu () {
	for i in `grep -H $CateG *.desktop | grep Categories | awk -F":" '{ print $1 }'`
	do IcoN="`awk -F= '$1=="Icon" { print $2 }' $i`"
		[ "$IcoN" = "" ] && IcoN="-"
		ExeC="`awk -F'=' '$1=="Exec" { print $2 }' $i`"
		echo -e "\tprog \"${i%.*}\" \"$IcoN\" $ExeC" | awk 'NF>3 && NF<5' >> $txtDepart
	done
	if [ "`wc -c < $txtDepart`" -gt "0" ];then
		echo -e "menu $CateG - {\nseparator" >> $txtArrivee
		cat $txtDepart >> $txtArrivee
		echo -e "separator\n}\n" >> $txtArrivee
	fi; }

cd /usr/share/applications
txtArrivee="/root/.icewm/tmp.menu2";> $txtArrivee
for CateG in Wizard Desktop Develop Network Setup System Utility
do	txtDepart="";txtDepart="/root/.icewm/tmp.config";> $txtDepart
	SousMenu;done
LC_ALL="";RPLCT="replaceit --input=$txtArrivee"
case "${LANG:0:2}" in fr)$RPLCT Desktop "Bureau" "{menu"
	$RPLCT Develop Développement "{menu";$RPLCT Network Réseau "{menu"
	$RPLCT Setup Paramétrage "{menu";$RPLCT System Système "{menu"
	$RPLCT Utility Utilitaires "{menu";$RPLCT Wizard Assistants "{menu" ;;
esac

LC_ALL=C
txtArrivee="";txtArrivee="/root/.icewm/tmp.menu";> $txtArrivee
for CateG in Archiving Audio Business Calculate Database Document TextEditor File Fun Game Graphic Internet Multimedia Personal Video
do	txtDepart="";txtDepart="/root/.icewm/tmp.categ";> $txtDepart
	SousMenu;done
LC_ALL="";RPLCT="replaceit --input=$txtArrivee"
case "${LANG:0:2}" in fr)$RPLCT Archiving Archivage "{menu"
	$RPLCT Business Affaires "{menu";$RPLCT Personal Personnel "{menu"
	$RPLCT Calculate Calculs "{menu";$RPLCT Database BdD "{menu"
	$RPLCT Document Documents "{menu";$RPLCT File Fichiers "{menu"
	$RPLCT Fun Loisirs "{menu";$RPLCT Game Jeux "{menu"
	$RPLCT Graphic Infographie "{menu";$RPLCT Multimedia Multimédias "{menu"
	$RPLCT TextEditor Éditeurs "{menu";$RPLCT Video Vidéo "{menu" ;;
esac
#
> ~/.icewm/menu
case "${LANG:0:2}" in fr)Apps=Applis ;;
	en|*)Apps=Apps ;;
esac
echo -e "# menu | icewm | menu # par / by musher0 # 2017/01/28\n#
menu $Apps - {\nseparator\n`cat ~/.icewm/tmp.menu`
separator\n}\n\n
menu Configs - {\n`cat ~/.icewm/tmp.menu2`
separator\n}\n\n" >> ~/.icewm/menu
case "${LANG:0:2}" in fr)cat ~/.icewm/menu.bas >> ~/.icewm/menu ;;
	en|*)cat ~/.icewm/menu.bottom >> ~/.icewm/menu ;;
esac
echo "### 30 ###" >> ~/.icewm/menu

rm -f /root/.icewm/tmp.*;cp -f /root/.icewm/menu /root/.icewm/menu.bckp

#################################
## Notes -- (Français) # Le menu FR prend +/- 2,9 sec. à se construire.
#
# Ajouter à la fin de /usr/sbin/fixmenus (après la série de « which ») la ligne :
# [ "`cat /etc/windowmanager`" = "icewm" ] && /root/.icewm/icewm-menu2.sh
#
# Ajouter cette même ligne juste avant la ligne qui dit « ##w468 rox may not
# start old... » (vers la ligne 173; après la section sur lxpanel) dans /root/.xinitrc.
#
# La ligne « Exec= » des fichiers *.desktop pour Open|LibreOffice devraient utiliser
# la forme abrégée, telle que : Exec=/opt/libreoffice-5.3/program/swriter.
#
# Certaines « Categories » ont dû être généralisées pour que le présent script
# fonctionne. S.v.p. voir les exemples dans l'archive.
#
########
## Notes -- (English) # The EN menu takes +/- 2.6 sec. to build.
#
# Add at the bottom of /usr/sbin/fixmenus (after the series of "which") the line:
# [ "`cat /etc/windowmanager`" = "icewm" ] && /root/.icewm/icewm-menu2.sh
#
# Add that same line just before the line that says "##w468 rox may not start old..."
# (+/- at line 173; after the lxpanel section) in /root/.xinitrc.
#
# The "Exec=" line of the *.desktop files for Open|LibreOffice should use the short
# form of the command, such as: Exec=/opt/libreoffice-5.3/program/swriter.
#
# Certain "Categories" had to be generalized for this script to work. Please see
# the examples in the archive.
#
################################# set +xe
Attachments
icewm-menu2-2.jpg
Resulting menu created by the script, automatically showing in the
language defined in your LANG variable.
(80.52 KiB) Downloaded 870 times
icewm-menu2-1.jpg
French version.
(94.99 KiB) Downloaded 849 times
Mock-Up.zip
As the name of the archive implies. It contains another archive with edits to
some *.desktop files to make the script work. Both are meant for STUDY.
(67.75 KiB) Downloaded 257 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
torm
Posts: 186
Joined: Sat 07 Mar 2015, 19:56

#9 Post by torm »

.. how soon is soon? :roll:

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

#10 Post by musher0 »

Euh... the next day... But of course it's been three weeks now. Sorry...

Here: http://murga-linux.com/puppy/viewtopic. ... 332#969359
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

#11 Post by musher0 »

Hello all.

The menu-creation mock-up for icewm mentioned above has become a bona fide
script. Please find attached a pet archive of it and two screen shots.

New in this version:
-- this icewm menu will detect if you have the apache OpenOffice suite at
/opt/openoffice4 and display a sub-menu accordingly.

-- this aOO sub-menu takes into account that aOO can be used to do decent edits of
html and web pages: a WebWriter entry is included in this sub-menu. (The capacity has
been there for ages, but people seldom think of using aOO as an html editor.)

-- every time the menu is refreshed, a short message saying so is displayed at the center
of the screen

-- bilingual EN-FR; automatically adapts to the $LANG variable. For the time being,
all system languages except French default to EN. You are welcome to suggest other
translations

-- the top two entries and the sub-menu entries do not have icons. It's intentional

-- you'll notice the menu is divided in four parts:
apps proper
configs (and all manner of system maintenance apps)
aOO
icewm specific entries
to rationalize the way the menu unfolds. Most screens are wider than than they are
high, so as a concept, I tried to use the width more.

The pet archive has a pinstall script which will make a back-up of files
/root/.icewm/prefoverride (if you have it) and /usr/sbin/fixmenus before adapting
them for this new icewm menu. However, it is recommended that you manually
make a zipped back-up of your /root/.icewm directory and /usr/sbin/fixmenus
beforehand.

Credits: the aOO icons in this archive were taken from the Humanity-Gulfstream icons
series that come with the Gulfstream GTK-2.0 theme, by sizakor et al.

Licence of this script is GPL3.

I tested this menu as thoroughly as I could, but please report oddities in the behavior
of this script, should there be any.

The ".desktop" files specifications being strong recommendations rather than actual
standards, expect some variance in the sub-titles and names of this menu: the result
on your Puppy may vary from what you see in the attached screen shots.


Please see https://standards.freedesktop.org/deskt ... pec/latest if you
wish to learn more on the subject of .desktop file specifications.

Enjoy.
Attachments
Recognizes-aOO.jpg
(The forum is enlarging these screen shot... Actual size is smaller.)
(34.47 KiB) Downloaded 640 times
icewm-menu-musher0-0.1.jpg
(133.61 KiB) Downloaded 662 times
icewm-menu-musher0-0.1.pet
(48.39 KiB) Downloaded 369 times
Last edited by musher0 on Thu 09 Nov 2017, 22:45, edited 2 times in total.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
torm
Posts: 186
Joined: Sat 07 Mar 2015, 19:56

#12 Post by torm »

About the old xdg-menu.

Template can also use a custom set of icons - that could change according to theme.
As .png files with semi-transparency, etc.


By the way, what version of IceWM (aside from old LXP-IceWM..) have a different take on panel, if any?
Attachments
icewm_xdg-menu_1.png
IceWM 1.3.12.144 using xdg-menu and theme-provided icons
(161.56 KiB) Downloaded 647 times

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

#13 Post by musher0 »

Hello torm.

Nice icons! :) How did you get them to show like that ?

As to your question about the icewm tray-bar / panel, I think lwp-icewm is one of a
kind. I haven't seen anything different since, even with the github retrofit of icewm.

That said, there are a lot of settings that apply to the traybar in icewm's
"preferences" files. The way to go is to copy those settings to a "prefoverride" file
in /root/.icewm, and then you can play with them to your heart's content.

Please forgive the following "sermon" :) :
Never, ever change the "preferences" file directly. It's your reference if something
goes wrong. If something is seriously wrong with your changes, simply erase the
"prefoverride" file or get it out of /root/.icewm, and recycle icewm: the tray-bar will
show with the default settings again.


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

User avatar
torm
Posts: 186
Joined: Sat 07 Mar 2015, 19:56

#14 Post by torm »

moved..
Last edited by torm on Tue 23 Jan 2018, 01:57, edited 1 time in total.

User avatar
torm
Posts: 186
Joined: Sat 07 Mar 2015, 19:56

#15 Post by torm »

About xdg-menu icons.

If no path or extension is provided in template, IceWM uses
internal icon lookup method ..I think. :?
First currenttheme/icons , then ./icewm/icons , then ..whatever is set
in preferences for IconPath=""
If no correct icon is found, falls back to "empty" and moves on.

For custom iconset, menu template can set a unique icon filename ( without extension )
like myicon
In ./icewm/icons then should be myicon_16x16.xpm, myicon_24x24.xpm .. etc. sizes of this icon,
to use with themes that don't provide that icon.
MenuIconSize=16 # [8-128] can be set (or not) in theme,
and/or forced in ./icewm/preferences or ./icewm/prefoverride files.

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

#16 Post by musher0 »

Hello all.

Here is my icewm menu creator, version 0.2. This one adds to the "Quit" section
whatever other WMs you may have installed on your Pup, from list WM.lst2.
Please remove the previous version from the PPM beforehand.

BFN.
Attachments
icewm-menu-musher0-0.2.pet
(49.15 KiB) Downloaded 269 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
torm
Posts: 186
Joined: Sat 07 Mar 2015, 19:56

#17 Post by torm »

Is there any version of IceWM developed for PuppyLinux?
That would take into account ROX desktop and Gtkdialog.. etc?

github ( unofficial branch ) by bbidulock is pushed the version to 1.4.2
.. while the latest changes may need some time for bugfixes.
Source looks a lot cleaner than the usual.. where it comes to pixmap related code etc.
On the other hand, clicking toolbar menu crashed the systray.. maybe it
was just to early for this version. Builds only with cmake on my system :(

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

#18 Post by musher0 »

torm wrote:Is there any version of IceWM developed for PuppyLinux?
That would take into account ROX desktop and Gtkdialog.. etc?

github ( unofficial branch ) by bbidulock is pushed the version to 1.4.2
.. while the latest changes may need some time for bugfixes.
Source looks a lot cleaner than the usual.. where it comes to pixmap related code etc.
On the other hand, clicking toolbar menu crashed the systray.. maybe it
was just to early for this version. Builds only with cmake on my system :(
HI torm.

Sounds like you're interested in doing a fork for Puppy? :) Why not?

About your 2nd paragraph, my impression is that some productions on github are
experimental... until they are stable... Sorry for stating the obvious.

If possible, maybe follow the dev at a couple of versions behind the one he's
currently working on? Let him do the "accidents"? ;) Just a thought.

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

User avatar
torm
Posts: 186
Joined: Sat 07 Mar 2015, 19:56

#19 Post by torm »

Will try to put together the "abstract" of it in next coming weeks..
.. so yeah, I'm interested, while most likely not able to pull it off all by myself.

1.3.12.144 looks okay, have been using it for about half year now.
With some modifications..

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

#20 Post by musher0 »

Looking forward to it. :)

Hapuppy Holidays! ;)

(The typo was non intentional, but I decided to keep it!)
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Post Reply