Conky에 대한 몇가지 질문

(흑흑 글쓰다가 날렸어요 ㅠ.ㅠ)

힘내서 다시 써 보자면…

그동안 삽질이 심할 것 같아서 conky에 눈길을 주지 않고 있다가 이번에 설치를 하고 패키지에 따라오는 설정 파일을 이리저리 건드려보는 중입니다. 그런데 몇가지 해결 못하는 것들이 있네요. 찾아봐도 답이 잘 안나오는군요.

  1. own_window_type 문제
    문서를 읽어보면 type이 가능한 게 normal, desktop, dock, override 인데요. 바탕화면에 완전히 붙박이처럼 붙는 게 좋아서 처음엔 override를 썼습니다. 그런데 이게 그냥 실행(터미널에서건 alt+f2 실행창에서건)하면 원하는데로 되는데, 세션에 시작프로그램으로 등록을 하면 conky 영역의 배경화면이 까맣게 되더군요. normal로 하면 바탕화면보기 단축키를 누르면 conky까지 최소화되버려서 거슬리고 conky 영역의 경계가 표시됩니다. (설명을 잘 못하겠는데 스크린샷 참조~ ^^). desktop으로 하면 바탕화면에서 conky 영역이 아닌 부분을 클릭하면 conky 화면이 사라집니다. (종료되는 건 아니군요. 이상합니다.) dock도 뭔가 원하는대로 안됐던 것 같은데 잘 기억이 안 나는군요. :)

own_window_hints 같은 것으로 해결이 되는가 봤는데, 잘은 모르겠지만 안되는 것 같습니다.

  1. 변수 출력시 text formatting?
    그러니까 $cpu 같은 것을 보면 10% 미만이면 두글자이고 그 이상이면 세글자인데 이걸 세글자로 고정되게 할 수 있을까요? printf나 sprintf에서 %02d 같은 식으로 말이지요.

  2. diskiograph를 부드럽게 하기
    cpugraph나 downspeedgraph, upspeedgraph 같은 것은 cpu_avg_samples나 net_avg_samples 같은 것을 통해서 그래프를 부드럽게 하는 것이 가능한 것 같은데요. diskiograph는 그런 것이 없는 것 같습니다.

지금 쓰고 있는 것의 스크린샷
[attachment=0:2xyby4l8].png[/attachment:2xyby4l8]

지금 쓰고 있는 .conkyrc

[code:2xyby4l8]

Conky sample configuration

the list of variables has been removed from this file in favour

of keeping the documentation more maintainable.

Check http://conky.sf.net for an up-to-date-list.

set to yes if you want Conky to be forked in the background

background yes

X font when Xft is disabled, you can pick one with program xfontsel

#font 5x7
#font 6x10
#font 7x13
#font 8x13
#font 9x15
#font mintsmild.se
#font -------34-------*

Use Xft?

use_xft yes

Xft font when Xft is enabled

xftfont Bitstream Vera Sans mono:size=9

Text alpha when using Xft

xftalpha 0.8

Print everything to stdout?

out_to_console no

MPD host/port

mpd_host localhost

mpd_port 6600

mpd_password tinker_bell

Print everything to console?

out_to_console no

mail spool

#mail_spool $MAIL

Update interval in seconds

update_interval 3.0

This is the number of times Conky will update before quitting.

Set to zero to run forever.

total_run_times 0

Create own window instead of using desktop (required in nautilus)

own_window yes

If own_window is yes, you may use type normal, desktop or override

own_window_type normal

Use pseudo transparency with own_window?

own_window_transparent yes

If own_window_transparent is set to no, you can set the background colour here

own_window_colour hotpink

If own_window is yes, these window manager hints may be used

own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

Use double buffering (reduces flicker, may not work for everyone)

double_buffer yes

Minimum size of text area

minimum_size 310 5
maximum_width 310

Draw shades?

draw_shades yes

Draw outlines?

draw_outline no

Draw borders around text

draw_borders no

Draw borders around graphs

draw_graph_borders no

Stippled borders?

stippled_borders 1

border margins

border_margin 4

border width

border_width 1

Default colors and also border colors

default_color gray
default_shade_color black
default_outline_color black

Text alignment, other possible values are commented

#alignment top_left
#alignment top_right
#alignment bottom_left
alignment bottom_right
#alignment none

Gap between borders of screen and text

same thing as passing -x at command line

#gap_x 12
#gap_y 32

Subtract file system buffers from used memory?

no_buffers yes

set to yes if you want all text to be in uppercase

uppercase no

number of cpu samples to average

set to 1 to disable averaging

cpu_avg_samples 2

number of net samples to average

set to 1 to disable averaging

net_avg_samples 2

Force UTF8? note that UTF8 support required XFT

override_utf8_locale yes

Add spaces to keep things from moving about? This only affects certain objects.

use_spacer none

Shows the maximum value in scaled graphs.

show_graph_scale no

Shows the time range covered by a graph.

show_graph_range no

Allow each port monitor to track at most this many connections (if 0 or not set, default is 256)

#max_port_monitor_connections 256

Maximum number of special things, e.g. fonts, offsets, aligns, etc.

#max_specials 512

Maximum size of buffer for user text, i.e. below TEXT line.

#max_user_text 16384
text_buffer_size 2048

Timing interval for music player thread, e.g. mpd, audacious

