Skip to content

Instantly share code, notes, and snippets.

@dantuck
Created February 2, 2013 19:57
Show Gist options
  • Save dantuck/4699014 to your computer and use it in GitHub Desktop.
Save dantuck/4699014 to your computer and use it in GitHub Desktop.
Place conky.sh in your home folder. The rest of the files are placed in a folder named conkyrc. Special fonts are required: PizzadudeBullets.ttf, Pizzadudestars.ttf, poky.ttf, rsbillsd.ttf.
#!/bin/bash
# Kill Conky If Running
test -z "`pgrep conky`" || killall -9 conky
# The directory of conkyrcs
conky_dir="./conkyrc"
# The command for start conkys
START="conky -d -c"
# The Conkys
sleep 0.5
$START $conky_dir/system
#!/usr/bin/env python
from urllib.request import FancyURLopener
username = 'your_user_name'
password = 'your_password'
url = 'https://%s:%[email protected]/mail/feed/atom' % (username,
password)
opener = FancyURLopener()
page = opener.open(url)
contents = page.read().decode('utf-8')
ifrom = contents.index('<fullcount>') + 11
ito = contents.index('</fullcount>')
unread = contents[ifrom:ito]
print(unread)
#!/bin/bash
# Sprawdza zewnetrzne IP
wget http://checkip.dyndns.org/ -q -O - |
grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>'
#!/usr/bin/conky -d -c
## .conkyrc configuration
alignment top_right
background yes
border_margin 5
border_width 5
color0 555555 #
color1 FCAF3E # zolty
color2 64574e # braz
color3 a82553 # rozowy f71f84
color4 ff6100 # bordowy
color5 c5c5c5 # braz
color6 a7a7a7 # szary
color7 8888CC # (COOL)
color8 9d9c61 # zolto-szary
color9 C18C24 # niebiesko-szary
cpu_avg_samples 2
default_color e1e1e1 # szary a7a7a7
default_outline_color 000000 # Black
default_shade_color 000000 # Black
double_buffer yes
draw_borders no
draw_graph_borders no
draw_outline no
draw_shades no
gap_x 5
gap_y 40
max_specials 2048
max_user_text 100000
maximum_width 180
minimum_size 850 850
net_avg_samples 2
no_buffers yes
override_utf8_locale yes
own_window yes
own_window_colour 000000 # Black
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_transparent yes
own_window_type normal ## normal
pad_percents 2 # to co nizej, miejsc po przecinku
short_units yes # krotka wersja podawania wielkosci dyskow np. 612.21M/3.80G
stippled_borders 3
text_buffer_size 10000
total_run_times 0
update_interval 1.0
uppercase no
use_spacer right
use_xft yes
xftalpha 0.75
xftfont sans:size=7
TEXT
#${color2}${goto 10}${font DejaVu Sans Mono:size=44}${time %H}${font DejaVu Sans Mono:size=20}${voffset -25}'${time %M}${font DejaVu Sans Mono:size=8}${voffset -12}#${time %S}
#${color2}${goto 85}${voffset 10}${font :size=8}${time %A}
#${color2}${goto 85}${voffset 1}${font :size=8}${time %d %B %Y}
#${color}${font RsbillsDng:size=14}O${font}${font DejaVu Sans Mono:size=8}${execpi 3600 DJS=`date +%_d`; cal -m | sed '1d' | sed '/./!d' | sed 's/$/ /' | fold -w 21 | sed -n '/^.\{21\}/p' | sed 's/^/${alignc} /' | sed /" $DJS "/s/" $DJS "/" "'${color2}'"$DJS"'${color}'" "/}${font}
${voffset -20}${color1}${font led:size=12}SYSTEM ${font}$hr
${color}${sysname} Kernel: ${alignr}$kernel
#${color}Conky:${alignr}${conky_version}
${color}Battery: ${alignr}${battery_percent BAT1}% / ${acpitemp}°C
#${color}Battery time left: ${alignr}$battery_time
${color}Gmail: ${alignr}${execpi 300 ~/conkyrc/gmail.py}
${voffset -10}${color1}${font led:size=12}CPU ${font}$hr
${color5}${font Poky:size=20}P${voffset -3}${font Impact:size=16}$color1${goto 60}${cpu cpu0}${color5}%${alignr} ${execi 30 sensors | grep "Physical id 0" | cut --bytes=18-25}
${alignr 5}$color1${cpugraph 25,180}
#${voffset -10}${font :size=8}${color}Core 1: $alignr ${freq_g (1)} GHz
#${exec sensors | grep "Core 0" | cut --bytes=14-21}c ${goto 80}${cpu cpu1}% ${alignr}${cpubar cpu1 8,80}
#${color}Core 2: $alignr ${freq_g (2)} GHz
#${exec sensors | grep "Core 1" | cut --bytes=14-21}c ${goto 80}${cpu cpu2}% ${alignr}${cpubar cpu2 8,80}
${voffset -20}${font :size=8}${color}Core 1: ${goto 80}${cpu cpu1}% ${alignr}${cpubar cpu1 8,80}
${color}Core 2: ${goto 80}${cpu cpu2}% ${alignr}${cpubar cpu2 8,80}
${color}Core 3: ${goto 80}${cpu cpu3}% ${alignr}${cpubar cpu3 8,80}
${color}Core 4: ${goto 80}${cpu cpu4}% ${alignr}${cpubar cpu4 8,80}
${color}Motherboard: ${alignr} ${execi 30 sensors | grep "temp1" | cut --bytes=16-24}
${color}Core 1: ${alignr}${execi 30 sensors | grep "Core 0" | cut --bytes=18-25}
${color}Core 2: ${alignr}${execi 30 sensors | grep "Core 1" | cut --bytes=18-25}
${voffset -7}${color}${font}NAME ${goto 90}PID${goto 120}CPU% ${alignr}MEM%
${color}${font :size=6}${goto 9}${top name 1}${goto 85}${top pid 1}${goto 120}${top cpu 1}${goto 156}${top mem 1}
${color}${font :size=6}${goto 9}${top name 2}${goto 85}${top pid 2}${goto 120}${top cpu 2}${goto 156}${top mem 2}
${color}${font :size=6}${goto 9}${top name 3}${goto 85}${top pid 3}${goto 120}${top cpu 3}${goto 156}${top mem 3}
${color}${font :size=6}${goto 9}${top name 4}${goto 85}${top pid 4}${goto 120}${top cpu 4}${goto 156}${top mem 4}
${voffset -6}${color1}${font led:size=12}RAM / HDD / USB ${font}$hr
${voffset -3}${color5}${font Poky:size=20}M${goto 55}${font Impact:size=16}${voffset -3}$color1${memperc}$color5${goto 95}%${font}${goto 120}${voffset -8}$color1${mem} / ${memmax}$color${voffset 9}${goto 120}${color5}${membar 3,65}${voffset -8}
#${voffset 12}${goto 10}${font StyleBats:size=14}i${font}${voffset -3} SWAP » $color1${swapperc}%$color ${alignr}$color1${swap} / ${swapmax}$color
${voffset 5}${color5}${font Poky:size=20}y${voffset -10}${goto 40}${font}Root${goto 120}${voffset -10}${font Poky:size=20}y${voffset -10}${font}${alignr 5}Home
${offset 2}${voffset 2}${color5}${fs_bar 3,23 /}${goto 40}${voffset -2}${font Dejavu Sans:size=9:condensed:bold}$color1${fs_used_perc /} %$color1${goto 120}${offset 2}${voffset 2}${color5}${fs_bar 3,23 /home}${alignr}${voffset -2}$color1${fs_used_perc /home} %$color
${offset 2}${voffset 1}${font Dejavu Sans:size=7}I/O » $color1${diskio}$color4${alignr 5}${diskiograph 8,80}
${color}Home » ${alignr}${color1}${fs_used /home}${color} used of ${color1}${fs_size /home} ${color}total
${voffset -10}${color1}${font led:size=12}NETWORK ${font}$hr
${color}gateway IP: ${alignr}${gw_ip}
${color}wireless IP: $alignr${addr wlan0}
${color}ethernet IP: $alignr${addr eth0}
${color}public IP: $alignr${execi 60 ~/conkyrc/ip.sh}
${color}${font}WiFi SSID:$alignr${wireless_essid wlan0}
${voffset 5}${color}${goto 10}${font pizzadude bullets:size=16}S${font}${color}${voffset -12}${goto 40}Down: ${downspeed wlan0}kb/s ${color}
${goto 40}Day: ${totaldown wlan0}${voffset -12}${color1}${alignr}${downspeedgraph wlan0 25,55 -t -l}
${color}${voffset -13}${goto 40}Month: ${execi 300 vnstat -m | grep "`date +"'%y"`" | tail -1 | awk '{print $3 $4}'}
${color}${goto 10}${font pizzadude bullets:size=16}M${font}$color${voffset -12}${goto 40}Up: ${upspeed wlan0}kb/s${color}
${goto 40}Day: ${totalup wlan0}${voffset -12}${color1}${alignr}${upspeedgraph wlan0 25,55 -t -l}
${color}${voffset -13}${goto 40}Month: ${execi 300 vnstat -m | grep "`date +"'%y"`" | tail -1 | awk '{print $6 $7}'}
#${color1}${if_mpd_playing}${font led:size=12}MPD ${font}${mpd_status}
#$hr
#${color}${alignc}${mpd_artist} - "${mpd_title}"
#${color}${alignc}${mpd_album}
#${color}${alignc}${mpd_bar 3,150}
#${color}${alignc}${mpd_elapsed}/${mpd_length}${endif}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment