Linux Debian Sid (Minted) x86_64/3.12.10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Lenovo T61, Intel X3100, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | My Conky Pitstop corner | One4All project
Hey guys, question here. I'm using ${top} and ${top_mem} to display the apps using the most of RAM and CPU in a very simple one-line conky. My problem is that those variables print a lot of spaces on the right. See a shot:
How to remove them?
This is the TEXT of my conkyrc:
Code:TEXT $color0${pre_exec lsb_release -is} $color1${pre_exec lsb_release -rs} ${pre_exec uname -m}$color0 | RAM $color1$mem/$memmax$color0 (top: $color1${top_mem name 1}$color0) | CPU $color1$cpu%$color0 (top: $color1${top name 1}$color0) | Root $color1${fs_free /}/${fs_size /}$color0 | Home $color1${fs_free /home}/${fs_size /home}$color0 | Download $color1${downspeed wlan0}$color0 | Upload $color1${upspeed wlan0}$color0
You can't really "remove" the spaces as such...$top interprets the process name as a fixed number of characters, defined by the config setting top_name_width (default = 15 characters). You can shorten the length for all $top entries by specifying it in your config settings, e.g.
Otherwise, maybe you can do a bash script with sed to delete out the spaces, but I'm hardly a bash expertCode:top_name_width 8
- Samsung R519 Silver - Dual-Boot Windows 7/Ubuntu 9.10 -
- The Official Conky Blog - Follow conkynews on Twitter -
- My Launchpad PPA -
- My blog: My Little Desktop -
conky needs a $trim feature to get rid of those spaces.
Desktop: Quantal on Core2 Duo E8500/Asus P5Q
Laptop: Precise on S76 Pangolin
did it with that, thanks... I kinda wanted to avoid the cube.. keeping CCSM seetings to best performance, and if you have 4 virtual desktops, then you can't change to another, unless you enable cube, and rotate cube.. but I will survive with those setting if that is the only way...
It is shown on all 4 virtual desktops now, thanks
Problem with using a bash script to remove the spaces would be a conky that changes it's size as "firefox" becomes something like "xterm" - 2 characters shorter, causing conky to redraw and some mistakenly refer to their conky as "blinking".
Your first option was the best.
C H I M O!
Bruce
Bookmarks