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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 | own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager,sticky
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
text_buffer_size 1500
# fiddle with window
use_spacer yes
use_xft yes
# Update interval in seconds
update_interval 2.0
# Minimum size of text area
minimum_size 230 1500
maximum_width 250
override_utf8_locale yes
# Draw shades?
draw_shades yes
default_shade_color black
# Text stuff
draw_outline yes # amplifies text if yes
draw_borders no
#font freesans -12
xftfont Source Sans Pro Regular:size=10
xftalpha 0.8
uppercase no # set to yes if you want all text to be in uppercase
# Stippled borders?
stippled_borders 3
# border margins
border_margin 9
# border width
border_width 10
# Default colors and also border colors, grey90 == #e5e5e5
default_color d7d7d7 #cbcbcb
own_window_colour brown
own_window_transparent yes
# Text alignment, other possible values are commented
#alignment top_left
alignment top_left
#alignment bottom_left
#alignment bottom_right
# Gap between borders of screen and text
gap_x 2290
#gap_y 30
gap_y 25
default_bar_size 120 8
# stuff after 'TEXT' will be formatted on screen
#blue #3465A4
#slightly lighter blue #729FCF
TEXT
${offset 20}${font OpenLogos:size=256}J${font}
${voffset -50}
${cpubar cpu9 0,77} SYSTEM INFO ${cpubar cpu9 0,77}
${color 729FCF}${font Source Sans Pro Regular:bold:size=10}Kernel:$font$color$alignr ${font Source Sans Pro Regular:size=10}${kernel}$font
${color 729FCF}${font Source Sans Pro Regular:bold:size=10}Host:$font$color$alignr$nodename
${color 729FCF}${font Source Sans Pro Regular:bold:size=10}Uptime:$font$color$alignr$uptime
${color 729FCF}${font Source Sans Pro Regular:bold:size=10}RAM:$font$color$alignr$mem/$memmax
$alignr${membar 8,100}
${color 729FCF}${font Source Sans Pro Regular:bold:size=10}Swap usage:$font$color$alignr$swap/$swapmax
${color 729FCF}${font Source Sans Pro Regular:bold:size=10}Disk usage:$font$color$alignr${fs_used /}/${fs_size /}
${voffset 4}${color 729FCF}${font Source Sans Pro Regular:bold:size=10}CPU:$font$color${goto 56}${cpugraph 0 13,31 000000 000000}${offset -28}${color indigo}${cpu cpu0}%$color ${goto 90}${cpugraph 1 13,31 000000 000000}${offset -28}${color indigo}${cpu cpu1}%$color ${goto 126}${cpugraph 2 13,31 000000 000000}${offset -28}${color indigo}${cpu cpu2}%$color ${goto 160}${cpugraph 3 13,31 000000 000000}${offset -28}${color indigo}${cpu cpu3}%$color ${goto 194}${cpugraph 4 13,31 000000 000000}${offset -28}${color indigo}${cpu cpu4}%$color ${goto 228}${cpugraph 5 13,31 000000 000000}${offset -28}${color indigo}${cpu cpu5}%$color
${voffset 4}${color 729FCF}${font Source Sans Pro Regular:bold:size=10}Net:$font$color${goto 55}Addr ${goto 150}Down ${goto 205}Up
${if_existing /proc/net/route eth0}eth0 ${goto 55}${addr eth0} ${goto 150}${downspeed eth0} ${goto 205}${upspeed eth0}${else}${voffset -15}${endif}
${if_existing /proc/net/route wlan0}wlan0 ${goto 55}${addr wlan0} ${goto 150}${downspeed wlan0} ${goto 205}${upspeed wlan0}${else}${voffset -15}${endif}
${cpubar cpu9 0,89} WEATHER ${cpubar cpu9 0,89}
${execpi 900 $HOME/weather.py}
${cpubar cpu9 0,66} FOLDING@HOME ${cpubar cpu9 0,65}
${voffset 3}${color 729FCF}${font Source Sans Pro Regular:bold:size=10}Work Unit:$font$color ${execi 15 cat $HOME/.FAHClient/log.txt | tr '(' '\n' |tr ')' '\n' | grep -E "(%|percent)"|tail -n 1 | tr -d 'percent' | tr -d '%'} % ${alignr}${execibar 15 cat $HOME/.FAHClient/log.txt | tr '(' '\n' |tr ')' '\n' | grep -E "(%|percent)"|tail -n 1 | tr -d 'percent' | tr -d '%'}
${cpubar cpu9 0,102} MUSIC ${cpubar cpu9 0,102}
$mpd_smart
${voffset 3}$alignc${mpd_bar 8,225}
${voffset 3}$mpd_status: $mpd_elapsed/$mpd_length - ${mpd_bitrate}kbps
${cpubar cpu9 0,64} SHORTCUT KEYS ${cpubar cpu9 0,64}
${if_running awesome}awesome - wm
Mod+Ctrl+R${goto 140} Restart awesome
${voffset 5}awesome - clients
Mod+M ${goto 140} Maximize
Mod+F ${goto 140} Set fullscreen
Mod+Shift+C ${goto 140} Kill
Mod+Ctrl+1-9 ${goto 140} Toggle tag view
Mod+T ${goto 140} Mark a client
Mod+Shift+1-9 ${goto 140} Tag marked clients with tag
Mod+Shift+Ctrl+1-9 ${goto 140} Toggle tag on client
${voffset 5}awesome - nav
Mod+J ${goto 140} Focus next client
Mod+K ${goto 140} Focus previous client
Mod+1-9 ${goto 140} Switch to tag 1-9
Mod+Ctrl+J/K ${goto 140} Next/prev screen
${voffset 5}awesome - layout modification
Mod+Shift+J/K ${goto 140} Rotate clients around
Mod+h/l ${goto 140} Size master 5%
Mod+Shift+H/L ${goto 140} Masters amount
Mod+Ctrl+H/L${goto 140} Non-master cols
Mod+Ctrl+Space ${goto 140} Float master
Mod+Ctrl+Enter ${goto 140} Swap w/ master
${else}Alt+F3 ${goto 140} Alt Menu
Super+Space ${goto 140} Main Menu
Super+Tab ${goto 140} Client Menu
Super+R ${goto 140} Run Dialog
Super+T ${goto 140} Terminal
Super+F ${goto 140} File Manager
Super+E ${goto 140} Editor
Super+M ${goto 140} Media Player
Super+W ${goto 140} Web Browser
Super+L ${goto 140} Lock Screen
Super+V ${goto 140} Volume Control
Super+X ${goto 140} Logout
Super+Alt+R ${goto 140} Toggle Redshift
Super+Alt+D ${goto 140} Toggle Decoration
PrtSc ${goto 140} Screenshot$endif
|
x
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 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# WEATHER SCRIPT (via Yahoo API) by Stolid
# License: CC-BY-SA https://creativecommons.org/licenses/by-sa/3.0/
import os, urllib
from xml.dom import minidom
location = '12789137' #WOEID
url = 'http://weather.yahooapis.com/forecastrss?w='+location+'&u=f'
xml = minidom.parse(urllib.urlopen(url))
#forecast = day : (dayname, high, low, description)
current = {'temp':-999, 'desc':'Default description'}
forecast = {} # day : (dayname, high, low, description)
a = xml.getElementsByTagName('channel')[0]
b = a.getElementsByTagName('item')[0]
c = b.getElementsByTagName('yweather:condition')[0]
current['desc'] = c.attributes['text'].value
current['temp'] = c.attributes['temp'].value
d = b.getElementsByTagName('yweather:forecast')
forecast['today'] = d[0].attributes['day'].value, d[0].attributes['high'].value, d[0].attributes['low'].value, d[0].attributes['text'].value
forecast['tomorrow'] = d[1].attributes['day'].value, d[1].attributes['high'].value, d[1].attributes['low'].value, d[1].attributes['text'].value
#Conky formatting (format1 is in front of the line, format2 is after the colon)
format1 = '${color 729FCF}${font Source Sans Pro Regular:bold:size=10}'
format2 = '$font$color ${goto 55}'
conky = '{0}Now:{1} {2}°, {3}\n'.format(format1, format2, current['temp'], current['desc'])
conky += '{0}{1}:{2} {3}° Hi, {4}° Low, {5}\n'.format(format1,forecast['today'][0],format2, forecast['today'][1], forecast['today'][2], forecast['today'][3])
conky += '{0}{1}:{2} {3}° Hi, {4}° Low, {5}\n'.format(format1,forecast['tomorrow'][0],format2, forecast['tomorrow'][1], forecast['tomorrow'][2], forecast['tomorrow'][3])
print conky
|
x
Notes
Fonts: openlogos and Source Sans Pro
Weather is provided via a custom python script (using the Yahoo API), so look up the Yahoo WOEID for your location and edit it in the weather.py accordingly. Put weather.py in your home folder.
The Folding@Home section reads the work unit log to get the completion percentage (wasn’t installed in the screenshot). Delete it if you don’t run Folding@Home (or you could start running F@H and humanity/Stanford will thank you. :)
Music status is for MPD.
My shortcut keys section isn’t universal (some modified CrunchBang Openbox/awesome bindings).
I have a large monitor, you’ll likely want to reduce the gap_x in .conkyrc.