Announcement

Collapse
No announcement yet.

Conky as a working desktop file

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

    Conky as a working desktop file

    Okay, help an old goober out.

    How the heck does one get conky to autostart now? You have two choices under Autostart -- Add Program and Add Script. Conky is a program, but choosing that and navigating to /usr/bin/conky isn't working for me. So, I copied an existing and working .desktop file entry (yakuake) and replaced all relevant entries with conky. Once done doing that, Conky shows up as an enabled Desktop File in Autostart, but logging out/rebooting doesn't result in conky starting and appearing on the Desktop after I've logged in.

    How do I make conky autostart?
    Windows no longer obstructs my view.
    Using Kubuntu Linux since March 23, 2007.
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    #2
    How about adding it as an executable script under ~/.profile ?
    "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


      #3
      I have mine in the "desktop file" section (add program) and the "conky.desktop" file in /home/vinny/.config/autostart/ contains ,,,,,,,,,,,,,

      Code:
      [Desktop Entry]
      Comment[en_US]=
      Comment=
      Exec=conky
      GenericName[en_US]=
      GenericName=
      Icon=system-run
      MimeType=
      Name[en_US]=
      Name=
      Path=
      StartupNotify=true
      Terminal=false
      TerminalOptions=
      Type=Application
      X-DBUS-ServiceName=
      X-DBUS-StartupType=
      X-KDE-SubstituteUID=false
      X-KDE-Username=
      and it dose start on login ,,,,,,but it still disappears now and then until something is clicked .

      VINNY
      i7 4core HT 8MB L3 2.9GHz
      16GB RAM
      Nvidia GTX 860M 4GB RAM 1152 cuda cores

      Comment


        #4
        Well go figure. It's actually been awhile since I tried adding conky 'as a program' in Autostart. But I did; logged out and back in, and viola, conky is there on my Desktop. I guess and old dog can be taught new tricks!
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Originally posted by vinnywright View Post
          I have mine in the "desktop file" section (add program) and the "conky.desktop" file in /home/vinny/.config/autostart/ contains ,,,,,,,,,,,,,

          Code:
          [Desktop Entry]
          Comment[en_US]=
          Comment=
          Exec=conky
          GenericName[en_US]=
          GenericName=
          Icon=system-run
          MimeType=
          Name[en_US]=
          Name=
          Path=
          StartupNotify=true
          Terminal=false
          TerminalOptions=
          Type=Application
          X-DBUS-ServiceName=
          X-DBUS-StartupType=
          X-KDE-SubstituteUID=false
          X-KDE-Username=
          and it dose start on login ,,,,,,but it still disappears now and then until something is clicked .

          VINNY
          The generated conky.desktop file (in ~/.config/autostart/) looks exactly like yours except for the Exec= line. Mine shows the full path to conky (/usr/bin/conky). Otherwise the file contents are identical.
          Windows no longer obstructs my view.
          Using Kubuntu Linux since March 23, 2007.
          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

          Comment


            #6
            Originally posted by Snowhog View Post
            Well go figure. It's actually been awhile since I tried adding conky 'as a program' in Autostart. But I did; logged out and back in, and viola, conky is there on my Desktop. I guess and old dog can be taught new tricks!
            Woof WOOF ,,,,,,,,

            VINNY
            i7 4core HT 8MB L3 2.9GHz
            16GB RAM
            Nvidia GTX 860M 4GB RAM 1152 cuda cores

            Comment


              #7
              bump. Sorry I missed this

              My desktop file:

              Code:
              [Desktop Entry]
              Exec=conky -d
              Icon=system-run
              OnlyShowIn=KDE;
              Path=
              Terminal=false
              Type=Application
              Some interesting tweaks

              From the top, cpu freq number changes color if running at less than max speed (I change CPU governor from performance to powersave when on battery).

              CPU bar *border* color (not the whole bar) changes color based on CPU load.

              Battery bar border color and time below it change color based on battery level.

              We change border colors by overlaying a different color bar with a value of zero.



              And - my conky.conf just in case anyone wants to borrow some stuff -
              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 = 20,
                  gap_y = 72,
                  maximum_width = 200,
                  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,
                  draw_graph_borders = true,
                  default_bar_size = '4 180',
                  use_xft = true,
                  font = 'Arial:size=11',
                  uppercase = false,
                  short_units = true,
              	
                  -- colors
              	
                  color0 = '68696b', -- bar/graph color
                  color1 = 'cccccc', -- text color
                  color7 = '4dff4d', -- green
                  color8 = 'ffff4d', -- yellow
                  color9 = 'ff4d4d', -- red
              
              }
              
                  -- text
              
              conky.text = [[
              ${font Arial:size=24}${color1}${alignc}${time %l:%M %P}${font}
              ${font Arial:size=9}${alignc}  ${time %A}, ${time %B} ${time %e}${font}
              
              uptime:${alignr}${uptime}
              ${color1}cpu freq:${alignr}${if_match ${freq 1} < 1734}${color8}${endif}${freq 1}${color1} mhz
              ${color1}cpu temp:${alignr}${if_match ${i8k_cpu_temp} > 75}${color8}${endif}${if_match ${i8k_cpu_temp} > 90}${color9}${endif}${i8k_cpu_temp}°C
              
              ${font Arial:size=10}${color1}${goto 36}${voffset -2}cpu 0${goto 156}${cpu cpu1}%
              ${color0}${goto 6}${cpubar cpu1}${if_match ${cpu cpu1} >= 50}${color8}${goto 6}${execbar echo 0}${endif}${if_match ${cpu cpu1} >= 75}${color9}${goto 6}${execbar echo 0}${endif}
              ${color1}${goto 36}cpu 1${goto 156}${cpu cpu2}%
              ${color0}${goto 6}${voffset -2}${cpubar cpu2}${if_match ${cpu cpu2} >= 50}${color8}${goto 6}${execbar echo 0}${endif}${if_match ${cpu cpu2} >= 75}${color9}${goto 6}${execbar echo 0}${endif}
              ${color1}${goto 36}cpu 2${goto 156}${cpu cpu3}%
              ${color0}${goto 6}${cpubar cpu3}${if_match ${cpu cpu3} >= 50}${color8}${goto 6}${execbar echo 0}${endif}${if_match ${cpu cpu3} >= 75}${color9}${goto 6}${execbar echo 0}${endif}
              ${color1}${goto 36}cpu 3${goto 156}${cpu cpu4}%
              ${color0}${goto 6}${cpubar cpu4}${if_match ${cpu cpu4} >= 50}${color8}${goto 6}${execbar echo 0}${endif}${if_match ${cpu cpu4} >= 75}${color9}${goto 6}${execbar echo 0}${endif}
              ${color1}${goto 36}cpu 4${goto 156}${cpu cpu5}%
              ${color0}${goto 6}${cpubar cpu5}${if_match ${cpu cpu5} >= 50}${color8}${cpubar cpu5}${endif}${if_match ${cpu cpu5} >= 75}${color9}${goto 6}${execbar echo 0}${endif}
              ${color1}${goto 36}cpu 5${goto 156}${cpu cpu6}%
              ${color0}${goto 6}${cpubar cpu6}${if_match ${cpu cpu1} >= 50}${color8}${cpubar cpu6}${endif}${if_match ${cpu cpu6} >= 75}${color9}${goto 6}${execbar echo 0}${endif}
              ${color1}${goto 36}cpu 6${goto 156}${cpu cpu7}%
              ${color0}${goto 6}${cpubar cpu7}${if_match ${cpu cpu7} >= 50}${color8}${goto 6}${execbar echo 0}${endif}${if_match ${cpu cpu7} >= 75}${color9}${goto 6}${execbar echo 0}${endif}
              ${color1}${goto 36}cpu 7${goto 156}${cpu cpu8}%
              ${color0}${goto 6}${cpubar cpu8}${if_match ${cpu cpu1} >= 50}${color8}${goto 6}${execbar echo 0}${endif}${if_match ${cpu cpu1} >= 75}${color9}${goto 6}${execbar echo 0}${endif}${font}
              
              ${color1}memory:${alignr}$mem / $memmax
              ${color0}${goto 6}${membar 4,180} ${if_existing /proc/swaps partition}
              
              ${color1}swap:${alignr}$swap / $swapmax
              ${color0}${goto 6}${swapbar} ${endif}
              
              ${color1}root:${alignr}${fs_used /} / ${fs_size /}
              ${color0}${goto 6}${fs_bar /}
              
              ${color1}/home:${alignr}${fs_used /home} / ${fs_size /home}
              ${color0}${goto 6}${fs_bar /home}
              ${color0}${voffset 6}${alignc}disk i/o:
              ${color1}${alignc}${diskio}
              
              ${color1}${if_existing /proc/net/route wlan0}
              ${color1}${voffset -34}wlan:${alignr}${wireless_link_qual_perc wlan0}%
              ${color0}${goto 6}${wireless_link_bar 4,180 wlan0}
              ${alignc}${color0}${voffset 8}dn: ${color1}${downspeedf wlan0}${color0} kbps
              ${alignc}up: ${color1}${upspeedf wlan0}${color0} kbps${endif}
              
              ${color1}${voffset -10}battery:${alignr}${battery_percent}%
              ${color0}${goto 6}${battery_bar}${if_match ${battery_percent} <= 99}${color8}${goto 6}${execbar echo 0}${endif}${if_match ${battery_percent} <= 10}${color9}${goto 6}${execbar echo 0}${endif}
              ${alignc}${voffset 8}${battery_time}
              
              ${color1}${alignc}${voffset -12}${nodename}
              ${color0}${alignc}kernel: ${kernel}
              ]]
              we see things not as they are, but as we are.
              -- anais nin

              Comment


                #8
                Originally posted by vinnywright View Post
                ...and it dose start on login ,,,,,,but it still disappears now and then until something is clicked
                Mine doesn't do that and hasn't in quite some time, Vinny - I also was able to get rid of the window rule I had to run awhile back to keep the window visible - conky works just fine as long as own_window_type is set to 'dock'.

                Running Sid, but if yours is still broken there is hope coming down the software channel
                we see things not as they are, but as we are.
                -- anais nin

                Comment


                  #9
                  Originally posted by wizard10000 View Post
                  Mine doesn't do that and hasn't in quite some time, Vinny - I also was able to get rid of the window rule I had to run awhile back to keep the window visible - conky works just fine as long as own_window_type is set to 'dock'.

                  Running Sid, but if yours is still broken there is hope coming down the software channel
                  mine is set to "dock" ,,,,,, but I do see some Syntax difference in our scripts you have "=" and 'ticks', in yours and if I start conky in a term. I get this

                  Code:
                  vinny@vinny-Bonobo-Extreme:~$ conky: [COLOR=#ff0000]Syntax error (/home/vinny/.conkyrc:1: '=' expected near 'no') while reading config file. 
                  conky: Assuming it's in old syntax and attempting conversion.[/COLOR]
                  conky: desktop window (240000f) is subwindow of root window (28c)
                  conky: window type - dock
                  conky: drawing to created window (0x3400002)
                  conky: drawing to double buffer
                  ^C
                  mine (.conkyrc) looks like this (relevant section)

                  Code:
                   background no
                   use_xft yes
                  xftfont Ubuntu Mono:size=9
                  update_interval 3.0
                  total_run_times 0
                  own_window yes
                  own_window_type dock
                  own_window_argb_visual yes
                  own_window_transparent yes
                  own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
                  double_buffer yes
                  minimum_size 220 5
                  maximum_width 220
                  draw_shades no
                  draw_outline no
                  draw_borders no
                  draw_graph_borders yes
                  default_color gray
                  #default_shade_color black
                  alignment top_right
                  gap_x 12
                  gap_y 35
                  cpu_avg_samples 2
                  override_utf8_locale yes
                  uppercase yes # set to yes if you want all text to be in uppercase
                  #display LDVS-0
                  VINNY
                  i7 4core HT 8MB L3 2.9GHz
                  16GB RAM
                  Nvidia GTX 860M 4GB RAM 1152 cuda cores

                  Comment


                    #10
                    Originally posted by vinnywright View Post
                    mine is set to "dock" ,,,,,, but I do see some Syntax difference in our scripts you have "=" and 'ticks', in yours and if I start conky in a term. I get this

                    Code:
                    vinny@vinny-Bonobo-Extreme:~$ conky: [COLOR=#ff0000]Syntax error (/home/vinny/.conkyrc:1: '=' expected near 'no') while reading config file. 
                    conky: Assuming it's in old syntax and attempting conversion.[/COLOR]
                    conky: desktop window (240000f) is subwindow of root window (28c)
                    conky: window type - dock
                    conky: drawing to created window (0x3400002)
                    conky: drawing to double buffer
                    ^C
                    Config format changed with conky v1.10, Vinny

                    Originally posted by vinnywright View Post
                    mine (.conkyrc) looks like this (relevant section)

                    Code:
                     background no
                     use_xft yes
                    xftfont Ubuntu Mono:size=9
                    update_interval 3.0
                    total_run_times 0
                    own_window yes
                    own_window_type dock
                    own_window_argb_visual yes
                    own_window_transparent yes
                    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
                    double_buffer yes
                    minimum_size 220 5
                    maximum_width 220
                    draw_shades no
                    draw_outline no
                    draw_borders no
                    draw_graph_borders yes
                    default_color gray
                    #default_shade_color black
                    alignment top_right
                    gap_x 12
                    gap_y 35
                    cpu_avg_samples 2
                    override_utf8_locale yes
                    uppercase yes # set to yes if you want all text to be in uppercase
                    #display LDVS-0
                    Let me see if I can fix that for you. If that doesn't work here's a quick readme - https://wiki.archlinux.org/index.php...syntax_changed (there's a link to a convert script there too) but here's what I came up with -

                    Code:
                    conky.config = {
                    
                    -- comments now start this way instead of with a #  :)
                    -- all config items require a trailing comma
                    -- all string variables are enclosed in single quotes
                    -- numbers and boolean operators don't get single quotes but yes = true and no = false now
                    -- i'm not sure whether minimum_size = '220 5', is a string or not - if it doesn't work try without single quotes.
                    
                    background = false,
                    use_xft = true,
                    font = 'Ubuntu Mono:size=9',
                    update_interval = 3.0,
                    total_run_times = 0,
                    own_window = true,
                    own_window_type = 'dock',
                    own_window_argb_visual = true,
                    own_window_transparent = true,
                    own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
                    double_buffer = true,
                    minimum_size = '220 5',
                    maximum_width = 220,
                    draw_shades = false,
                    draw_outline = false,
                    draw_borders = false,
                    draw_graph_borders = true,
                    default_color = 'gray',
                    -- default_shade_color = 'black',
                    alignment = 'top_right',
                    gap_x = 12,
                    gap_y = 35,
                    cpu_avg_samples = 2,
                    override_utf8_locale = true,
                    uppercase = true, 
                    -- set to yes if you want all text to be in uppercase
                    -- display LDVS-0
                    }
                    
                    conky.text = [[
                    
                    -- text goes here.  no changes to text format except opening and closing commands.
                    
                    ]]
                    Last edited by wizard10000; Aug 28, 2016, 11:38 AM.
                    we see things not as they are, but as we are.
                    -- anais nin

                    Comment


                      #11
                      Originally posted by wizard10000 View Post
                      Config format changed with conky v1.10, Vinny



                      Let me see if I can fix that for you. If that doesn't work here's a quick readme - https://wiki.archlinux.org/index.php...syntax_changed (there's a link to a convert script there too) but here's what I came up with -

                      Code:
                      conky.config = {
                      
                      -- comments now start this way instead of with a #  :)
                      -- all config items require a trailing comma
                      -- all string variables are enclosed in single quotes
                      -- numbers and boolean operators don't get single quotes but yes = true and no = false now
                      -- i'm not sure whether minimum_size = '220 5', is a string or not - if it doesn't work try without single quotes.
                      
                      background = false,
                      use_xft = true,
                      font = 'Ubuntu Mono:size=9',
                      update_interval = 3.0,
                      total_run_times = 0,
                      own_window = true,
                      own_window_type = 'dock',
                      own_window_argb_visual = true,
                      own_window_transparent = true,
                      own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
                      double_buffer = true,
                      minimum_size = '220 5',
                      maximum_width = 220,
                      draw_shades = false,
                      draw_outline = false,
                      draw_borders = false,
                      draw_graph_borders = true,
                      default_color = 'gray',
                      -- default_shade_color = 'black',
                      alignment = 'top_right',
                      gap_x = 12,
                      gap_y = 35,
                      cpu_avg_samples = 2,
                      override_utf8_locale = true,
                      uppercase = true, 
                      -- set to yes if you want all text to be in uppercase
                      -- display LDVS-0
                      }
                      
                      conky.text = [[
                      
                      -- text goes here.  no changes to text format except opening and closing commands.
                      
                      ]]

                      using your edits now ,,,,,,they work but we will see about the flashing in and out as time goes by .

                      one thing I did note was the ]] at the end of the "TEXT" section,,,,, if to close to the bottom of the text cut off my 2 graphics ,,,,,I had to keep adding blank lines between the bottom of the text and the ]] ,,,until all of the graphics showed

                      thank you for the edits

                      the only quirk I see in a terminal start is ,,,,,,,,,,

                      Code:
                      vinny@vinny-Bonobo-Extreme:~$ conky&
                      [1] 19910
                      vinny@vinny-Bonobo-Extreme:~$ conky: desktop window (240000f) is subwindow of root window (28c)
                      conky: window type - dock
                      conky: drawing to created window (0x4400002)
                      conky: drawing to double buffer
                      [COLOR=#ff0000]conky: Unknown setting 'minimum_size'[/COLOR]
                      VINNY
                      i7 4core HT 8MB L3 2.9GHz
                      16GB RAM
                      Nvidia GTX 860M 4GB RAM 1152 cuda cores

                      Comment


                        #12
                        minimum_size isn't a setting in wizard10000's conky file.
                        Windows no longer obstructs my view.
                        Using Kubuntu Linux since March 23, 2007.
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                        Comment


                          #13
                          Originally posted by Snowhog View Post
                          minimum_size isn't a setting in wizard10000's conky file.
                          apparently ,,,,,,and commenting it out "--" had no ill affect ,,,and on a reload ,,,,,,,,,,,

                          Code:
                          vinny@vinny-Bonobo-Extreme:~$ conky: '/home/vinny/.conkyrc' modified, reloading...
                          conky: desktop window (240000f) is subwindow of root window (28c)
                          conky: window type - dock
                          conky: drawing to created window (0x4400002)
                          conky: drawing to double buffer
                          no more quirks ,,,,,,

                          VINNY
                          i7 4core HT 8MB L3 2.9GHz
                          16GB RAM
                          Nvidia GTX 860M 4GB RAM 1152 cuda cores

                          Comment


                            #14
                            Originally posted by Snowhog View Post
                            minimum_size isn't a setting in wizard10000's conky file.
                            It's possible that setting is looking for two numbers instead of a string; wasn't sure how conky would handle that. I'd try removing the single quotes from minimum_size and if that doesn't work or doesn't make any difference I'd get rid of it
                            we see things not as they are, but as we are.
                            -- anais nin

                            Comment


                              #15
                              Originally posted by wizard10000 View Post
                              It's possible that setting is looking for two numbers instead of a string; wasn't sure how conky would handle that. I'd try removing the single quotes from minimum_size and if that doesn't work or doesn't make any difference I'd get rid of it
                              removing the signal quotes resulted in a crash .......... I commented it out.

                              VINNY
                              i7 4core HT 8MB L3 2.9GHz
                              16GB RAM
                              Nvidia GTX 860M 4GB RAM 1152 cuda cores

                              Comment

                              Working...
                              X