Announcement

Collapse
No announcement yet.

i don't remember kde4 doing this...

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Originally posted by Snowhog View Post
    You can do it! Don't give in to the Dark Side of the Force!!
    Now that I have some idea what I'm doing it appears the person who wrote the script is a little skeered of arrays; I think at the end of the day I'm probably going to end up rewriting the whole script as I think I can accomplish the same thing with a little more than half the code. Pretty sure I can build a table of variables and use a looped single function to draw rings using variables for size, color and location.

    I'm still gonna plagiarize a bunch of the author's functions but instead of using a dozen and a half functions to draw rings I think can just store variables in an array and swap them out as required.

    Damn, it's been a heck of a long time since I had to write code
    we see things not as they are, but as we are.
    -- anais nin

    Comment


      #17
      Meh. Hanging it up and going in another direction with conky. Sadly, the script that everybody's been using to create the rings has a bit of a memory leak and I've restarted conky so many times in the past couple weeks I didn't see it because I never gave it time to run.

      I let it sit for a whole day and lua's parent process (conky) went from using 3MB of RAM to over 200MB. I added a collectgarbage() right outside the routine that creates the rings which had no effect.

      Anyway, going in another direction since I decided that I really didn't want to rewrite the routines from scratch with a shaky skillset and no guarantee I could fix it
      we see things not as they are, but as we are.
      -- anais nin

      Comment


        #18
        All done. Clickable screenshot below -



        Went back to original design with some tweaks. I did get temp and battery levels to change color based on preset thresholds and that's kinda interesting - if anybody is interested here's the relevant code:
        Code:
        ${color cccccc}${if_match ${i8k_cpu_temp} > 75}${color ffff00}${endif}${if_match ${i8k_cpu_temp} > 90}${color ff0000}${endif}cpu temp:${alignr}${i8k_cpu_temp}°C
        - this is a first generation i7 laptop and runs a little warm

        Also, here's the battery indicator -
        Code:
        ${color cccccc}${if_match ${battery_percent} <= 50}${color ffff00}${endif}${if_match ${battery_percent} <= 10}${color ff0000}${endif}battery:${alignr}${battery_percent}%
        ${alignc}${battery_bar 3,180}
        ${alignc}${battery_time}
        Represents about four hours of trial and error but it works
        we see things not as they are, but as we are.
        -- anais nin

        Comment


          #19
          Nice background!

          Comment


            #20
            Originally posted by MoonRise View Post
            Nice background!

            That it is! It perfectly matches the dark theme!
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #21
              More conky fun - and we did this without lua :P

              Also, this one appears to work without a window rule; I've had no disappearing on right-click, no artifacts, nothing. I've removed my window rule; I'm running KDE Frameworks 5.23.0 and Qt 5.6.1



              The fun thing about this one is that you can change all the green to another color by changing just one value. Also, temp and battery indicators change from default color to yellow or red based on preset thresholds.



              Resource use isn't bad at all - check it out:



              And source code for anyone who wants it - or wants part of it. Didn't plagiarize anything here

              Also, since I've been juggling conky configurations I moved the whole config to ~/.config/conky/conky.conf so I could have a subdirectory to hold all the experiments that didn't quite pan out
              Code:
              conky.config = {
                  
              -- conky setup
              	
              update_interval = 1,
              update_interval_on_battery = 5,
              background = true,
              total_run_times = 0,
              cpu_avg_samples = 1,
              no_buffers = true,
              text_buffer_size = 2048,
              temperature_unit = 'celsius',
              override_utf8_locale = true,
              	
              -- set up window
              	
              alignment = 'top_right',
              gap_x = 40,
              gap_y = 80,
              maximum_width = 220,
              double_buffer = true,
              background = true,
              own_window = true,
              own_window_transparent = true,
              own_window_type = 'dock',
              own_window_argb_visual = true,
              own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
              draw_borders = false,
              draw_shades = false,
              draw_outline = false,
              use_xft = true,
              uppercase = false,
              short_units = true,
              	
              -- colors
              	
              color0 = '339900', -- bar/graph color
              color1 = 'cccccc', -- text color
              color7 = '339900', -- green
              color8 = 'ffff00', -- yellow
              color9 = 'ff0000', -- red
              
              }
              
              -- text
              
              conky.text = [[
              ${font Arial Rounded:size=16}${color1}${alignc}${time %l:%M %P}${font}
              ${font Arial Rounded:size=7}${alignc}${time %A}, ${time %B} ${time %e}
              
              ${font Arial Rounded:size=8}${color1}cpu freq:${font Arial Rounded:size=7}${alignr}${freq 1} mhz
              ${font Arial Rounded:size=8}${color1}${if_match ${i8k_cpu_temp} > 75}${color8}${endif}${if_match ${i8k_cpu_temp} > 90}${color9}${endif}cpu temp:${alignr}${i8k_cpu_temp}°C
              
              ${font Arial Rounded:size=6}${color1}${goto 82}cpu 0 ${cpu cpu1}%${color0}${goto 10}${voffset -7}${cpubar cpu1 18,200}
              ${color1}${goto 82}cpu 1 ${cpu cpu2}%${color0}${goto 10}${voffset -7}${cpubar cpu2 18,200}
              ${color1}${goto 82}cpu 2 ${cpu cpu3}%${color0}${goto 10}${voffset -7}${cpubar cpu3 18,200}
              ${color1}${goto 82}cpu 3 ${cpu cpu4}%${color0}${goto 10}${voffset -7}${cpubar cpu4 18,200}
              ${color1}${goto 82}cpu 4 ${cpu cpu5}%${color0}${goto 10}${voffset -7}${cpubar cpu4 18,200}
              ${color1}${goto 82}cpu 5 ${cpu cpu6}%${color0}${goto 10}${voffset -7}${cpubar cpu4 18,200}
              ${color1}${goto 82}cpu 6 ${cpu cpu7}%${color0}${goto 10}${voffset -7}${cpubar cpu4 18,200}
              ${color1}${goto 82}cpu 7 ${cpu cpu8}%${color0}${goto 10}${voffset -7}${cpubar cpu4 18,200}
              
              ${font Arial Rounded:size=8}${color1}memory:${font Arial Rounded:size=7}${alignr}$mem / $memmax
              ${color0}${membar 9,200} ${if_existing /proc/swaps partition}
              
              ${font Arial Rounded:size=8}${color1}${color1}swap:${font Arial Rounded:size=7}${alignr}$swap / $swapmax
              ${color0}${goto 10}${swapbar 9,200} ${endif}
              
              ${font Arial Rounded:size=8}${color1}root:${font Arial Rounded:size=7}${alignr}${fs_used /} / ${fs_size /}
              ${color0}${goto 10}${fs_bar 9,200 /}
              
              ${font Arial Rounded:size=8}${color1}/home:${font Arial Rounded:size=7}${alignr}${fs_used /home} / ${fs_size /home}
              ${color0}${goto 10}${fs_bar 9,200 /home}
              ${color0}${alignc}${voffset 8}disk i/o:
              ${color1}${alignc}${diskio}
              
              ${color1}${if_existing /proc/net/route wlan0}
              ${font Arial Rounded:size=8}${color1}${voffset -24}wlan:${font Arial Rounded:size=7}${alignr}${wireless_link_qual_perc wlan0}%
              ${color0}${goto 10}${wireless_link_bar 9,200 wlan0}
              ${alignc}${color0}${voffset 8}dn: ${color1}${downspeedf wlan0}${color0} kbps
              ${alignc}up: ${color1}${upspeedf wlan0}${color0} kbps${endif}
              
              ${color1}battery:${alignr}${battery_percent}%${if_match ${battery_percent} <= 50}${color8}${endif}${if_match ${battery_percent} <= 10}${color9}${endif}
              ${color0}${goto 10}${battery_bar 9,200}
              ${alignc}${voffset 8}${battery_time}
              
              ${font Arial Rounded:size=8}${color1}${alignc}${voffset -16}${nodename}
              ${color0}${alignc}kernel: ${kernel}
              ${font}
              ]]
              Last edited by wizard10000; Jul 24, 2016, 07:02 AM.
              we see things not as they are, but as we are.
              -- anais nin

              Comment

              Working...
              X