Proposal: antiX’s Conky Manager

Forum Forums antiX-development Development Proposal: antiX’s Conky Manager

  • This topic has 57 replies, 11 voices, and was last updated Jan 23-9:43 pm by PPC.
Viewing 13 posts - 46 through 58 (of 58 total)
  • Author
    Posts
  • #129730
    Member
    ile

      All Right Mister Brian
      Fun, in conky-speak that is
      conky -i 17 -t ' version $conky_version conky'
      conky -i 37 -t '${exec conky -v|fold -s -w26}'

      #129731
      Moderator
      Brian Masinick

        All Right Mister Brian
        Fun, in conky-speak that is
        conky -i 17 -t ' version $conky_version conky'

        I’ll have to try that tomorrow!

        --
        Brian Masinick

        #129738
        Member
        PPC

          cp .conkyrc .conkyrc-SAVE, then save BrianConky.txt, and cp BrianCnnky.txt .conkyrc

          I noticed a typo on the last copy command!
          Also, if anyone is using this GUI: click the backup conky button and then click the load conky configuration file and select BrianConky.txt! How easy is trying out new conkies? 🙂

          I tested this configuration- I know you like seeing seconds (from the time you talked about wanting seconds on the toolbar’s clock), but for me it’s too distracting, most of the time. I do like that the clock uses less horizontal space… but then again, it uses more vertical space… The fact is that screens do have more horizontal space than vertical space, so something closer to the original settings that I use makes more sense… And you also forced me to take a better look at the time and date section of Conky. Maybe I’ll play around with it a bit more! I’m glad that you like my suggested “modern” layout enough to experiment with it and make it your own… There’s probably one thing that may get added to the “System info section”: disk activity – I sometimes use that, on my very slow netbook to check how hard the disk is working… On more modern computers there’s probably not much need for that (but it’s featured on the default conky layout)

          Edit:
          Last night, I took a look at all conkies available in MX-Linux – there are dozens of them (literally). Some look stunning. Several are the identical, but using several different colors. The last one looks like our default conky. A couple of them did not show up anything.
          I’m quite happy for one single thing: most of their conkies that display the full system info have basically the same info that our default conky displays.
          The “Manyroads” (great guy!) configurations can be used almost like the “applets” in my modern conky – you can select exactly what you want to be displayed (but loading a different conky for each section. Unfortunately one of those conkies, I think the “RAM” one overlapped the others, so… not as graceful as my choice.
          This test made me realize that there are at least 2 main system information categories that can/should be added to the Modern Conky:
          – hdd/ssd I/O (so users can see disk activity, I think already mentioned this before)
          – top running processes (if I add this feature, it will be off by default).

          So the single main advantage that I see MX conkies offer is a huge variety of predefined configurations. You do not have a GUI to select the main color, but several configurations are offered in several main colors… You also have a great deal of eye candy – using not just text and graphics, but images, some of them do make conky look like an impressive looking “widget”, something that really is a pleasure to look at… But I think that although pretty to look at, that adds no extra functionality- most of the conkies there offer the basic functionality the default “Modern Conky” configuration has… and, as far as I could see, none display the weather, out of the box.

          My comparison is, that, when using antiX conky Manager and selecting the Modern conky, users get pretty much the same functionality that most of MX conkies offer, plus the weather (if they so wish). No pretty looking images, just text and the weather glyphs… But a lot of customization. It’s too different ways of getting pretty similar results.

          P.

          • This reply was modified 1 month, 1 week ago by PPC.
          #129749
          Member
          PPC

            For now, if you want to add Disk Input/Output information to the Modern Conky, click the option to manually edit it’s configuration file and paste this lines, anywhere you want the information to be displayed (I recommend below the “###****Show Indicators for HD RAM CPU SWAP” lines):

            ###****Show Disk Input/Output:
            ${offset 12}${color FFA300} DISK I/O: ${color}${diskio}

            I’m checking out how to add a list of the biggest running processes too…

            EDIT:
            To insert the Top 5 running processes, and their CPU usage, try something like:

            ###****Top running processes:
            ${offset 15}${color FFA300}TOP PROCESSES: 
            ${offset 15}$color${top name 1}${alignc}CPU:${top cpu 1}%
            ${offset 15}$color${top name 2}${alignc}CPU:${top cpu 2}%
            ${offset 15}$color${top name 3}${alignc}CPU:${top cpu 3}%
            ${offset 15}$color${top name 4}${alignc}CPU:${top cpu 4}%
            ${offset 15}$color${top name 5}${alignc}CPU:${top cpu 5}%

            I like the “disk I/O” indicator (that is also present in the default conky), but I don’t use the “Top processes” feature, but since it was something I saw in some MX conkies, I took a look at how to implement a similar feature in the modern conky. For now, I won’t be updating the GUI/modern conky template with this features. You can follow the above instructions and add them, if you want to.

            P.

            • This reply was modified 1 month, 1 week ago by PPC.
            • This reply was modified 1 month, 1 week ago by PPC.
            • This reply was modified 1 month, 1 week ago by PPC.
            #129752
            Moderator
            Brian Masinick

              conky -i 17 -t ‘ version $conky_version conky’

              conky -i 17 -t ' version $conky_version conky'
              Conky: forked to background, pid is 19779
              [antix-23]/home/masinick: > 
              Conky: desktop window (600008) is subwindow of root window (6a9)
              Conky: window type - normal
              Conky: drawing to created window (0x1c00001)
              Conky: drawing to double buffer

              --
              Brian Masinick

              #129758
              Moderator
              Brian Masinick

                The conky used in antiX-23 is the same version as the one in antiX-21/22 ie conky-legacy-std 1:1.9.0-6
                However, antiX-22 shipped with conky-legacy-all rather than conky-legacy-std

                This confirms what I see when I check on the Conky package installed.
                From what I can tell we have no reason to try to use any different Conky packages because conky-legacy-std is able to produce everything that either @PPC or I have attempted to do.

                On my system the one output that takes a while to appear when I first login is the weather temperature, “sun” image and wind speed; that is because these things come from curl wttr.in, which requires an active network connection. When my system first boots, because of a rather slow, involved wireless network “hand shake” at the place where I live, sometimes the connection is reasonably quick and other times it takes a minute or even two minutes. A few times I’ve even had to reboot. This is NOT an antiX issue; it happens on all of my systems. Some days it’s barely an issue; other days it is downright irritating, but eventually the connection takes place. These symptoms began between 1-2 years ago when 44 additional units were added to our complex and the network provider made some changes to our wireless network authentication. They also indicated that they had newer routers available, but that our current configuration was “adequate” to handle the workload. To me, “adequate” translates to that “it works”, but initial network connectivity is poor to fair; once actually connected, bandwidth is fine, it’s the connection protocols that suffer with the equipment on site.

                So that has nothing directly to do with Conky EXCEPT that the weather display takes a while to be presented because of the connection performance where I live.

                --
                Brian Masinick

                #129759
                Moderator
                Brian Masinick

                  For now, if you want to add Disk Input/Output information to the Modern Conky, click the option to manually edit it’s configuration file and paste this lines, anywhere you want the information to be displayed (I recommend below the “###****Show Indicators for HD RAM CPU SWAP” lines):

                  ###****Show Disk Input/Output:
                  ${offset 12}${color FFA300} DISK I/O: ${color}${diskio}

                  I’m checking out how to add a list of the biggest running processes too…

                  P.

                  Hey @PPC, this works fine, but if you do NOT want to see changing values, as I have in my clock with seconds, this addition will add yet another value that varies depending on activity. On a “dormant system”, the HD, RAM, CPU, and DISK I/O values are “quiet”, but when there is system activity, these fluctuate MORE than once a second, so you’d better not watch the Conky display too much or it’ll distract you! [grin]

                  --
                  Brian Masinick

                  #129806
                  Member
                  ile

                    Hi Mister Brian
                    Thanks for trying the tiny conky
                    shows for a few seconds conky version.
                    looks like it ran okay. the second one is bigger. Fun.

                    #129807
                    Moderator
                    Brian Masinick

                      This one also shows the details for a few seconds on Conky plus stdout on the terminal:

                      conky -i 37 -t '${exec conky -v|fold -s -w26}'
                      Conky: forked to background, pid is 18112
                      [antix23-hp-14-fq1025]/home/masinick: > 
                      Conky: desktop window (6a9) is root window
                      Conky: window type - normal
                      Conky: drawing to created window (0x1400001)
                      Conky: drawing to double buffer

                      I thought I shared that output but I don’t see it; that’s a useful debugging output on the screen and if you’re “ready” it’s long enough to grab a screen capture.

                      --
                      Brian Masinick

                      #130238
                      Member
                      PPC

                        Change log:
                        – Compacted the code (I just reuse the dame generic function, when I can);
                        – Edited the Modern Conky template to always apply the correct color and font to the displayed text.
                        – Simplified the time&date display, making it also look better on some displays;
                        – Added button to toggle Disk Input/Output (off by default);
                        – Added a button to toggle the Modern Accent color;
                        – Added button to toggle the main font (handy for those with vision problems, they can make the generic font larger, for example… and also change it’s color, so it’s easier to read);
                        – Added, to the Modern Conky configuration file, code that allows to display the top 5 processes (but added no GUI to toggle that, to stop “Feature creap”- if more advanced users want that feature, they just have to uncomment those lines);
                        – Added button to toggle the Original Conky theme (I did not even remember we had a cli script for that! This GUI uses it- now even people that want to just stick with the default Conky can easily change the way it looks);

                        EDIT: Sorry folks, I uploaded a script I was doing some testing on by mistake. Please download only the script that ends in “FIXED.zip”

                        • This reply was modified 1 month, 1 week ago by PPC.
                        • This reply was modified 1 month, 1 week ago by PPC.
                        • This reply was modified 1 month, 1 week ago by PPC.
                        #130256
                        Member
                        sybok

                          Hi, I find the code a bit confusing to read.

                          1)
                          Line 40[6-7]:
                          definition of a function ‘toggle_default_color’ is started
                          Line 414:
                          definition of a function ‘white’ is started before the definition of the previous function is closed.
                          Line 471:
                          Ha, that’s where ‘toggle_default_color’ seems to be closed.

                          It seemed like a typo, i.e. missing closing ‘}’, to me at first.
                          Is there any benefit from defining general functions within a function and then export them?
                          For me, it just makes the code unnecessarily complex.

                          2) Please, write the (internal) change-log entries in reverse order, hence the latest will be on the top, see e.g.
                          https://dev.to/jonasbn/why-and-how-should-you-write-a-good-change-log-4kp0

                          3) The functions for individual colors seem to somewhat duplicate the ‘pick_color’.
                          You could adjust ‘pick_color’ to accept an argument ‘color’.
                          If the argument-value is empty, color is picked.

                          pick_set_color(){
                            # If color-argument is empty, then pick a color and set it to conky
                            color="$1"
                            if [ -z "${color}" ]; then
                              value=$(yad-color)
                              color="${value:1}"
                            fi
                            if [ -n "$color" ]; then
                              echo "not empty"
                              sed -i "s/^color2 .*/color2 $color/"  "$HOME/".conkyrc # (User-name and consequently its) Home may contain white-spaces
                              pkill conky &
                              sleep 0.5
                              conky &
                            else
                              echo "Nothing to do, empty color|value"
                              exit
                            fi
                          } # pick_set_color

                          But I have yet failed to test the corresponding ‘bash -c <color function>’ calls. 🙁

                          BTW, 1) is a reason why I (keep) suggest(ing) the below two code-guidelines:
                          A) Indentation (either tab or spaces) to make nested block of codes visually more distinct.
                          B) Comment when closing the definition of the function, e.g.

                          function schlemix(){
                            echo "Foo but not bar"
                          } # schlemix
                          #130264
                          Member
                          PPC

                            Dear Sybok – as always, thanks for reviewing my code.
                            The reason why the color selection functions look so needlessly complicated is because I simply adapted the code from a FT10 script and turned that script into a function, that, in turn, as sub-functions.
                            In the future, I’ll try to remember to add the comment after closing functions, to make it easier to read the code. Usually I just comment the hell out of any script I write, to help myself remember what I did, but I don’t feel the need to comment the closing of a function…

                            @all:
                            Yesterday, I dug up a conky line of code to display Caps Lock and Num Lock state. I’ll probably will add it (commented out) to the Modern Conky template, so anyone can turn it on, but I probably won’t be adding a GUI for doing that (unless there’s demand for it).

                            ###*** Show Caps Lock and Num lock
                            ${offset 12}${color2}${font} Caps Lock:${exec xset q | grep "Caps Lock" | awk '{print $4}'}${color}  ${color2}	$font${exec xset q | grep "Num Lock" | awk '{print $6 $7 $8'}${color}

                            My idea was, and still is, having the easiest to read Conky configuration file, with every single feature I can think anyone can need, crammed into it, so folks do not have to go around searching for it on-line, like I did… I aim to make that config file kind of the IceWM config file, that lists and comments most of the features IceWM has – I can’t really do that with Conky, but I can write a file that, in a couple of years, after I forgot who to do all this stuff, I just have to uncomment a line and get the feature I need.
                            I took a look at KDE’s widgets, to get a feel for what people think should/could be displayed in the desktop. Conky has it’s limits, of course, and I won’t spend countless hours creating a GUI to allow users to move “Modern” Conky “applets” around, like you can do in KDE- if you want to move anything, just edit the config file and move that line to where you want it displayed – you don’t even have to read what each line does, everything that’s displayed in Modern Conky, has a line starting with “###***” explaining the feature that’s below it…

                            #130321
                            Member
                            PPC

                              V 1.3 Change log:
                              -Added a move Conky button (works for any Conky, not just the Modern configuration file). This was one of the last important features I wanted to implement, before stopping developing this script.
                              -Small tweaks in the Modern configuration file template (that includes the caps and num indicator, off by default, without a GUI to toggle that)
                              -Implemented most of Sybok’s suggestions, to make the code easier to read (too tired to change the colors functions, maybe later).

                              Edit: this script is now more useful for people that just want to keep the current conky: it allows to toggle it on/off permanently, to change it’s colors and to also change it’s position- not bad for our trusty old conky.
                              For folks that like the Modern Conky configuration, it is almost as feature rich as any set of desktop applets found in much more resource hungry OSes…
                              P.

                              • This reply was modified 1 month, 1 week ago by PPC.
                            Viewing 13 posts - 46 through 58 (of 58 total)
                            • You must be logged in to reply to this topic.