#music_player_interval (update_interval is default)

Strictness of if_up. One of: up, link or address. The later ones imply the further ones.

Defaults to up.

#if_up_strictness address

variable is given either in format $variable or in ${variable}. Latter

allows characters right after the variable and must be used in network

stuff because of an argument

stuff after ‘TEXT’ will be formatted on screen

TEXT
${color white}${font Lexi:style=bold:pixelsize=20}${alignc}${time %b %e일 (%a) %H:%M}$font
$color${hr 2}
$font$nodename - $sysname $kernel on $machine
Uptime: $uptime Load: $loadavg
${color #ddaa00}CPU1: ${cpu cpu1}% $color${cpubar cpu1}
${color #ddaa00}CPU2: ${cpu cpu2}% $color${cpubar cpu2}
${color #ddaa00}RAM: $memperc% $color${membar}
${cpugraph}
${color #ddaa00}Processes: $processes Running: $running_processes$color
Name PID CPU% MEM%
${color white}${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}$color
${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${color #ddaa00}eth0: ${addr eth0}$color
Down: ${downspeed eth0}kB/s ${offset 80}Up: ${upspeed eth0}kB/s
${downspeedgraph log eth0 20,150} ${upspeedgraph log eth0 20,150}
${color #ddaa00}wlan0: ${addr wlan0}$color
ESSID:${wireless_essid wlan0} ${wireless_bitrate wlan0} qual:${wireless_link_qual_perc wlan0}% ${wireless_link_bar wlan0}
Down: ${downspeed wlan0}kB/s ${offset 80}Up: ${upspeed wlan0}kB/s
$color${downspeedgraph log wlan0 20,150} ${upspeedgraph log wlan0 20,150}
${color #ddaa00}Disk:$color
Read: ${diskio_read}/s ${goto 170}Write: ${diskio_write}/s
${diskiograph_read log 20,150} ${diskiograph_write log 20,150}
root ${fs_size /} ${fs_bar /}
/home ${fs_size /home} ${fs_bar /home}
${color #ddaa00}Weather - Pohang:$color
${execpi 1800 conkyForecast --location=KSXX0045 --template=/home/lbird/.conkyForecast.template}
[/code:2xyby4l8]

[quote="Lbird":1kmdayub]그런데 이게 그냥 실행(터미널에서건 alt+f2 실행창에서건)하면 원하는데로 되는데, 세션에 시작프로그램으로 등록을 하면 conky 영역의 배경화면이 까맣게 되더군요.[/quote:1kmdayub]

http://www.ubuntu.or.kr/viewtopic.php?f=15&t=4894

여기 링크보면 oppor님이 쓰신글이있네요 세션 명령에서…10초 후에 시작하게…

[code:1kmdayub]sh -c "sleep 10; exec conky"[/code:1kmdayub]

[quote="cky":b8oer696][quote="Lbird":b8oer696]그런데 이게 그냥 실행(터미널에서건 alt+f2 실행창에서건)하면 원하는데로 되는데, 세션에 시작프로그램으로 등록을 하면 conky 영역의 배경화면이 까맣게 되더군요.[/quote:b8oer696]

http://www.ubuntu.or.kr/viewtopic.php?f=15&t=4894

여기 링크보면 oppor님이 쓰신글이있네요 세션 명령에서…10초 후에 시작하게…

[code:b8oer696]sh -c "sleep 10; exec conky"[/code:b8oer696][/quote:b8oer696]
아… 그렇군요. 왜 못 찾았을까요. ㅋㅋ
암튼, 무선랜 잡히는 시간까지 고려해서 15초 후에 -.-;; 시작하도록 해 놨습니다. 좀 늦게 뜨긴 하지만 어차피 게으르기 땜시.

그나저나, 2번과 3번은 conky 자체가 업그레이드 되기 전에는 답이 없을 것 같긴 하네요.

2번은 소스에 좀 깊게 관여해야 할 것 같고, 간단히 수정할 수 있는 3번은 소스를 고쳤습니다. 패치는 1.7.0_rc2에 만들어서 보냈는데 지금 우분투에는 1.6.1이군요. 패치 받아들여지든 안 받아들여지든 저 기능이 되는 건 한참을 기다려야 할 것 같고, 만든게 좀 아깝기도 해서 여기 올려 봅니다. 안정성에 대해서는 아무것도 보장 못합니다. :stuck_out_tongue:

근데 버젼 매기기가 참 고민스럽더군요. ascii 코드 상 +가 -보다 먼저니까 저렇게 매기면 될 것 같긴 한데 말이죠. 데비안 사이트에 패키기 관리자 안내 페이지가 있긴 한데 관리자가 아닌 사람이 단타로 만들어 쓰는 패키지에 대한 안내 같은 건 없나 모르겠습니다.
[attachment=0:x1ghps3i]conky_1.7.0+rc2-0ubuntu1_i386.deb[/attachment:x1ghps3i]

${GOTO} 써보세요.

참조) http://conky.linux-hardcore.com/?page_id=144

[quote="shk23":3ff973le]${GOTO} 써보세요.

참조) http://conky.linux-hardcore.com/?page_id=144[/quote:3ff973le]
conky hardcore라니 :) 링크 감사합니다. 좀 한가해지면 삽질을 해봐야겠군요.