Forum › Forums › antiX-development › Development › desktop-menu update
- This topic has 68 replies, 6 voices, and was last updated Sep 30-6:14 am by anticapitalista.
-
AuthorPosts
-
August 22, 2025 at 6:37 pm #184268
ileMemberHello Dave
line 315 in .new added lines user_options
#Get the desktop_code for the user if opts.desktop_code: opts.valid_wm.clear() opts.valid_wm.append(opts.desktop_code) else: opts.valid_wm.clear() if opts.write_all_menus == "1": Options.get_valid_wms() elif opts.write_all_menus == "0" or Configuration.write_all_menus == "0": Options.get_default_wm("",user_info[2]) else: Options.get_valid_wms()expect
command line –desktop-code takes priority. Writes menu for one valid –desktop-code.
(?)August 23, 2025 at 9:57 am #184292
DaveForum AdminThanks.
Fixed:
http://www.antixforum.com/forums/topic/desktop-menu-update/page/3/#post-184129
http://www.antixforum.com/forums/topic/desktop-menu-update/page/3/#post-184195
http://www.antixforum.com/forums/topic/desktop-menu-update/page/3/#post-184209 (text length correction/changes)http://www.antixforum.com/forums/topic/desktop-menu-update/page/4/#post-184268
I think I understand what this is saying. But it also puts the entire code in as a valid window manager when it should be just the window manager.
Perhaps it is better to say if –desktop-code is specified –write-all-menus must be equal to 0?
I have made this change and hope it works as expected.http://www.antixforum.com/forums/topic/desktop-menu-update/page/3/#post-184208:
This only errors out if the root-folder option specified does not match a submenu section found in the menu file. Changed the help text to better show this.http://www.antixforum.com/forums/topic/desktop-menu-update/page/3/#post-184209:
I need some more information on this. Reading the changes assumes that the configuration option exists and will always ignore the default settings. So if the settings are default and the configuration does not exist an error will occur. Whereas the current way will only override the opts.separators if they are the default and the configuration.sepearators exist. This then will allways use the default if there is no configuration, will use the configuration if the command line options are default, and will use the command line options instead of the configuration if specified on the command line.http://www.antixforum.com/forums/topic/desktop-menu-update/page/3/#post-184267
Do you have example items that I can study? I cannot see why this would be different to the old desktop-menuComputers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
August 23, 2025 at 11:53 am #184304
ileMemberHello Dave and thanks.
That last one first. invalid .desktop command not shown in icewm.
Not a desktop-menu factor, just a observation of curiosity.
I did not know icewm had that. xfce menu just got it in the last version update. kde, dolphin, thunar have try exec validate on their menu.(i think)
I happen to be on antiX25a the firejail and firetools not installed showing icon on jwm and fluxbox menu is where i spotted it.
Test it by going into a .desktop file and alter the Exec.
app-select.desktop open and change Exec= to /usr/local/bin/app-selectDave as the command;
run desktop-menu. app-select will not appear on the icewm Accessories menu.
jwm and fluxbox Accessories>app-select will show but not work.
version 3.33 same.
((app-select.desktop change it back to Exec /usr/local/bin/app-select. ))
Geany is an interesting test because on this system it is the sole entry in category Programming. Wreck the Geany Exec= and icewm does not show the Programming category because the only Geany entry fail try exec.August 24, 2025 at 12:51 pm #184371
ileMemberHello Dave
Thank you for taking a detour through my posts.
I appreciate your attention.September 5, 2025 at 1:32 am #185015
ileMember.new Sep 4
menu_strings.py:109:h18=_(r”Specify
put an r and warning stopped./bin/desktop-menu”, line 591, in __init__
AttributeError: type object ‘Template’ has no attribute ‘Comment’I commented 591 out , then write-out works.
multiple categories menues Refresh in fluxbox and icewm. not multiple in jwm.
icewm ignores command line –text-length.September 14, 2025 at 3:23 pm #185495
DaveForum AdminI have been looking into aligning naming with the menu spec. This should allow custom menu settings by placing an overriding / merge file in ~/.config/menus/. Which should also allow for programs like menulibre to be used to edit the application menu and rearrange the layout. There is non standard ways in both programs that do not allow this to immediately work.
/bin/desktop-menu”, line 591, in __init__
AttributeError: type object ‘Template’ has no attribute ‘Comment’I commented 591 out , then write-out works.
This requires updating the .template files to include the “Comment” option.
https://gitlab.com/antiX-Dave/desktop-menu-antix/-/blob/master/templates/icewm.template?ref_type=heads.new Sep 4
menu_strings.py:109:h18=_(r”Specify
put an r and warning stopped.I do not notice the error. Could you post the error message?
icewm ignores command line –text-length.
This was a special condition by design due to previous posts saying icewm can manage longer menu names. I can easily remove this condition so all are treated equally if this is preferred?
Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
September 14, 2025 at 5:14 pm #185500
ileMember/usr/lib/desktop-menu/desktop_menu_strings.py:109: SyntaxWarning: invalid escape sequence '\|' h18=_("Specify the type, arrangement, and style of any separators used between the options specified in --order \n6 separators total must be assigned \nShell special charecters must be escaped. \nExample if order is ngc: --separators=\| \| \( \) [ ] becomes: |Name|(Generic Name)[Comment] \n")September 14, 2025 at 7:57 pm #185509
ileMemberHello Dave
Did sew Comment into four templates. Thanks.The text-length special condition by design
icewm ignores configuration file text_length.Command line option –text-length need take priority
and bypass desktop-menu.cfg and surpass the icewm bypass of desktop-menu.cfg.
Fixed in #post-184209.
desktop-menu.newlength zip expect all wm to respect command line –text-length.
test with desktop-menu –write-out –text-length 1Attachments:
September 14, 2025 at 8:48 pm #185512
ileMember{desktop-menu --write-out --desktop-code fluxbox --no-gtk }
on fluxbox /menu item (Refresh Menu ) writes only to fluxbox and the other wm can have their fancy svgPerfect.
Nice menu Dave.
September 15, 2025 at 12:22 pm #185551
DaveForum AdminOk both those should be fixed now.
I think I understood the icewm text length changes after comparing. I am left questioning whether it is better to have this conditional icewm check (default all wms: full length, with config full length icewm only, with –text-length all wms set to specified length), or to remove the conditional icewm check (default all wms full length, config or –text length all wms set to specified length).
It seems to me either way icewm will need to be “fixed” with –text-length after an update if the text is too long/short.
So this is a question of probability and default actions it seems. Which question / problem is less likely? “Why is the text length in my menu configuration not being set?” or “Why is the icewm text length limited after every update?” I am leaning toward it is more predictable if the condition were removed and all window managers are treated equally. Especially being most users stay with a single window manager. However this can easily be changed either way later on if there becomes a common problem/annoyance.Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
September 15, 2025 at 1:27 pm #185554
DaveForum Admin@Robin.
I am not certain how integrated the desktop files / dpkg divergent stuff was but it seems like it was alot less then I originally thought.
I think it is now extracted to a library file that is run by desktop-menu if the library file exists.
https://gitlab.com/antiX-Dave/desktop-menu-antix/-/commit/a7589b6e4aca1b4eee89a18dc13c6bfe3f2f5d55The desktop_menu_desktop_files.py file should reside in /usr/lib/desktop-menu
Does this work as it should?
If it does perhaps it could be added to the package containing the .desktop files or will this break something?
In this way I imagine then for people who do not have the antix**-desktop-files package installed there is no “extra” code / imports / package dependencies. Also then within the new desktop_menu_desktop_files.py module the import of apt could also be removed as a check for the installation of antix**-desktop-files is not needed (assumption: the module would not exist if the package is not installed)?Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
September 15, 2025 at 2:29 pm #185555
ileMemberHello Dave
Within past hour updated both files
the return is silent on every command run, so far.
Success.. You brought in a logic for text length.The expected return menu comes from every command.
It’s a beautiful thing.# /home/clue/Documents/Ddesktop-menu.new --write-out --debug Debug: Namespace init and agrument parsing ran Debug: Running as user: clue Debug: Setting user options Debug: Setting initial user configuration Debug: Setting user options Debug: Reading configuration file: /home/clue/.config/desktop-menu/desktop-menu.cfg Debug: Locale: en_US.UTF-8 Debug: Icon Theme: papirus-antix Debug: Valid Window Managers: ['fluxbox', 'jwm', 'icewm'] Debug: Building menu arrays for clue Debug: Menu File: desktop-menu-applications.menu Debug: Separators: [' ', ' ', ')', ' ', ')', ' '] Debug: Category Filter: 'n' Debug: Text Order: ['n', 'g'] Debug: Reading template file: /usr/share/desktop-menu/templates/fluxbox.template Debug: Verifying directory: /home/clue/ as owner: 1000 and group: 100 Debug: Verifying directory: /home/clue/.fluxbox/ as owner: 1000 and group: 100 Debug: Writing out to: /home/clue/.fluxbox/menu-applications ──────────────────────────────────────────────────────────────────────────────────────────────────── Debug: Reading template file: /usr/share/desktop-menu/templates/jwm.template Debug: Verifying directory: /home/clue/ as owner: 1000 and group: 100 Debug: Verifying directory: /home/clue/.jwm/ as owner: 1000 and group: 100 Debug: Writing out to: /home/clue/.jwm/menu-applications ──────────────────────────────────────────────────────────────────────────────────────────────────── Debug: Reading template file: /usr/share/desktop-menu/templates/icewm.template Debug: Verifying directory: /home/clue/ as owner: 1000 and group: 100 Debug: Verifying directory: /home/clue/.icewm/ as owner: 1000 and group: 100 Debug: Writing out to: /home/clue/.icewm/menu-applications ────────────────────────────────────────────────────────────────────────────────────────────────────September 15, 2025 at 4:05 pm #185557
ileMember# /Ddesktop-menu.new --write-out --no-icons Adding 'diversion of /usr/share/applications/thunderbird.desktop to /usr/local/lib/antiX/antix23-desktop-files/originale/thunderbird.desktop by antix23-desktop-files'got this. Good message?
September 15, 2025 at 5:16 pm #185562
ileMemberHello
Help section line 54, h11=“…Unix locale style (e.g. fr_BE.UTF-8) or abbreviations (e.g. it or pt_BR). …”
abbreviations e.g.”it” is not valid.
…Unix locale style (e.g. fr_BE.UTF-8) or abbreviation (e.g. pt_BR). …
September 15, 2025 at 11:32 pm #185576
ileMemberThis too good message?
Debug: Desktop Files improvement module found and imported....... Running. -
AuthorPosts
- You must be logged in to reply to this topic.