An idea… IceWM Dynamic Desktop Menu

Forum Forums New users New Users and General Questions An idea… IceWM Dynamic Desktop Menu

  • This topic has 99 replies, 7 voices, and was last updated Oct 13-5:02 am by BobC.
Viewing 15 posts - 76 through 90 (of 100 total)
  • Author
    Posts
  • #27416
    Member
    AvatarBobC

    recent files:
    1. I can make it a 2 level menu so it doesn’t delay for calculating until you actually click on the 2nd level menu.
    A. on that menu i can put an option to change the default number of files if you make a yad script to actually do it. It should save permanently and get loaded again when the menu is clicked, and if empty then created with default of 10.
    B. also put on that menu your YAD script to clear recent files.
    2. The option I put at the top works if you have a program installed to bring up the .xbel files. I will just remove it since be default it isn’t part of a default antiX install.
    3. I will change the initial default to be 10 to make everyone happy.
    4. I looked at doing the load 10, then next 10 if clicked, and it was going to be quite tricky. As soon as you click one, the menu goes away and you have to start over.
    5. Something that could be done would be to create links to all the icons in your ~/.icewm/icons folder if not already there to make the icons get found quickly the next time . Just an idea, not sure if it would really help.

    desktop folder
    1. What is in there when it does it? Post an ls -la of ~/Desktop on that machine, please. Maybe its a recursion issue, infinite loop

    YAD scripts, if you could just create me the 2 and put them in a zip, I can tweak from there.

    #27419
    Member
    AvatarPPC

    @BobC The delete file history menu is easy… The number of lines menu will take a bit more work, can’t do it right now… I’ll try to do it as soon as I can…

    EDIT:
    I had to use my Google fu to find out how to enter a numerical variable…

    Here’s a way to save a numerical variable to a file, in a one liner:

    yad --title "Recent Files" --text=" Enter the number of recent files \n you want to be displayed" --entry --entry-text="10" --numeric > ~/HistoryNumberOfLines.txt

    Your recent files script will now have to get the number of lines variable from ~/HistoryNumberOfLines.txt`

    example:
    limitlines=$( cat ~/HistoryNumberOfLines.txt )

    I hope this helps,
    P.

    • This reply was modified 2 months, 2 weeks ago by PPC.
    • This reply was modified 2 months, 2 weeks ago by PPC.
    Attachments:
    1. deletehistory.zip
    #27422
    Member
    AvatarBobC

    I’m not sure there, either. My guess is we should save the value under ~/.config or since if we had the ability to show it for other WM’s we would want the same limit. I don’t know how to do that with YAD. I could figure out how to read it and use it if it was there. It’s likely something similar is being done with it already somepleace, if not in antiX, likely someplace else.

    • This reply was modified 2 months, 2 weeks ago by BobC.
    #27425
    Member
    AvatarPPC

    You can change the script to save to any file in any file path you want, Bob.
    I have no idea if some other app already stores any information related to the number of lines the recent files history has… I don’t know why any app would do that in antiX, since until now, none of the default desktops has a “recent files” history, right? (I didn’t test Fluxbox, but I believe it doesn’t)
    But…
    (Kind of) Request granted 🙂 the script now reads the actual number set in the file that stores the variable and presents it as default value:

    actuallimitlines=$( cat ~/HistoryNumberOfLines.txt  )
    yad --title "Recent Files" --text=" Enter the number of recent files  \n you want to be displayed" --entry --entry-text=$actuallimitlines --numeric > ~/HistoryNumberOfLines.txt
    # cat ~/HistoryNumberOfLines.txt  ## use this to test the output...

    PS: while testing, I noticed that pressing “cancel” (or closing the window) just zeros the HistoryNumberOfLines.txt file, maybe we should deactivate that yad button… There’s a way around that: make a backup copy of the initial actuallimitlines contents. Before that, check to see if ~/HistoryNumberOfLines.txt has any content, if it does not, use the value from the backup…

    P.

    • This reply was modified 2 months, 2 weeks ago by PPC.
    • This reply was modified 2 months, 2 weeks ago by PPC.
    • This reply was modified 2 months, 2 weeks ago by PPC.
    #27444
    Member
    AvatarBobC

    Ok, all changes made and tested. It’s quite nice and should be good for slow or fast machines.

    I put in a limit of 5 directory levels on the desktop Folder option to prevent any endless recursion loops.

    #27454
    Member
    AvatarPPC

    @BobC Some feedback:
    I just tested your scripts on a live antiX 19b3- the Recent files menu is always empty, does not show any entry…
    Also, the 2 config scripts do nothing from the menu.
    ( I checked the menu entries – both config scripts “Change number of files to show” and “Clear Recent File History” seemed ti point to the same file: /usr/local/bin/recently-used-settings.sh. But when I checked the zip file the “menu” was ok… Strange, maybe I pasted the same line twice? )

    Output from the cli:

    ` $ /usr/local/bin/recently-used-settings.sh
    cat: /home/demo/.config/recently-used-dsp.conf: No such file or directory
    /usr/local/bin/recently-used-settings.sh: line 10: [: !: integer expression expected
    /usr/local/bin/recently-used-settings.sh: line 14: /home/demo/.config/recently-used-dsp.conf: No such file or directory
    demo@dhcppc1:~/Downloads/icewm-menu-8/icewm-menu-8`

    Sorry, I’m a bit too busy to help with further testing/ debuging…

    P.

    • This reply was modified 2 months, 2 weeks ago by PPC.
    #27456
    Member
    AvatarBobC

    My zip file must not be right. I will unzip and run from it.

    I need to test still on a live system. There must be something different about that.

    Thanks for helping with the yad scripts. Sorry it sounds like work is as bad for you as mine is.

    #27460
    Member
    AvatarBobC

    I didn’t find anything wrong.

    You are correct that it isn’t working on fully updated 64 bit 19b3 from the USB in live mode. It isn’t rational, maybe a YAD. Midnight Commander is having trouble too, but not sure if that is related.

    #27465
    Member
    AvatarBobC

    It also didn’t work on non-updated 19b3 live from USB. It doesn’t look like the YAD scripts are working at all, and my script is having trouble also.

    #27479
    Member
    AvatarBobC

    Found the bugs and fixed.

    1. The settings and delete scripts that were in the zip file weren’t saved with wide open security. When I changed that they worked on live also.

    2. The recentfiles script was getting an error when the ~/.config/recently-used-dsp.conf file wasn’t there, and failing after that. I changed it to test if the file was there, and if not create it with default setting of 10, else read the setting from it. After that it worked on live.

    PS: looking at my last 2 posts, its interesting that i didn’t think to take the files over to the flashdrive boot machine and run them from a terminal. Live and learn a little at a time i guess.

    • This reply was modified 2 months, 2 weeks ago by BobC.
    Attachments:
    1. icewm-menu-9.zip
    #27491
    Member
    AvatarPPC

    @BobC- I tested, and all the scripts seem to be running fine on my live antiX19b3!

    Very, very nice work!
    The scripting work seems to be done!

    I only have the same “GUI” suggestions as before: using different icons for each of the scripts. Also…
    On the first “Recent files” menu I would name the first entry, something like “List of Recent Files” (so not to repeat the previous menu entry), add a separator and then the 2 config scripts without any icons.

    (Note: to most users, having the actual list of the recent files on a second layer of the menu will be a nuisance – they’ll have one more step to go through to access those files. You did that after my feedback that a large list of recent files presented on the first layer of the menu was “freezing” my netbook’s menu for some seconds- but it does not do so when only presenting 10 entries- because you have, as default only 10 menu entries and you now also have a new menu layer to display each lot of 10 recent menu entries… and displaying only 10 recent menu entries only “freezes” my menu for about a second I can run the list on the first menu layer…
    Related to that, a suggestion:
    Offer 2 “installs”- one for more recent hardware- that displays the “recent files” list on the first layer of the menu, then other, for lower specs machines (such as my netbook or weaker) that is this v9 of your files- only displays the recent files on a second layer of the menu, to avoid “freezing” the menu on slower machines…

    Real life calls… It has been nice to be able to see such a nice functionality added to antiX. If this gets included in antiX 19 menu out of the box, it would be a plus for this (“our”) distro.

    PS: As a last effort to make antiX a tiny bit more accessible I even made a little script to allow for a faster way to add icons to the desktop (for those folks that have a machine that does not have problems running a file manager “managing” desktop icons)- it simply presents a window explaining how to drag and drop desktop files from the right rox folder (also how to quickly rename them after that), then minimizes all windows, opens the rox folder displaying the .desktop files. That’s it- a convenient way for newbies to add desktop icons- no need to memorize complex names of folders or opening rox panels! (https://pastebin.com/u8pbkRfw)
    It’s, for now, my parting gift to trying to make antiX even simpler to user…

    Best regards,
    P.

    #27492
    Moderator
    masinickmasinick

    Great ideas and very good collaboration with the effort!

    Brian Masinick

    #27507
    Member
    AvatarBobC

    Ok, I changed it to pull off Recent Files directly from main menu again (when you hover), and include the change settings and delete history options at the bottom of each menu. I also commented out the drives option so that if someone wants it, it can be turned on easily, else doesn’t take up space on the main menu. If anti wants it on by default, he can uncomment it pretty easily.

    If someone would try it with on an old PC to tell us if the performance is reasonable, that would be nice.

    PS: if you think it should go back to not delaying the main menu, let me know. It is a slight delay with 40 on my machine which is fast. That setting would cause a large delay just to hover down the menu on an old machine.

    PSS: after a day with it, I went back to the zip file #9 setup. I like it set at 100 files so that I can always get back to whatever it was, but don’t want to wait on the main menu for it just because I went past it hovering. The #9 setup allowed for the best of both, and only delayed people like me that want to be able to go way back.

    • This reply was modified 2 months, 2 weeks ago by BobC.
    • This reply was modified 2 months, 2 weeks ago by BobC.
    • This reply was modified 2 months, 1 week ago by BobC.
    Attachments:
    1. icewm-menu-10.zip
    #27542
    Member
    AvatarPPC

    I went back to the zip file #9 setup

    🙂 Like I said before: it would be a good idea to offer both v.9 and v.10 of the Recent Files menu- and let the users choose want works best for them…
    I’ll probably stick with the v.10 – recent files list on the first menu level on my (faster) desktop and v.9 (have the recent files list appear on a second menu level)- on my crappy netbook- to avoid my menu “freezing”, even for a second…

    Now the “bad” news:
    I found a small bug on v.10- on my live antiX19b3- the 11th recent file, the first on the second menu level always has the “applications” icon (the colored little dots)… It does not affect the way the script works at all, it’s just a visual “bug”- the file still opens fine!

    I noticed the delete recent files and choose how many recent files to display scripts are already on the antiX-goodies! It all points that probably antiX 19 will be “shipped” with a “recent files” and a “desktop files” menu out of the box, Bob!!! (Or at least with a easy way to set those entries up, by editing the menu without the need to install anything more…)

    P.S.- Someone once told me antiX lacked nothing, here on the forum (then I was suggesting offering a GUI way to update antiX, I believe)… I wonder what are the thoughts of that user on the future final version of antiX- veryyyy feature rich, much more visually appealing and much more user friendly (with scripts to help users doing many tasks that required using the terminal or editing files and now can be done using a GUI)

    P.

    #27544
    Member
    AvatarBobC

    If anti says he wants it directly from the main menu I can look at the icon thing, and could fix it, but I think the older machines are always going to stutter on the main menu. Those people will be ok waiting a few seconds for something when they ask for it (even 5 or 10 seconds is ok on an old machine as compared to “I can’t find that file I worked on last week”), but not accidentally every time they go down the menu…

    I think I will make a file #11, same as 9 but adding your suggestion of changing the text on the inner menu. It would be a very minor change. I think that’s the way to go. Fast, clear and everything there. Best of both worlds…

    Let me know what you think?

    • This reply was modified 2 months, 1 week ago by BobC.
Viewing 15 posts - 76 through 90 (of 100 total)
  • You must be logged in to reply to this topic.