Forum › Forums › antiX-development › Development › Proposal for new “Restore” (to REPLACE) “Refresh menu” entry
- This topic has 4 replies, 4 voices, and was last updated Jan 24-11:30 am by PPC.
-
AuthorPosts
-
January 23, 2023 at 6:50 pm #98112Member
PPC
To solve some problems related to the localization of the first menu layer and also possible lack of elevated privileges of the current “Refresh menu” entry I suggest using a script (to be localized) similar to this:
#!/bin/bash #Small script for antiX Linux Menu: refresh the Aplications menu OR reload the most of to date (localized) version of the first menu yad --title="Refresh/Restore antiX's menu" --window-icon="/usr/share/icons/papirus-antix/24x24/actions/application-menu.png" --center --fixed \ --text="\n Please choose your option (or close this window to do nothing): \n \n Restore all applications - recreates the Applications submenu, if there's any problem with it \n Restore/Update first layer of the menu - restores the first layer of the menu to it's most current, localized, version \n" \ --button="Restore All Applications sub-menu":0 \ --button="Restore/Update first layer of the menu":2 EXIT_CODE=$? if [ $EXIT_CODE -eq 0 ]; then gksu "desktop-menu --write-out-global" elif [ $EXIT_CODE -eq 2 ]; then #Script to automatically restore the first layer of the menu and the toolbar to the correctly localized, default versions -NOTE: this will reset any change you performed in the first layer of the menu or any icons you added to the toolbar #Get system language lang=$(locale | grep LANG | cut -d= -f2 | cut -d. -f1) #hack to fix languages that are identified by only 2 characters, and not 4 (or more) #comparing text that's before the "_" to the text that after that, converted to lower case, if it matches, use only the letters before the "_" l1=$(echo $lang |cut -d_ -f1) l2=$(echo $lang |cut -d_ -f2) l2_converted=$(echo "${l2,,}") if [ $l1 = $l2_converted ]; then lang=$l1; fi #copy the localized default versions of the menu and toolbar config files to the correct place in the user's home folder cp /usr/share/antiX/localisation/$lang/icewm/menu* ~/.icewm/ & cp /usr/share/antiX/localisation/$lang/icewm/toolbar* ~/.icewm/ cp /usr/share/antiX/localisation/$lang/jwm/menu* ~/.jwm/ & cp /usr/share/antiX/localisation/$lang/jwm/tray* ~/.jwm/ cp /usr/share/antiX/localisation/$lang/fluxbox/menu* ~/.fluxbox/ fi- This topic was modified 3 months, 2 weeks ago by Brian Masinick. Reason: Restore should be replace
- This topic was modified 3 months, 2 weeks ago by Brian Masinick.
January 23, 2023 at 8:10 pm #98119Moderator
caprea
::It’s nice you still have a look here,maybe I understand things wrong,but this would undo any modifications the user has made to the first menu layer or toolbar.At least for me (heavily customized menu) that would be worse than changing the language.In principle a good idea to solve the problem with one click but please don’t alter the refresh menu button this way.
January 23, 2023 at 8:41 pm #98121Moderator
Brian Masinick
::It’s nice you still have a look here, maybe I understand things wrong, but this would undo any modifications the user has made to the first menu layer or toolbar. At least for me (heavily customized menu) that would be worse than changing the language. In principle a good idea to solve the problem with one click but please don’t alter the refresh menu button this way.
I agree; I often add or modify several entries in various sections of antiX menus and IceWM defaults. As things currently stand, I can manage them, but adding this procedure to refresh is not a good universal idea; instead it could be useful for other reasons; refresh, however is not one of them, otherwise quite a few of us would need another tool to save our settings before refresh and reapply them after refresh; that isn’t a good idea as far as I am concerned.
--
Brian MasinickJanuary 24, 2023 at 11:20 am #98151Member
marcelocripe
::Hello PPC.
Thank you very much for this initiative.
For people who customize the main menu (or first level menu) it will not make any sense to keep the “Refresh Menu” with its new proposal. “Refresh menu” will be interesting for users who don’t know or don’t customize first level main menu.
I hope the anticapistalista sees this favorably for antiX.
– – – – –
Olá PPC.
Muito obrigado por mais esta iniciativa.
Para as pessoas que personalizam o menu principal (ou menu do primeiro nível) não fará sentido algum manter o “Refresh Menu” com a sua nova proposta. O “Refresh menu” será interessante para os usuários que não sabem ou não personalizam o menu principal do primeiro nível.
Eu espero que o anticapistalista veja isso com bons olhos para o antiX.
January 24, 2023 at 11:30 am #98152MemberPPC
::I totally agree with the critics made here! The logical name for this menu entry should be something like ” Restore Menu” or ” Fix Menu” or ” Restore Menu settings”, not “Refresh Menu”
Note: the script also restores the toolbar settings to the (localized) default configuration, so, that makes my previous sugestions also incomplete – the scripts menu entry should refer also the toolbar. A more definitive version of this script could have more options and having the possibility to restore the toolbar to it’s default setting in it’s own button.P.
-
AuthorPosts
- You must be logged in to reply to this topic.