You are not logged in.
Could someone point me to a conky tutorial that actually teaches me how to do things? I have found many conky "tutorials", but sof far, they all just say, "Here. Paste this into your .conkyrc. See!" Maybe that is the best way to do it, but it is not how I learn. I need explanation.
I have tried "man conky", too, but I quickly become lost.
Thanks,
Tim
This page has helped me plenty with conky.
Offline
Thank you very much, Sector11 and milso. I will check out those resources as soon as I get a chance.
Happy New Year, everyone!
Tim
Offline
@Sector11: Thanks for the how-to, I'll have to get my head into that next time I start editing a display. Which probably won't be far off the way mrpeachy is pumping out code!!!
I have to go & give his newest iteration a go now. (there goes another day... lol)
[edit:] Not really, it was quick to get going with next to no problems at all.
[edit2:] Actually, it wasn't that simple...
Last edited by handy (2012-01-01 06:17:55)
I used to be surprised that I was still surprised by my own stupidity, finding it strangely refreshing.
Well, now I don't find it refreshing.
I'm over it!
Offline
...TeoBigusGeekus has created bash scripts using Accuweather/WUnderground/NWS/Weather·com. I believe that TBG is an ARCH user as well...
Yes, I am...
...although here I use a slightly different name.
Happy New Year everybody!
Last edited by TeoBigusDickus (2012-01-02 19:52:36)
Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux!
Offline
@ TBD
I'm not touching that name with a 10 foot pole!
Happy New Year Teo!
And to all other ARCH users as well.
Can you share the wall?
Last edited by Sector11 (2012-01-02 21:43:11)
Offline
Of course my friend:
http://i.imgur.com/cvsY7.png
Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux!
Offline
Of course my friend:
http://i.imgur.com/cvsY7.png
Thank you!!!!!!!!!!!!!
Let me guess - Civil Engineer!
Last edited by Sector11 (2012-01-02 22:49:20)
Offline
Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux!
Yeah, how did you find out?
Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux!
Offline
Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux! Please make Autocad Civil 3d and Archicad work on Linux!
Yeah, how did you find out?
Lets just say "it's an educated guess". Not like you are advertising the fact at all, in any way.
The last few months have been a lazy/crazy time, lot's of LIFE things getting in the way, I just decided to have some fun so I took this "wild guess"!
Offline
Hi archers,
hope I can post a WIP and ask a few questions too.
Here's my desktop, w/Conky on the right using londonali's lua ring widget. The bottom one displays upgradable packages by reading a cronjobbed bash script I wrote. Questions are: should I (as a noob) add a visudoed "sudo pacman -Syy" in there to make it work? And how can I get threshold indicator colors working within this Lua so that I can, say change to green when the system is updated. I've looked at the example on [link]conky.wikia.com/wiki/More_detailed_Lua_example[/link] I just don't know how synthesize the two. Don't know much about Lua (or Bash, really) but I'll learn.
conky_widgets.lua
--[[
Conky Widgets by londonali1010 (2009)
This script is meant to be a "shell" to hold a suite of widgets for use in Conky.
To configure:
+ Copy the widget's code block (will be framed by --(( WIDGET NAME )) and --(( END WIDGET NAME )), with "[" instead of "(") somewhere between "require 'cairo'" and "function conky_widgets()", ensuring not to paste into another widget's code block
+ To call the widget, add the following just before the last "end" of the entire script:
cr = cairo_create(cs)
NAME_OF_FUNCTION(cr, OPTIONS)
cairo_destroy(cr)
+ Replace OPTIONS with the options for your widget (should be specified in the widget's code block)
Call this script in Conky using the following before TEXT (assuming you save this script to ~/scripts/conky_widgets.lua):
lua_load ~/scripts/conky_widgets.lua
lua_draw_hook_pre widgets
Changelog:
+ v1.0 -- Original release (17.10.2009)
]]
require 'cairo'
--[[ RING WIDGET ]]
--[[ Options (name, arg, max, bg_colour, bg_alpha, xc, yc, radius, thickness, start_angle, end_angle):
"name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'.
"arg" is the argument to the stat type, e.g. if in Conky you would write ${cpu cpu0}, 'cpu0' would be the argument. If you would not use an argument in the Conky variable, use ''.
"max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.
"bg_colour" is the colour of the base ring.
"bg_alpha" is the alpha value of the base ring.
"fg_colour" is the colour of the indicator part of the ring.
"fg_alpha" is the alpha value of the indicator part of the ring.
"x" and "y" are the x and y coordinates of the centre of the ring, relative to the top left corner of the Conky window.
"radius" is the radius of the ring.
"thickness" is the thickness of the ring, centred around the radius.
"start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative.
"end_angle" is the ending angle of the ring, in degrees, clockwise from top. Value can be either positive or negative, but must be larger (e.g. more clockwise) than start_angle. ]]
function ring(cr, name, arg, max, bgc, bga, fgc, fga, xc, yc, r, t, sa, ea)
local function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
local function draw_ring(pct)
local angle_0=sa*(2*math.pi/360)-math.pi/2
local angle_f=ea*(2*math.pi/360)-math.pi/2
local pct_arc=pct*(angle_f-angle_0)
-- Draw background ring
cairo_arc(cr,xc,yc,r,angle_0,angle_f)
cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
cairo_set_line_width(cr,t)
cairo_stroke(cr)
-- Draw indicator ring
cairo_arc(cr,xc,yc,r,angle_0,angle_0+pct_arc)
cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
cairo_stroke(cr)
end
local function setup_ring()
local str = ''
local value = 0
str = string.format('${%s %s}', name, arg)
str = conky_parse(str)
value = tonumber(str)
if value == nil then value = 0 end
pct = value/max
draw_ring(pct)
end
local updates=conky_parse('${updates}')
update_num=tonumber(updates)
if update_num>5 then setup_ring() end
end
--[[ END RING WIDGET ]]
function conky_widgets()
if conky_window == nil then return end
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
cr = cairo_create(cs)
ring(cr, 'time', '%S', 60, 0xFF2B2B, 0.2, 0xFF2B2B, 0.8, 100, 100, 50, 10, 0, 360) -- options: name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle
cairo_destroy(cr)
cr = cairo_create(cs)
ring(cr, 'time', '%I %M', 12, 0xFFFFFF, 0.2, 0xFFFFFF, 0.8, 100, 100, 62, 5, -140, -30) -- options: name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle
cairo_destroy(cr)
cr = cairo_create(cs)
ring(cr, 'time', '%M %S', 60, 0xFFFFFF, 0.2, 0xFFFFFF, 0.8, 100, 100, 62, 5, 30, 140) -- options: name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle
cairo_destroy(cr)
cr = cairo_create(cs)
ring(cr, 'cpu', 'CPU0', 100, 0xFF2B2B, 0.2, 0xFF2B2B, 0.8, 100, 200, 50, 10, 0, 180) -- options: name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle
cairo_destroy(cr)
cr = cairo_create(cs)
ring(cr, 'hwmon', 'temp 1', 100, 0xFF2B2B, 0.2, 0xFF2B2B, 0.8, 100, 300, 50, 10, 180, 360) -- options: name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle
cairo_destroy(cr)
cr = cairo_create(cs)
ring(cr, 'memperc', '', 100, 0xFF2B2B, 0.2, 0xFF2B2B, 0.8, 100, 400, 50, 10, 0, 180) -- options: name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle
cairo_destroy(cr)
cr = cairo_create(cs)
ring(cr, 'fs_used_perc', '/home', 100, 0xFF2B2B, 0.2, 0xFF2B2B, 0.8, 100, 500, 50, 10, 180, 360) -- options: name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle
cairo_destroy(cr)
cr = cairo_create(cs)
ring(cr, 'battery_percent', 'BAT0', 100, 0xFF2B2B, 0.2, 0xFF2B2B, 0.8, 100, 600, 50, 10, 0, 180) -- options: name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle
cairo_destroy(cr)
cr = cairo_create(cs)
ring(cr, 'downspeedf', 'wlan0', 10000, 0xFF2B2B, 0.2, 0xFF2B2B, 0.8, 100, 700, 50, 10, 180, 360) -- options: name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle
cairo_destroy(cr)
cr = cairo_create(cs)
ring(cr, 'head', '/home/soma/.logs/perc_old.log 3 3600', 100, 0xFF2B2B, 0.2, 0xFF2B2B, 0.8, 100, 800, 50, 10, 0, 360) -- options: name, arg, max, bg_colour, bg_alpha, fg_colour, fg_alpha, xc, yc, radius, thickness, start_angle, end_angle
cairo_destroy(cr)
end
perc_old.sh
#!/bin/bash
TOTAL=`pacman -Q | wc -l`
OLD=`pacman -Qu | wc -l`
PERC=$(echo "scale=2; $OLD / $TOTAL" | bc)
echo "$PERC"
exit
and .conkyrc
# -- 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 1000
imlib_cache_size 0
# -- Window specifications -- #
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
border_inner_margin 0
border_outer_margin 0
minimum_size 200 1000
maximum_width 1000
alignment tr
gap_x 0
gap_y 0
# -- Graphics settings -- #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
# -- Text settings -- #
use_xft yes
xftfont sans:size=12
xftalpha 0.8
uppercase no
default_color ffffff
mpd_host localhost
mpd_port 6600
# -- Lua Load -- #
lua_load /home/soma/bin/conky_widgets.lua
lua_draw_hook_pre widgets
TEXT
${goto 70}${voffset 90} ${time %H:%M}
${goto 60}${voffset 80}cpu ${cpu}%
${alignr 80}${voffset 80} ${hwmon 0 temp 1}°C
${goto 60}${voffset 80}mem ${memperc}%
${alignr 40}${voffset 80}/home ${fs_used_perc /home}%
${goto 60}${voffset 80}bat ${battery_percent BAT0}%
${alignr 20}${voffset 80}dl ${downspeedf wlan0} kB/s
${goto 90}${voffset 90} ${head /home/soma/.logs/perc_old.log 3 3600}
Thanks for any and all help. Hope you like this wip
Last edited by somapainter (2012-01-07 02:49:09)
Offline
The United Federation Starship Statler, call sign NCC 110·207 R, is a part of the United Federation of Conkys.
NCC 110·207 R's mission is to help Crunchbang complete it's Mission Statement.
As you see UFOC personnel have logged into local terminals and they are being monitored.
http://dl.dropbox.com/u/16070765/thmb_UFOC.jpgThe Captain's Location changes according to the desktop you are on. I renamed mine for this conky:
http://dl.dropbox.com/u/16070765/thmb_UFOC_Captain_Location.jpgRED ALERT (upper right) - someone needs to eject the garbage. All terminals are closed down except the Main Bridge Terminal
http://dl.dropbox.com/u/16070765/thmb_UFOC_RED_ALERT.jpgAcross the top:
HHMMSS DD.MM.YY
STARDATE is UNIX Epoc time in seconds
UNIVERSAL EARTHDATE YYYjjjHHMMSS, and past Red Alert
uptime short
You, sir, just won this thread...
You will need:
conkyMisc - to calculate NEXT REFIT with conkyDateDiff & conkyDaysDiff
conkyEmail - (or some other mails script program) for INCOMMING COMMUNICATIONS
Offline
This is mine, very simple but I'm happy. Any suggestions to further tweak it?
http://imgur.com/46vIt
double_buffer yes
background yes
no_buffers yes
update_interval 5.0
total_run_times 0
use_xft yes
xftfont Liberation Mono:pixelsize=14
xftalpha 0.5
own_window yes
own_window_transparent yes
own_window_argb_visual yes
own_window_type dock
own_window_class Conky
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
gap_x 1950
gap_y 10
draw_shades no
draw_outline no
draw_borders no
uppercase no
cpu_avg_samples 2
net_avg_samples 2
TEXT
${color lightgrey}
${font sans-serif:bold:size=14}SYSTEM ${hr 2}
${font sans-serif:normal:size=14}$sysname $kernel $alignr $machine
Host:$alignr$nodename
Uptime:$alignr$uptime
Date: $alignr${exec date --iso-8601} ${exec date +%H:%M}
${font sans-serif:bold:size=14}PROCESSORS ${hr 2}
${font sans-serif:normal:size=14}${cpugraph cpu1}
CPU1: ${cpu cpu1}% ${cpubar cpu1}
CPU2: ${cpu cpu2}% ${cpubar cpu2}
CPU3: ${cpu cpu3}% ${cpubar cpu3}
CPU4: ${cpu cpu4}% ${cpubar cpu4}
${font sans-serif:bold:size=14}MEMORY ${hr 2}
${font sans-serif:normal:size=14}RAM $alignc $mem / $memmax $alignr $memperc%
$membar
${font sans-serif:bold:size=14}GPU ${hr 2}
${font sans-serif:normal:size=14}gpu: $alignr${execi 60 nvidia-settings -q gpus -t | grep 'GeForce' | cut -d "(" -f2 | cut -d ")" -f1}
temp: $alignr${execi 60 nvidia-settings -q [gpu:0]/GPUCoreTemp | grep \): | sed 's/^.\+)://' | sed 's/\.//'}°C
${font sans-serif:bold:size=14}PARTITIONS ${hr 2}
${font sans-serif:normal:size=14}/ $alignc ${fs_used /} / ${fs_size /} $alignr ${fs_used_perc /}%
${fs_bar /}
/home $alignc ${fs_used /home} / ${fs_size /home} $alignr ${fs_used_perc /home}%
${fs_bar /home}
/win $alignc ${fs_used /media/windows} / ${fs_size /media/windows} $alignr ${fs_used_perc /media/windows}%
${fs_bar /media/windows}
/data $alignc ${fs_used /media/data} / ${fs_size /media/data} $alignr ${fs_used_perc /media/data}%
${fs_bar /media/data}
${font sans-serif:bold:size=14}NETWORK ${hr 2}
${font sans-serif:normal:size=14}ping: $alignr${exec ping -c 1 www.google.de | grep time= | awk '{print $8}' | cut -d "=" -f2}ms
down:${downspeed eth0} $alignr up:${upspeed eth0}
${downspeedgraph eth0 30,95 ff0000 0000ff} $alignr${upspeedgraph eth0 30,95 0000ff ff0000}
${font sans-serif:bold:size=14}PROCESSES [${font sans-serif:normal:size=14}CPU%${font sans-serif:bold:size=14}]${hr 2}
${font sans-serif:normal:size=14}${top name 1} $alignr${top cpu 1}
${top name 2} $alignr${top cpu 2}
${top name 3} $alignr${top cpu 3}
${top name 4} $alignr${top cpu 4}
#${top name 5} $alignr${top cpu 5}
#${top name 6} $alignr${top cpu 6}
${font sans-serif:bold:size=14}PROCESSES [${font sans-serif:normal:size=14}MEM%${font sans-serif:bold:size=14}]${hr 2}
${font sans-serif:normal:size=14}${top_mem name 1} $alignr${top_mem mem 1}
${top_mem name 2} $alignr${top_mem mem 2}
${top_mem name 3} $alignr${top_mem mem 3}
${top_mem name 4} $alignr${top_mem mem 4}
${voffset 900}
Offline
.conkyrc
# Based on conky-jc and the default .conkyrc.
# INCLUDES:
# - tail of /var/log/messages
# - netstat connections to your computer
#
# -- Pengo (conky@pengo.us)
#
# Create own window instead of using desktop (required in nautilus)
own_window yes # create a separate XWindow over the one from Xfdesktop
own_window_type desktop # the window cannot be moved or resized
own_window_hints undecorated,below,skip_taskbar,skip_pager # make it behave like it belongs to the desktop
own_window_argb_visual yes # true transparency, a compositor has to be active
own_window_argb_value 100 # make the background semi-transparent
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# fiddle with window
use_spacer yes
use_xft yes
# Xft font when Xft is enabled
xftfont Bitstream Vera Sans Mono
#xftfont Terminus:size=6
# Text alpha when using Xft
#xftalpha 0.8
# Update interval in seconds
update_interval 3.0
#Maximum Width of Window
maximum_width 320
# Minimum size of text area
# minimum_size 250 5
# Draw shades?
draw_shades no
# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
font arial
uppercase no # set to yes if you want all text to be in uppercase
# Stippled borders?
stippled_borders 3
# border margins
border_margin 5
# border width
border_width 6
# Default colors and also border colors, grey90 == #e5e5e5
default_color FFFFCC
own_window_colour brown
own_window_transparent yes
# Text alignment, other possible values are commented
#alignment top_left
#alignment top_right
#alignment bottom_left
#alignment bottom_right
#alignment middle_right
alignment middle_left
# Gap between borders of screen and text
gap_x 10
gap_y 10
# stuff after ‘TEXT’ will be formatted on screen
TEXT
$color
${color CC9900}SYSTEM ${hr 2}$color
$nodename $sysname $kernel on $machine
${color CC9900}UPTIME${hr 2}
$color$uptime
${color CC9900}CPU ${hr 2}$color
Pentium(R) Dual-Core CPU E5700
Total CPU: ${cpu cpu0}%
#${color 597DB2}${cpubar}$color
#${cpugraph 000000 597DB2}
Core 1: ${freq 1} MHz #Temperature: $color ${exec sensors|grep 'Core0'|awk '{print $3}'}
${cpu cpu1}% ${color 597DB2}${cpubar cpu1}$color
Core 2: ${freq 2} MHz #Temperature: $color ${exec sensors|grep 'Core1'|awk '{print $3}'}
${cpu cpu2}% ${color 597DB2}${cpubar cpu2}$color
NAME PID CPU% MEM%
${color CCFFFF}${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${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
${color CC9900}MEMORY ${hr 2}$color
RAM Used: ${mem} RAM Free: ${memfree}/ ${memmax}
RAM: $memperc% ${color FF6600} ${membar 6}$color
Swap: $swapperc% ${color FF6600} ${swapbar 6}$color
${color CC9900}DISK ${hr 2}$color
sda13 ${fs_type} (Root): ${fs_free_perc /}% ${color FFFF33} ${fs_bar 6 /}$color
sda14 ${fs_type} (Home): ${fs_free_perc /home/dlouhy}% ${color FFFF33} ${fs_bar 6 /home/dlouhy}$color
${color CC9900}NETWORK (${addr eth0}) ${hr 2}$color
Down: $color${downspeed eth0} k/s ${alignr}Up: ${upspeed eth0} k/s
${downspeedgraph eth1 25,140 000000 ff0000} ${alignr}${upspeedgraph eth1
25,140 000000 00ff00}$color
Total: ${totaldown eth0} ${alignr}Total: ${totalup eth0}
Inbound: ${tcp_portmon 1 32767 count} Outbound: ${tcp_portmon 32768
61000 count}${alignr}Total: ${tcp_portmon 1 65535 count}
${color CC9900}GMAIL ${hr 2}$color
${execpi 300 python ~/.scripts/gmail.py}
${color CC9900}WEATHER ${hr 2}$color
${execi 300 /home/dlouhy/.scripts/weather.sh 30033}
weather.sh
# !/usr/bin/bash
METRIC=0 #Should be 0 or 1; 0 for F, 1 for C
if [ -z $1 ]; then
echo "USAGE: weather.sh <locationcode>"
exit 0;
fi
wget -q http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1 -O - | awk \
'/Currently:/ {CurWeather=$0}
/[0-9] Forecast<\/title>/ {nr=NR+5}
NR==nr {postIndx[++x]=$0}
# x>2 {exit}
END{
split(CurWeather,tmp,"Currently: ")
split(tmp[2],tmp1,"<")
CurWeather=sprintf("%s",tmp1[1])
sub(":",",",CurWeather)
for(x in postIndx){
split(postIndx[x],tmp,";|&")
split(tmp[1],tmp,">")
split(tmp[2],statement," F ") # substitute C for F if metric differs
split(tmp[2],temp)
forecast[++y]=sprintf("%d-%dF %-15s",temp[5],temp[2],statement[3])
}
printf("WEATHER:\nNow: %s\nToday: %s\nTomorrow: %s",CurWeather,forecast[1],forecast[2])
}'
gmail.py
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import sys, imaplib
port = 993
server = 'imap.gmail.com'
username = '****'
passwd = '****'
imap_server = imaplib.IMAP4_SSL(server, port)
try:
imap_server.login(username, passwd)
except:
print('?? new')
sys.exit( 1 )
typ, data = imap_server.select ('Inbox', True)
if typ == 'OK':
total = int(data[0])
typ, data = imap_server.search (None, 'SEEN')
if typ == 'OK':
seen = len(data[0].split())
print('{}/{} new'.format(total, total - seen))
if typ != 'OK':
print('?? new')
imap_server.logout()
Last edited by oboedad55 (2012-01-23 07:20:02)
Registered Linux user #436067
Offline
background yes
use_xft yes
xftfont Terminus:size=9
xftalpha 1.0
out_to_console no
update_interval 1.0
total_run_times 0
own_window no
double_buffer yes
minimum_size 1580 900
draw_shades yes
draw_outline no
draw_borders no
stippled_borders 8
border_margin 4
border_width 1
default_color white
default_shade_color black
default_outline_color white
alignment top_left
gap_x 10
gap_y 10
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 2
override_utf8_locale no
use_spacer yes
#mpd
mpd_host ~/.mpd/socket
mpd_port 6606
TEXT
# ${color slate grey}
# ${color #ddaa00}
${color #ccccee}BATTERY
${color slate grey}power ${color #ddaa00}${if_match "$acpiacadapter"=="on-line"}charging${else}${color lightgrey}draining${endif} ${battery_percent}%
${color }${battery_bar 10,130}
${alignr}${color #ccccee}DISK
${alignr}${color #ddaa00}${diskio_read}${color slate grey} read
${alignr}${color}${diskiograph_read 10,130 000000 ffffff -t -l}
${alignr}${color #ddaa00}${diskio_write}${color slate grey} write
${alignr}${color}${diskiograph_write 10,130 000000 ffffff -t -l}
${color #ccccee}NETWORK
${color slate grey}essid ${color #ddaa00}${wireless_essid wlan0}
${color slate grey}ip ${color #ddaa00}${addr wlan0}
${color slate grey}mode ${color #ddaa00}${wireless_mode wlan0}
${color slate grey}up ${color #ddaa00}${upspeed wlan0}
${color }${upspeedgraph wlan0 10,130 000000 ffffff -l -t}
${color slate grey}down ${color #ddaa00}${downspeed wlan0}${color}
${color }${downspeedgraph wlan0 10,130 000000 ffffff -l -t}
${alignr}${color #ccccee}CPU
${alignr}${color slate grey}core 1: ${color #ddaa00}${cpu}%${color} ${color}${freq_g 1}GHz ${cpugraph cpu1 10,130 000000 ffffff -t -l}
${alignr}${color slate grey}core 2: ${color #ddaa00}${cpu}%${color} ${color}${freq_g 2}GHz ${cpugraph cpu2 10,130 000000 ffffff -t -l}
${alignr}${color slate grey}core 3: ${color #ddaa00}${cpu}%${color} ${color}${freq_g 3}GHz ${cpugraph cpu3 10,130 000000 ffffff -t -l}
${alignr}${color slate grey}core 4: ${color #ddaa00}${cpu}%${color} ${color}${freq_g 4}GHz ${cpugraph cpu4 10,130 000000 ffffff -t -l}
${alignr}${color slate grey}ram ${color #ddaa00}${mem}${color}/ ${memmax}
${alignr}${color}${membar 10, 200}
${alignc} ${color #ccccee} MPD ${color #88ff88}Now $mpd_status
$color ${alignc} $mpd_artist
${alignc} $mpd_title
${alignc} Volume: $mpd_vol Bitrate: $mpd_bitrate kbps
${alignc} ${color #ccddff} ${mpd_bar 3, 300}
${color slate grey}/var/log/everything.log:
${color}${exec tail -n15 /var/log/everything.log}
Last edited by ndt (2012-01-31 22:01:34)
[~/.]
Offline
^^ @ ndt
What's this?
/var/log/everything.log
Offline
Sector11 wrote:The United Federation Starship Statler, call sign NCC 110·207 R, is a part of the United Federation of Conkys.
NCC 110·207 R's mission is to help Crunchbang complete it's Mission Statement.
As you see UFOC personnel have logged into local terminals and they are being monitored.
http://dl.dropbox.com/u/16070765/thmb_UFOC.jpgThe Captain's Location changes according to the desktop you are on. I renamed mine for this conky:
http://dl.dropbox.com/u/16070765/thmb_UFOC_Captain_Location.jpgRED ALERT (upper right) - someone needs to eject the garbage. All terminals are closed down except the Main Bridge Terminal
http://dl.dropbox.com/u/16070765/thmb_UFOC_RED_ALERT.jpgAcross the top:
HHMMSS DD.MM.YY
STARDATE is UNIX Epoc time in seconds
UNIVERSAL EARTHDATE YYYjjjHHMMSS, and past Red Alert
uptime short
You will need:
conkyMisc - to calculate NEXT REFIT with conkyDateDiff & conkyDaysDiff
conkyEmail - (or some other mails script program) for INCOMMING COMMUNICATIONSYou, sir, just won this thread...
I didn't realize it was up for grabs as a prize.
Nothing very hard, just a themed and spacing exercise.
Offline
it's not conky, but my lighter weight conky replacement xosview
thought @sector11 might find it interesting.
# A playground. Test your ideas here.
# It is read the last, so what's here
# would override all the options in the other
# files.
#
# On the other hand, if it makes any mess,
# just purge it.
# Make TitleFormat work like IndexedWindowName for one window
DestroyFunc CountWindow
AddToFunc CountWindow
+ I SetEnv WindowCount 0
+ I All ($[w.class], !Transient) PipeRead \
`echo SetEnv WindowCount $$$$(($$$$WindowCount + 1))`
+ I PipeRead `[ $WindowCount = 1 ] && echo \
"WindowStyle TitleFormat %n" || echo "Nop"`
+ I UnsetEnv WindowCount
DestroyModuleConfig FE-tweakttformat
*FE-tweakttformat: add_window CountWindow
AddToFunc StartFunction I Module FvwmEvent FE-tweakttformat
##############################################################
# Load any modules which should be started during
# fvwm initialization
#ModulePath /usr/lib/X11/fvwm:/usr/bin/X11
#Module FvwmIconMan
# Make FvwmIconMan title-bar-less, sticky, and give it an icon
#Style "Fvwm*" Icon toolbox.xpm,NoTitle,NoHandles,Sticky
#Style "FvwmIconMan" HandleWidth 5, Handles, BorderWidth 5
##############################################################
##############################################################
#Definitions used by the modules
#*FvwmIconMan: NumManagers 1
#*FvwmIconMan: Resolution global
#*FvwmIconMan: Background #12171d
#*FvwmIconMan: Foreground #7b7b7b
#*FvwmIconMan: Font "xft:clean"
#*FvwmIconMan: BorderWidth 0
#*FvwmIconMan: ReliefThickness 0
*FvwmPager: Back #12171d
*FvwmPager: Fore #7b7b7b
*FvwmPager: Hilight #12171d
*FvwmPager: WindowColors #12171d #7b7b7b #12171d #7b7b7b
*FvwmPager: Label 0
*FvwmPager: Font none
*FvwmPager: Rows 2
*FvwmPager: Columns 1
*FvwmPager: UseSkipList
*FvwmPager: WindowBorderWidth 0
*FvwmPager: Pixmap $[FVWM_USERDIR]/themes/$[fvwm_theme]/decorations/Pager.png
KillModule FvwmButtons FBConsole
DestroyModuleConfig FvwmButtons FBConsole
*FBConsole: Rows 4
*FBConsole: Columns 6
*FBConsole: (3x3, Swallow "FvwmPager" `FvwmPager 0 1`)
*FBConsole: (3x2, Swallow "xclock" `Exec xclock`)
*FBConsole: (1x1, Icon $[FVWM_USERDIR]/themes/$[fvwm_theme]/decorations/Terminal.png, Action `Exec $[fvwm_terminal]`)
*FBConsole: (1x1, Icon $[FVWM_USERDIR]/themes/$[fvwm_theme]/decorations/Player.png, Action `Exec exec $[fvwm_player]`)
*FBConsole: (1x1, Icon $[FVWM_USERDIR]/themes/$[fvwm_theme]/decorations/Browser.png, Action `Exec exec $[fvwm_browser]`)
*FBConsole: Back #12171d
*FBConsole: Frame 0
*FBConsole: Padding 0 0
KillModule FvwmButtons FBXosview
DestroyModuleConfig FvwmButtons FBXosview
*FBXosview: Rows 1
*FBXosview: Columns 2
*FBXosview: (3x1, Swallow "xosview1" `Exec xosview -name xosview1 -mem -net`)
*FBXosview: (3x1, Swallow "xosview2" `Exec xosview -name xosview2 -load -cpu`)
*FBXosview: Back #12171d
*FBXosview: Frame 0
*FBXosview: Padding 0 0
#*FvwmIconMan: ButtonGeometry 186x0
#*FvwmIconMan: ManagerGeometry 0x18-7+198
Module FvwmButtons FBConsole -g 192x144-7+7
Module FvwmButtons FBXosview -g 192x48-7+172
#Style FvwmIconMan !Title, !Handles, !Borders, !Icon, WindowListSkip, StaysOnBottom
Style FBConsole !Title, !Handles, BorderWidth 7, !Icon, WindowListSkip, StaysOnBottom, Sticky
Style FBXosview !Title, !Handles, BorderWidth 7, !Icon, WindowListSkip, StaysOnBottom, Sticky
CursorStyle ROOT left_ptr
CursorStyle TITLE left_ptr
CursorStyle DEFAULT left_ptr
CursorStyle SYS left_ptr
CursorStyle MENU left_ptr
Last edited by punchranger (2012-02-01 19:40:20)
The red-eyed Coyote will appear in the Zona Norte at the far end of town.
Offline
cog dood!! you know it!! rstrcogburn@crunchbanglinux.org, the crunchranger with trisciuit cracker's and all the fixins
The red-eyed Coyote will appear in the Zona Norte at the far end of town.
Offline
^^ @ ndt
What's this?
/var/log/everything.log
It's a compound log that contains all the logs on your system. Here are some example logs:
/var/log/message: General message and system related stuff
/var/log/auth.log: Authenication logs
/var/log/kern.log: Kernel logs
/var/log/cron.log: Crond logs (cron job)
/var/log/maillog: Mail server logs
/var/log/qmail/ : Qmail log directory (more files inside this directory)
/var/log/httpd/: Apache access and error logs directory
/var/log/lighttpd: Lighttpd access and error logs directory
/var/log/boot.log : System boot log
/var/log/mysqld.log: MySQL database server log file
/var/log/secure: Authentication log
/var/log/utmp or /var/log/wtmp : Login records file
/var/log/yum.log: Yum log files
(list taken from here)
[~/.]
Offline
out of request the conky equivalent of my xosview
##############################################
# Settings
##############################################
# Use Xft?
use_xft yes
xftfont MonteCarlo:size=9
xftalpha 1
text_buffer_size 2048
# Update interval in seconds
update_interval 1
# 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
own_window_colour 12171d
own_window_transparent no
own_window_type normal
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
own_window_title digit
# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes
# Minimum size of text area
minimum_size 192 48
# Draw shades?
draw_shades no
# Draw outlines?
draw_outline no
# Draw borders around text
draw_borders no
draw_graph_borders no
# Stippled borders?
#stippled_borders 0
# border margins
#border_margin 0
# border width
#border_width 1
# Default colors and also border colors
default_color a59461
#default_shade_color 131313
#default_outline_color black
#own_window_colour black
# Text alignment, other possible values are commented
alignment top_right
#alignment top_right
#alignment bottom_left
#alignment bottom_right
gap_x 7
gap_y 7
# Subtract file system buffers from used memory?
no_buffers yes
uppercase no
# 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
TEXT
${cpugraph CPU1 18,96 ffad46 ffad46 scale -l}${memgraph 18,96 16a765 16a765 scale -l}
${cpugraph CPU2 18,96 f83a22 f83a22 scale -l}${diskiograph /dev/sda 18,96 4986e7 4986e7 scale -l}
The red-eyed Coyote will appear in the Zona Norte at the far end of town.
Offline
Sector11 wrote:^^ @ ndt
What's this?
/var/log/everything.log
It's a compound log that contains all the logs on your system. Here are some example logs:
I know about /var/log/ I have never seen 'everything.log'
Not an ARCH user, here for conky
Offline
it's not conky, but my lighter weight conky replacement xosview
thought @sector11 might find it interesting.
rooster!!!! Well why the he..ck heck didn't ya say so!
Not conky you say ... hmmmmm I gotta look at that - for fun mind you!
Last edited by Sector11 (2012-02-02 14:48:25)
Offline
I use this script to see my volume in my conky, works great but I can't seem to get it to output mute when it is muted. I would like it to display "--" when muted. Any thoughts?
#!/bin/bash
vol=$(amixer get 'Master',0 | egrep -o '[0-9]{1,3}%')
echo "${vol%[%]}"
Offline
.
Last edited by Sector11 (2012-05-01 13:14:03)
Offline
Does your $mixer ever show anything else than "0"?
I found the variable is there, but oftenly it's not working.
Anyway, the if-clause does of course work with a script, too.
Offline