Announcement

Collapse
No announcement yet.

Transparent Conky in KDE

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

    Transparent Conky in KDE

    Several people who have seen screenshots of my desktop have asked me how I got a transparent Conky, was I using feh, what were my settings, etc. So I thought I'd post how I do it here, in hopes it will help others.

    This is the main part of my ~/.conkyrc file that makes it all happen:

    Code:
    background no
    own_window yes
    own_window_type normal
    own_window_argb_visual true
    own_window_transparent yes
    own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
    double_buffer yes
    Most people seem to miss the "own_window_argb_visual true" line, and for kwin to natively create the transparency it needs to know the alpha channels. This line sets that. No need for feh or a second background image, kwin will now handle the transparency.

    Other people have asked me how I get the degree symbol in my system temperatures. If you include the degree symbol in your conkyrc file and it doesn't display, or doesn't show-up properly, add this line:

    Code:
    override_utf8_locale yes
    These settings have worked in KDE 4.6 (when I first started using Conky) and newer versions, presently working in 4.10. I don't know if it will work in any older version. This is the result on my desktop:

    Click image for larger version

Name:	Conky.jpg
Views:	1
Size:	9.0 KB
ID:	647925
    Last edited by Dutchman; Feb 10, 2013, 07:35 AM.
    Computers don't make mistakes. They only execute them.

    #2
    I don't get the degree symbol, and my settings include override_utf8_locale yes

    What are your entries in .conkyrc for Temperatures?
    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


      #3
      Thank you greatly Dutchman!

      I have been out of the loop on using Conky since I went completely to Kubu, so the following is a new development for me, and probably for a lot of other folks:

      Most people seem to miss the "own_window_argb_visual true" line, and for kwin to natively create the transparency it needs to know the alpha channels. This line sets that. No need for feh or a second background image, kwin will now handle the transparency.
      feh was a "big deal" a few years ago..so...again thanks! lol.

      woodsmoke

      Comment


        #4
        Sorry Snowhog, I should have mentioned you need to have the degree symbol in the ~/.conkyrc file first. I write software documentation, you'd think I'd know better, but I still fall into the occasional assumption that people will know. Good thing there's proofreaders! This is my temp settings:

        Code:
        Temperatures: ${alignr}GPU ${nvidia temp}°C
        ${alignr}Core0 ${execi 5 sensors | grep "Core 0" | awk '{print $3}' | cut -c2-3}°C
        ${alignr}Core1 ${execi 5 sensors | grep "Core 1" | awk '{print $3}' | cut -c2-3}°C
        Probably would've helped if I mentioned that. I've edited the original.

        Yeah woodsmoke, when I started using Conky I was using the feh hack, but it bothered me that you had to do that when kwin does compositing and transparency, figured there had to be a way around it. The "own_window_argb_visual" command is in the Conky documentation, but it doesn't really explain what it's for. I knew the "a" was "alpha", but it still took reading some of the kwin documentation before it sunk in. But now I can change my background whenever I want without having to make a copy for feh to use.

        I should also note that the "own_window yes" and "own_window_type normal" commands are required with kwin. If either one is missing and you happen to click on the desktop anywhere, conky will disappear. It's still running, but kwin (I believe) has set it below the wallpaper! Seems kwin has to know it's supposed to be on top.
        Last edited by Dutchman; Feb 10, 2013, 08:12 AM.
        Computers don't make mistakes. They only execute them.

        Comment


          #5
          hehe. Thank you.

          Actually, there is 'more' required setting changes in .conkyrc to get the ° to show. Specifically, you have to set:

          # Use Xft?
          use_xft yes

          # Xft font when Xft is enabled
          xftfont Bitstream Vera Sans Mono:size=8

          The first has to be set as 'yes' and the second has to be un-commented.

          I'd like to find a different Xft font, as Bitstream Vera Sans Mono squeezes the characters to close together for my taste.

          But I do now have the degree symbol showing. Cool. :cool:
          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
            Actually I think it depends on the font you're using. Mine is just "font Sans: size=8", I don't have either of the lines you have. Have you tried it with the default Sans font, or maybe something like DejaVu?
            Computers don't make mistakes. They only execute them.

            Comment


              #7
              Thanks! I've changed mine to:

              xftfont Ubuntu Mono:size=9

              Now my conky looks crisp and clean. The characters aren't bunched together.
              Last edited by Snowhog; Feb 10, 2013, 06:42 PM.
              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

              Working...
              X