New Fluxbox available – How to add buttons to it’s toolbar

Forum Forums General Tips and Tricks New Fluxbox available – How to add buttons to it’s toolbar

  • This topic has 17 replies, 7 voices, and was last updated May 24-4:19 pm by Brian Masinick.
Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #106594
    Member
    PPC

      I was pleased to see that Fluxbox was updated in antiX.
      The change I wanted to see implemented is now available: users can add a real start menu, show desktop button, and even quicklaunchers to the toolbar! The down side? Only “text quick launchers”. That, however, can be mitigated by force the use to show toolbar entries with a Font that has glyphs that can be used as “generic icons”. We have on in anti that includes, out of the box icons for File Manager, Web Browser, E-mail, Text Document, Audio Player, Movie Player, etc…

      Adding launchers to fluxbox toolbar is not easy and can be seen on a very old post of mine, about changing fluxbox look and feel, that I have to dig up…

      Basicly: edit Fluxbox’s “init” config file and add 2 lines, at it’s start, for each “button” you want to add to the toolbar. Examples for adding a “Menu” button and a “Show Taskbar” button:

      session.screen0.toolbar.button.togshowdesk.commands: ToggleCmd {ShowDesktop Matches (Title!=conky)} {DeIconify all}
      session.screen0.toolbar.button.togshowdesk.label: _
      session.screen0.toolbar.button.homenu.label: Menu
      session.screen0.toolbar.button.homenu.commands: RootMenu

      Then, add the buttons where you want them (the names are shown in bold, on the above lines), in the line that starts with
      session.screen0.toolbar.tools

      • This topic was modified 1 year ago by PPC.
      #106607
      Member
      PPC

        Now that I have little more time, here is a more detailed how to add a Menu, Show Desktop button, and quick launchers for the default File Manager an Web Browser to Fluxbox

        1- Make sure that your antiX is updated and you have the latest version of Fluxbox (if you just updated your fluxbox AND are already using it, log off and back on, just to be on the safe side)
        2- antix Menu > Control Centre > Fluxbox settings/config > “”init” tab. Make sure this lines are in that text file (you may add them anywhere in the file, choose an easy to find place, either at the start or the end of the file:

        ###Toolbar buttons/quicklaunchers
        session.screen0.toolbar.button.togshowdesk.commands: ToggleCmd {ShowDesktop (Title!=conky)} {DeIconify all}
        session.screen0.toolbar.button.togshowdesk.label: _
        session.screen0.toolbar.button.homenu.label: Menu
        session.screen0.toolbar.button.homenu.commands: RootMenu
        session.screen0.toolbar.button.webbrowser.label: Www
        session.screen0.toolbar.button.webbrowser.commands: exec desktop-defaults-run -b
        session.screen0.toolbar.button.filemanager.label: Files
        session.screen0.toolbar.button.filemanager.commands: exec desktop-defaults-run -fm

        Now look for the line that starts with:

        session.screen0.toolbar.tools:

        and add the “button.XXXX” entries you created. In my case, I also removed a few entries and have this line:

        session.screen0.toolbar.tools: button.homenu, button.togshowdesk, button.filemanager, button.webbrowser, workspacename, iconbar, systemtray, clock

        Save the config file

        3- Restart Fluxbox, to see the changes.
        The left corner of your toolbar will show
        Menu _ Files Www
        Each of this is a “button”. “Menu” summons the menu, “_” is the “Show desktop” button, “Files” summons the default file manager and “Www” summons the default Web Browser

        You can use the above examples to create the 2 needed lines for any given button and add that button to the “session.screen0.toolbar.tools” line in the config file, restart firefox and get the “text buttons”/Quick launchers”
        You can label the “buttons” anyway you want, I choose names easy for any English Speaking person to understand. Of course you can have only 1 letter, for example “F” for firefox, “G” for Google Chrome, etc.
        Any app (other than internal fluxbox commands” needs to start with “exec”. For example, if you want a button to run “Firefox”, the command will be “exec firefox”, etc…

        Edit: Why would anyone want to have a menu and a show desktop button in Fluxbox? It’s an old school Window Manager, it’s all about keyboard shortcuts, right?
        Yes and no. Not having the option to have a real “Menu” button (one could add an arrow that summoned the rootmenu, before this new version came out, that did exactly the same thing but could be confusing, because it’s just an arrow and the toolbar may have many arrows on it, to change workspaces and the focus of windows).
        The Fluxbox dev team opted to modernize Fluxbox and give it the possibility to have those, for many, essential buttons (at least the menu is essential, the “show desktop” one is a convinience).
        Fluxbox is tiny and fast, in some cases, in some of my test, it used some 3 to 4Mb less of idle RAM than IceWM. that’s not much, but if you are really, really strapped from RAM, say, you have 256 of RAM only, those free MB may be handy.
        I loved Fluxbox, so much that I created FT10 transformation pack to run on Fluxbox (that’s where the F comes from in FT10). The lack of launcher prompted me to use Tint2 as a toolbar under Fluxbox.
        Now, although it’s not as straight forward as adding a simple line in IceWM’s toolbar config file, Fluxbox is much more usable for folks that wanted to use it but missed having a Start Menu on the toolbar. When I have the time, I’ll add an How To use Glyphs as “button” labels, which is a very good emulation of having real “icons”.
        I read somewhere that there was a proposal that allowed Fluxbox “buttons” to have icons. If that option is available, I do not know how to use it.
        If fluxbox ever allows for icon “buttons”, then it would be relatively easy (hum… fatal words) to create a script, using app-select to choose an app and add it’s icon to the fluxbox toolbar, adding the needed lines to generate the “exec commands” and the “label”, and adding that button to the “session.screen0.toolbar.tools” line…

        With this proposed changes (that could be adopted, if anticapitalista so wishes) in antiX 23 fluxbox configuration, old time users can still use fluxbox exactly the same way, and new users can try this great window manager with a bit more ease of use…

        P.

        • This reply was modified 1 year ago by PPC.
        • This reply was modified 1 year ago by PPC.
        #106622
        Forum Admin
        rokytnji

          Giving it a try.

          Sometimes I drive a crooked road to get my mind straight.
          I don't suffer from insanity. I enjoy every minute off it.
          Motorcycle racing is rocket science.

          Linux Registered User # 475019
          How to Search for AntiX solutions to your problems

          #106624
          Moderator
          Brian Masinick

            Once upon a time, all of the window managers were small, and consumed anywhere between 58 MB and 62 MB;
            that was LONG ago. Back then, perhaps 20-27 years ago, I tested several of them, and Fluxbox, fvwm,
            icewm, jwm, and Blackboard, and *box (there were a few of them at one time), were all similar in size.

            From what I can tell, IceWM has added quite a few features and the 64-bit implementation is at least
            double or more the size of the early 32-bit version where I actually conducted tests. At that time,
            it was either the smallest or one of the smallest images, though Fluxbox was close.

            These days I think you’re right; Fluxbox is one of the lightest remaining window managers.
            One usability difference that led me to recommend IceWM was the default use of the left click, versus
            the middle or right click used in some of the other window managers; former Windows users are more
            familiar with left click, though I was familiar with both; UNIX workstations often used middle or
            right clicks, though with xmodmap you can remap any key sequence.

            Thank you for sharing the information about the latest implementation of Fluxbox; I’ll have to
            check it out!

            --
            Brian Masinick

            #106631
            Member
            blur13

              I can recommend the MX Linux fluxbox edition for those that enjoy fluxbox, they did a great job with that (also using tint2 etc).

              #106633
              Moderator
              Brian Masinick

                I can recommend the MX Linux fluxbox edition for those that enjoy fluxbox, they did a great job with that (also using tint2 etc).

                I haven’t used their Fluxbox edition in a while. Typically I use the X from MX, that is, Xfce, but I’ve tried both the Fluxbox and KDE Plasma editions a few times.

                Generally speaking, when I use a window manager, most of the time I use IceWM, and when I use a desktop environment, most of the time I use Xfce. I have been keeping one KDE Plasma on one distribution because one of my friends is always using it. KDE Plasma has improved, and though it’s definitely a heavy weight desktop environment, it’s more efficient than it’s been in the past. It’s even more overkill for me than Xfce; both are more than I need, which is why I’ve been using antiX even more than ever over the past couple of years.

                The only reason I use other stuff is that after all these years, I’m still a distro enthusiast, so checking out distros is somewhat of a hobby, more for the fun and interest than any specific need or requirement.

                @PPC I just tried out your settings and though it’s a different method, I appreciate it because I’ve become accustomed to IceWM and with these settings it’s a bit easier to get around with Fluxbox without changing too much. I can easily change back to either default settings or the previous setup I had, but for now I like your new approach.

                --
                Brian Masinick

                #106686
                Member
                PPC

                  Now, an How to have a fluxbox toolbar with some default “psedo-icons”.

                  1- make sure you have the “symbola” font installed. If you do not have it, install it and restart your antiX to enable it.
                  To install this font: antiX menu > Terminal

                  sudo apt install fonts-symbola

                  enter your password and wait for the install process to finish, then log off and back on…

                  2- antiX Menu > Control Centre > Fluxbox Settings > “overlay” tab
                  3- make sure that “overlay” has this line, and then save the file:
                  toolbar.button.*.font: Symbola

                  4- Now, on the “Init” tab in geany, edit the file, adding the entries:

                  
                  session.screen0.toolbar.button.homenu.label:	Menu
                  session.screen0.toolbar.button.homenu.commands:	RootMenu
                  session.screen0.toolbar.button.togshowdesk.commands:	ToggleCmd {ShowDesktop Matches (Title!=conky)} {DeIconify all}
                  session.screen0.toolbar.button.togshowdesk.label:	\360\237\227\227
                  session.screen0.toolbar.button.fm.commands:	exec desktop-defaults-run -fm
                  session.screen0.toolbar.button.fm.label:	????
                  session.screen0.toolbar.button.ff.commands:	exec seamonkey
                  session.screen0.toolbar.button.ff.label:	\360\237\214\220
                  session.screen0.toolbar.button.vol.commands:	exec yad-volume
                  session.screen0.toolbar.button.vol.label:	\360\237\224\210
                  session.screen0.toolbar.button.exit.commands:	exec desktop-session-exit
                  session.screen0.toolbar.button.exit.label:	⏻
                  session.screen0.toolbar.button.eject.commands:	exec unplugdrive.sh
                  session.screen0.toolbar.button.eject.label:	⍙
                  session.screen0.toolbar.button.installer.commands:	exec su-to-root -X -c packageinstaller
                  session.screen0.toolbar.button.installer.label:	????
                  session.screen0.toolbar.button.updater.commands:	exec yad-updater
                  session.screen0.toolbar.button.updater.label:	⭯
                  session.screen0.toolbar.button.wordprocessor.commands:	exec libreoffice --writer
                  session.screen0.toolbar.button.wordprocessor.label:	????
                  session.screen0.toolbar.button.networkmanager.commands:	exec cmst
                  session.screen0.toolbar.button.networkmanager.label:⛖
                  session.screen0.toolbar.button.calendar.commands:	exec yad-calendar
                  session.screen0.toolbar.button.calendar.label: ????
                  session.screen0.toolbar.button.weather.commands:	exec antix-weather.sh
                  session.screen0.toolbar.button.weather.label: ????
                  session.screen0.toolbar.tools:	button.homenu, button.togshowdesk, button.eject, button.fm, button.ff, button.wordprocessor, button.installer, button.updater, button.weather, workspacename, iconbar, button.networkmanager, button.vol, systemtray, button.calendar, clock, button.exit

                  5- Restart Fluxbox. It should have even more “icons” than in the attached screen grab…

                  I added every possible generic icon I could think of- File Manager, Web browser, Word Processor, Volume, Eject (usb pen-drives), Network, Exit, even a weather icon (that runs ft10’s weather “app”).
                  You can edit out what you do not want on the toolbar, or change the apps that each icon runs (file manager, web browser, word processor, text editor, etc…

                  Enjoy.

                  • This reply was modified 1 year ago by PPC.
                  #106694
                  Member
                  marcelocripe

                    PPC, this Fluxbox toolbar looks great!

                    #106756
                    Member
                    PPC

                      Once upon a time, all of the window managers were small, and consumed anywhere between 58 MB and 62 MB;
                      that was LONG ago. Back then, perhaps 20-27 years ago,

                      Hi, Mr. Masinick – I’m pleased to say that antiX 22, 32bits, running fluxbox (without desktop icons, without volumeicon, but with conky enabled) reports (in Conky) to be using 78.x to 79.x Mb when on idle. Not that bad of an increase over a 20+ years lifespan, considering, it’s running on a modern kernel!
                      By the way – I disabled volumeicon but added an “volume icon” next to the toolbar clock, that runs yad-volume on demand, so the only functionality I lose is not having a constant real time display of the volume level on the toolbar, but I save several Mb, on this 1GB of RAM device.
                      As far as I know fluxbox also does not display the calendar when users click the toolbar clock, so I added a “calendar icon” just before the clock, that runs the same calendar that icewm shows…
                      In terms of usability, the only feature fluxbox users are missing is the ability to easily add any quick-launcher button to the toolbar (they can do it by editing the init config file, and have to stick with text buttons or use the generic glyphs). Oh, and some of the included info- I got used to Icewm’s battery indicator, and Network and Resources squares- I think those features will draw me back to IceWM in no time. The other option, of course, is keep using Conky and minimize all windows, jump to an unused workspace to see the info I need.
                      I’ll upload here a odt file with the most useful symbola glyphs, that can be pasted to the init config file and used as generic “icons”…
                      After such a long time with IceWM, I’m starting to remember why I loved fluxbox so much. Using it now feels almost like using FT10’s tint2 toolbar, but without needing any extra apps…

                      P.

                      • This reply was modified 1 year ago by PPC.
                      #106773
                      Moderator
                      Brian Masinick

                        That’s good to know.

                        I got rid of my last two 32-bit systems sometime between 2015-2018 because only a couple distributions still ran 32-bit software and they also had a limited address space. I will say that all of them were still functional.

                        Some people think that electronics are not that reliable. For me, I’ve had outstanding results with virtually everything I have owned and I have had good service with employers equipment too.

                        Oh, and as far as network intrusions I’ve had minimal issues by following best practices. Employers have been targeted a lot more than me; guess they have more valuable stuff worth chasing.

                        --
                        Brian Masinick

                        #107308
                        Moderator
                        christophe

                          I’ll upload here a odt file with the most useful symbola glyphs, that can be pasted to the init config file and used as generic “icons”…

                          I’m sure you know I am a long-time fan of your add-ons, etc, PPC. And I am eagerly awaiting your file to add a glyph icon for my terminal on the toolbar (whenever you get time, that is). 😉

                          Attachments:

                          confirmed antiX frugaler, since 2019

                          #107394
                          Member
                          PPC

                            And I am eagerly awaiting your file to add a glyph icon for my terminal on the toolbar

                            I found no perfect “pseudo-icon” for that, unfortunately. But my list of organized Glyphs is attached. As always, it requires the Symbola font to be installed…

                            For the “terminal” button I recommend something like:

                            $_

                            P.

                            Attachments:
                            #107476
                            Member
                            ile

                              Hello PPC
                              hello christophe
                              Enjoying fluxbox Style bloe.
                              echo antiX$SHELL$
                              antiX~$ for now space>$space
                              to show delimit commands colon.
                              System 1.3.7+git20220731-0antix23 designates Mouse2 on fluxbox toolbar to show fluxbox Toolbar menu.
                              Mouse3 on fluxbox always rootmenu. [okay. or windowmenu.] Can give that.
                              Invent one Mouse(4/5)(?) !requires /keys turn off the “scroll.toolbar to change workspaces.”

                              A button as a fluxbox custom menu for mini or unlimited commands; personal menu, type often, favorite.
                              Scroll env has control center. Center in desktop-session-menu-window, centre elsewhere.
                              scrot select hole can capture root window without fluxbox toolbar, fluxbox toolbar not visible click root window [|twice.] visible has empty iconbar using hole; scrot -s crops toolbar clicking on root window.
                              sample

                              session.screen0.toolbar.button.menu.label: \ Menu
                              session.screen0.toolbar.button.menu.commands: :ToggleCmd {RootMenu}{HideMenus} :Click3 :rootmenu :Mouse4 :exec file=$(yad --center --title="Places" --no-buttons --file & sleep 1 && xdotool key Next && xdotool key Next && xdotool key KP_Enter) && xdg-open ${file} && return
                              session.screen0.toolbar.button.pad.label: \ pad
                              session.screen0.toolbar.button.pad.commands: exec leafpad :Mouse3 :rootmenu :Mouse4 :custommenu ~/.fluxbox/recent_files_menu
                              session.screen0.toolbar.button.find.label: \ find
                              session.screen0.toolbar.button.find.commands: exec wofi --normal-window --show=drun,run :Click3 :exec fbrun -autocomplete -center :Mouse4 :exec xman -bothshown
                              session.screen0.toolbar.button.img.label: \ img
                              session.screen0.toolbar.button.img.commands: exec gpick :Mouse3 :exec gthumb
                              session.screen0.toolbar.button.termi.label: \ >$  
                              session.screen0.toolbar.button.termi.commands: exec /usr/bin/x-terminal-emulator :Mouse3 :rootmenu :Mouse4 :exec su-to-root -X -c zzzfm
                              session.screen0.toolbar.button.scr.label: \ scr
                              session.screen0.toolbar.button.scr.commands: exec scrot -shole -d 2 -q 93 'scr%Y%j%R%S.jpg' :Click3 :exec scrot -p -q 80 -d 11
                              session.screen0.toolbar.button.env.label: \ env 
                              ## Place begin and end tags into /fluxbox-wm-menu qualify custommenu. maintenance item. 
                              session.screen0.toolbar.button.env.commands: custommenu /usr/share/desktop-session/wm-menus/fluxbox-wm-menu :Click3 :rootmenu :Mouse4 :exec /usr/local/lib/desktop-session/desktop-session-menu-window ignore-settings
                              #surpriseus and Places, recentus and imageus and rootus and menuus and runus and desktopsessionus and terminalus bashus 
                              
                              #107478
                              Moderator
                              christophe

                                For the “terminal” button I recommend something like:

                                $_

                                Yep. I like that. Thanks again!

                                confirmed antiX frugaler, since 2019

                                #107546
                                Member
                                ile

                                  /overlay

                                  ## react with all Toolbar button.s. 
                                  #toolbar.button.pixmap: /usr/share/pixmaps/pstree16.xpm
                                  #toolbar.button.pixmap: /usr/share/pixmaps/exo/exo-thumbnail-frame.png
                                  toolbar.button.font: Infini Picto-14
                                  ## picColor font 
                                  toolbar.button.picColor:  moccasin
                                  #toolbar.button.font: Symbola-12
                                  toolbar.button.pressed.color:  aqua
                                  Attachments:
                                Viewing 15 posts - 1 through 15 (of 18 total)
                                • You must be logged in to reply to this topic.