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 - 31 through 45 (of 100 total)
  • Author
  • #26940

    I haven’t tried it live, so not sure there.

    The desktop dynamic menu works great, even when run in antiX 19 live!- It was a copy and paste error from my part, sorry for that 🙁
    The “drives dynamic menu” shows up, displays the partitions but does nothing when I click any one of the partitions available.
    If I may be so bold, I think that, “Desktop files” or “Desktops files and Apps” would be a more descriptive name to be displayed on the menu entry- It was a pleasant surprise to be able to click a test text file there on the menu and see it pop open instantly! I don’t really have much need to launch .desktop files that are on the desktop folder via the menu, but, it’s really handy to have fast access to files stored on the desktop folder (text documents, etc!). I didn’t think I needed this feature until I saw it working!
    About the problem with spaces and special characters- I recently found on-line a script to remove spaces from Linux file names, I can dig it up for you if you think it would be handy, Bob.
    The use for the “dynamic drives menu” entry puzzled me, until it dawned on me it would be a fast way to access USB thumb drives…

    You did what you set off to do, and my hat is off for you, but I do have a “feature request” that would be handy for almost every single user: a “recent files/apps dynamic menu”??? 🙂



    My understanding is that only Geany updates “recent files”, but to be honest, on my system the list is longer, showing also pictures and videos that I noticed… Yes, I could do that as another submenu “Recent Files”. I did it once before under OpenBox.

    Another possibility would be to show your home folder, and then all the subfolders would open as sub-menus underneath, like Desktop, Downloads, Pictures, Videos, etc, ignoring the hidden ones.

    On the Drives submenu I couldn’t decide what to run? File manager? File manager as root? Gparted as root? Some other program? Keep in mind there are drives and partitions showing, and some are mounted and some are not.

    PS: we can’t go renaming peoples files. We either figure out how to accommodate, or just pop up the file manage in that folder and let them do things bu hand.

    • This reply was modified 6 months, 3 weeks ago by BobC.

    Yes, I could do that as another submenu “Recent Files”.

    I know how to do it using the cli- reading recently-used.xbel file with a command like:
    sed -nr ‘s/.*href=”([^”]*)”.*/\1/p’ ~/.local/share/recently-used.xbel

    To one such command on the menu, it would more pratical to limit the contents to the last 5- 10 files, maybe? I never got around to doing it… Also a delete “history” option would be nice for users with shared computers (basically delete the xbel file?… I never tried that)
    Never really noticed that geany behavior before! It uses the ~/.local/share/recently-used.xbel to get the “latest” files, I guess.

    About the “dynamic drives menu”- hum… maybe you could open mounted partitions with the default file manager (non root mode) and (just to be on the safe side) do nothing with the unmounted partitions? It’s probably not safe to give access to gparted/ or root fm to possibly newbie trigger happy users…

    PS: About changing other people’s file names- my idea was something along the lines of adding that “conversion” script to your own, performing the conversion on the fly to every line that the dynamic menu displays… Sorry, should have been more detailed on my initial suggestion…



    anti and/or Dave, Please have a look at PPC’s proposed changes in the last couple of posts and tell me if that’s what you want, or if not,what you would like instead, if you would like me to do it.

    I don’t know if I can figure out how to make it all work with spaces in the filenames or not, but I can try, but I think I will leave that till last as it adds a lot of complexity.



    @bobc the way your specs are getting 1+ed reminds of the old saying: “Perfect is the enemy of good” ( and ignores the programmer’s adage of “worse is better” (

    Be careful or by the time you are done you may have to squeeze this code into 2GB of RAM. 😉

    Pax vobiscum,
    Mark Rabideau -
    MX-19 kernel: 5.2.21-antix.1-amd64-smp
    "For every complex problem there is an answer that is clear, simple, and wrong." H. L. Mencken
    MX- antiX- bspwm, hlwm, xfce4


    Requirements creep… You make something work and it triggers more ideas of things that could also work, or make things work even better.

    To be honest, I don’t mind as long as they are things that I can get done, that people will be happy to see, and make use of.

    But my experience say, ask first, in case those deciding would rather not…


    anti- Do we really need the “Update Menus” option on the main menu still? I have tried it and it appears to run, but doesn’t seem to do anything because the synaptic, apt, apt-get, and menu manager seem to already update the menus. I could move it to the “Desktops” menu to save space in case there is still a need for it?

    I will change my program to process a folder tree starting at the folder passed as a parameter so it can be used for any folder. It could still be used to go directly to the desktop if desired by changing the Menu text and folder passed. By passing the /home directory it will allow the user to go into any non-hidden entry or folder in it.

    As far as the main menu, my revised solution is to do the above and then add the new entries grouped with the “Personal Menu” and before “Applications”:

    prog "App Select" /usr/share/icons/papirus-antix/48x48/apps/gnome-searchtool.png /usr/local/bin/app-select
    menufile "Personal Menu" /usr/share/icons/papirus-antix/48x48/apps/preferences-desktop-user.png personal
    menuprog "Home Folder" /usr/share/icons/papirus-antix/48x48/apps/applications.png /usr/local/bin/ ~/home
    menuprog "Drives" /usr/share/icons/papirus-antix/48x48/apps/file-manager.png /usr/local/bin/
    menuprog "Recent Files" /usr/share/icons/papirus-antix/48x48/apps/applications.png /usr/local/bin/
    menufile "Applications" /usr/share/icons/papirus-antix/48x48/apps/applications.png menu-applications
    menu "Desktop" /usr/share/icons/papirus-antix/48x48/apps/user-desktop.png {
        menufile "Other Desktops" /usr/share/icons/papirus-antix/48x48/apps/user-desktop.png /usr/share/desktop-session/wm-menus/icewm-wm-menu
        prog "RoxPanel on/off" /usr/share/icons/papirus-antix/48x48/apps/gnome-panel.png
        prog "Conky on/off" /usr/share/icons/papirus-antix/48x48/apps/utilities-system-monitor.png
        prog "Update Menu" /usr/share/icons/papirus-antix/48x48/apps/update-manager.png desktop-menu --write-out-global

    PPC, your syntax for recent files didn’t work, but I figured out what you were trying to do, and will list the last 25 files it shows in sequence most recent first, and open them with xdg-open.

    I also will do your request to show all drives, but only open the mounted drives, using the default file manager.

    Hopefully I will finish this in a night or two. It mostly depends how much trouble I run into. The filenames with spaces in them are still an issue.

    PS:I am taking a stab at the spaces in the filenames. Still need to redo the drives list, as it was written before I had a good way to process a loop.


    PPC, your syntax for recent files didn’t work,

    Sorry for that, Bob- the forum mangled the code somehow…
    And: I hope you are doing all this hard work after anti or someone else from the Dev team giving you the ” go ahead”, it’s a lot of work, and unless you feel it’s worth it for your own personal use or as a learning experience, you could end up a bit frustrated if your scripts don’t end up in a final antiX version…
    Also to clarify: I did ask you for a “recent files” dynamic menu entry, but on what concerns the drive menu entry I was just giving you my opinion because you seemed unsure of what the menu’s behavior should be when the user clicked the entries- it felt a bit of a wast having a such a good menu entry that did nothing…
    From all 3 proposed dynamic menus (Desktop, Drives and Recent) the “Drives” one seems, to me, to be the one that would be lower on the user’s wish list… On the other hand I find myself often thinking “what was the file I edited a bit ago”?- probably many users do the same, and there’s where the “Recent” menu comes handy- I was thinking of creating a yad script to do that- but it’s not what most users are used to- usually the OS has a inbuilt menu for that, not an application.
    As always, if I can I’ll try to help with testing or anything else I can, Bob!



    With the drives menu, I was using it to see what partition was where on which drive, and if it wasn’t mounted, I was clicking that partition to mount and open it in the file manager, requiring root access.

    There was no interest in the idea of popping up dynamic list menus until I posted the prototyped results. Having spent most of my life innovating and writing things and tweaking things, I can honestly say that many of the best ideas were not requested initially, but rather were improvements to other innovations.

    So sometimes if I can, I just put them out there, and see if someone likes it or improves the idea further.

    This particular group on innovations is in answer to the frustration of trying to run on a slow machine with low memory, and getting long delays on everything because too much of what resources it has were being used on less critical things like the pinboard and conky, and I was trying to see if I could get IceWM to perform those functions instead, at minimal cost of CPU and memory.


    There was no interest in the idea of popping up dynamic list menus until I posted the prototyped results

    I know the feeling… It was basically the same thing with some of the scripts I created, adapted or simply dug from the internet.
    Ever felt the need to add a icon to the toolbar without typing away at a config file? Do you think a modern OS needs to have a way to be updated that does not directly involve the terminal? Ever needed to change time or date and noticed you need to use the terminal for that? Or do you think every OS could have a easy way to access “all applications”?
    Now there are tiny scripts to do all that, included on the antiX-goodies package…
    Just like you, I began tackling what I believed were small gaps on a great OS- I know there’s no perfection, but having something “better” is an improvement to having something “good enough”, right?
    The Internet is full of small little scripts that could make computing life a tiny bit easier- for example- there are yad scripts to help create .desktop files (seeing that was what made me thing of using .desktop files in the Toolbar Icon Manager), to checksum files, you name it… I’m a big fan of tiny usefull scripts- because one knows how to use the terminal, and sometimes using the terminal is the most productive way to do something, it does not mean that users should be forced to use the terminal to do something- or in your case, be forced to use a Rox or SpaceFM managed desktop to easily access files on the desktop.
    I hope your scripting is doing fine, Bob!



    Yes, I’m making progress. Things are never as easy as they look, and writing bash scripts is pretty new to me. A year ago I didn’t understand that the different shells had different syntax, even. But I am making progress. I did have to start one over from scratch once in the past couple days, but it’s because I don’t actually know the language and as a result it takes many tries to make things work.


    I like this better now.

    I commented out the “Drives” option from the menu. Its still nice to get a list of what is mounted or not, and its still there, but commented out. I have multiple internal and external drives and flashdrives, etc and it is way too easy to make a mistake with them

    “Recent files” seems to be working now

    “Desktop Apps” is also working

    I moved “Applications” up under “Editor” so when you pull it down there will be more room

    I moved “Update Menus” to the “Desktops” sub-menu to keep the main menu from getting too busy.

    anticapitalista and others will hopefully try it and like it. I won’t be offended if things are adjusted. That’s what the continuous improvement process is all about. But at least I am putting ideas out there, making them appear, and adjusting to “wishes” and others ideas…

    I suppose I should post a pic with “Recent Files” up on the screen…

    PS: I see App Select disappeared, so I will post another file. Its was missing from the menu at some point, and that was the one I modified…

    • This reply was modified 6 months, 2 weeks ago by BobC.

    I like this better now.

    So do I, Bob- I’ll try to test it at home…
    It looks great!

    If you want a small “gift” for your hard work, you can be the first to test the more polished “Toolbar Icon Manager”, just out of the oven!!!:
    just paste the code to a filed named “”, make it executable, test it, and then overwrite the original script that is installed in antiX19 with this one (for example, with sudo cp /usr/local/bin/)
    Note: You can test it without doing that- but one new functionality- restarting TIM after adding or removing a icon, will simply call the older installed version, instead of the new one!


    • This reply was modified 6 months, 2 weeks ago by PPC.

    “Recent files” seems to be working now

    Hi Bob. I finally tested the dynamic menu that interested me the most- the “recent files” and it worked great!
    Like you said before it had one constraint- it does not deal with files that have spaces… They don’t even come up in the file list.
    I tried running the “tail…” command you used on the script via the terminal- it has the same outcome of the command I used on terminal to see the most recent files… so I did an experiment:
    one of the files no my recent file list was called

    If, using the terminal, I tried to run that file (using copy and paste) with xdg-open, it didn’t open the file… BUT, if I put the file name between quotes, the cli processes correctly the file name and opens it just fine!
    like so:
    xdg-open "/home/demo/Downloads/An%20idea%E2%80%A6%20IceWM%20Dynamic%20Desktop%20Menu%20%E2%80%93%20Page%202%20%E2%80%93%20antiX-forum.html"

    Could that work on your script?
    Sorry if it’s a basic question, and I don’t want to see presumptuous, just trying to help!

    Very nice work, if it was up to be, it should be included, by default on the final antiX19 version!

    Personal opinion thta no one asked, also off topic:
    antiX running with IceWM desktop, with Blueday theme and the default background image, with conky turned off, desktop icons off and with these dynamic menus an the Toolbar Icon Manager on the toolbar (and skippy-xd as a application switcher also on the toolbar – but this little not memory resident app is a “fetish” of mine, never mind that) does not look like a Desktop that runs on about 100-125 Mb of idle RAM! It looks something, at least in the same league as XFCE, that easily takes way more than double that RAM!!! (My MX Linux runs on almost 350 Mb of idle RAM)
    Very light weight, very modern looking desktop (following the recent “dark” trend), with all the amenities a regular or even advanced user may want, even on a machine that’s almost old enough to vote! 🙂

    anticapitalista once said he didn’t want to create a Lubuntu. He didn’t, it’s a way better OS, that also (at least to me) looks way better than that!



    Yes, I agree. I tested with a Pentium III and it was FAST, no delay at all.

    I don’t know the language that well. I had troubles with the spaces and quote marks. I didn’t try the hex? codes you were using, not sure if that is allowed or not.

Viewing 15 posts - 31 through 45 (of 100 total)
  • You must be logged in to reply to this topic.