guest@dotshare [~/groups/info/conky] $ ls Pink-Elephant/ | cat

Pink Elephant (scrot) (+3 likes)

crshd Jun 28, 2011 (info/conky)

.conkyrc(raw, dl)

SCROT

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# -- Conky settings -- #
background no
update_interval 1

cpu_avg_samples 2
net_avg_samples 2

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 2048
imlib_cache_size 0

# -- Window specifications -- #

own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below

border_inner_margin 10
border_outer_margin 0

minimum_size 1200 20
maximum_width 1200
alignment bottom_right
gap_x -7
gap_y -8

# -- Graphics settings -- #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders yes

# -- Text settings -- #
use_xft yes
xftfont Helvetica:style=Bold:size=15

uppercase yes

default_color 555555
color1 777777
color2 a761c2

TEXT
${color2}${exec windowname.sh 40}${alignr}${offset -40}${color}${if_mpd_playing}${mpd_artist} ${color1}${mpd_title}${endif} ${color2}${font Helvetica:style=Bold:size=26}${voffset -14}${time %H:%M}

CLICK TO VIEW

x

windowname.sh(raw, dl)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#!/bin/bash

wname=$(xdotool getactivewindow getwindowname)

charcount=$(echo $wname | wc -m)

if [[ $charcount -gt $1 ]]; then
  wcut1=$(echo $wname | cut -b -$1)
  wcount=$(echo $wcut1 | wc -w)
  wcut2=$(echo $wcut1 | cut -f -$((wcount-1)) -d " ")
  echo $wcut2...
else
  echo $wname
fi
 

x

Notes

The windowname.sh needs xdotool to grab the window name.