Add files via upload
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
# Create own window instead of using desktop (required in nautilus)
|
||||
own_window yes
|
||||
own_window_type override
|
||||
own_window_transparent yes
|
||||
own_window_hints undecorated,below,skip_taskbar,skip_pager
|
||||
|
||||
# Use double buffering (reduces flicker, may not work for everyone)
|
||||
double_buffer yes
|
||||
|
||||
# fiddle with window
|
||||
use_spacer yes
|
||||
use_xft yes
|
||||
|
||||
# Update interval in seconds
|
||||
update_interval 3
|
||||
|
||||
# Minimum size of text area
|
||||
minimum_size 200 700
|
||||
maximum_width 350
|
||||
|
||||
override_utf8_locale yes
|
||||
|
||||
# Draw shades?
|
||||
draw_shades yes
|
||||
|
||||
# Text stuff
|
||||
draw_outline yes # amplifies text if yes
|
||||
draw_borders no
|
||||
#font freesans -12
|
||||
xftfont Arial:size=9
|
||||
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 cbcbcb
|
||||
|
||||
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
|
||||
|
||||
# Gap between borders of screen and text
|
||||
gap_x 10
|
||||
gap_y 10
|
||||
|
||||
imlib_cache_size 0
|
||||
# stuff after 'TEXT' will be formatted on screen
|
||||
|
||||
TEXT
|
||||
${hr 2}
|
||||
$alignc ${color 48bcff}PRISTINA WEATHER $color${execi 600 bash /home/altin/.fluxbox/conky/accu/Accuweather_RSS/acc_rss}
|
||||
${hr 2}
|
||||
${font conkyweather:size=30}${execpi 600 sed -n '2p' /home/altin/.fluxbox/conky/accu/Accuweather_RSS/weather}${font}${goto 75}${voffset -25}${execpi 600 sed -n '1p' /home/altin/.fluxbox/conky/accu/Accuweather_RSS/weather|cut -c1-20}
|
||||
${goto 75}${execpi 600 sed -n '1p' /home/altin/.fluxbox/conky/accu/Accuweather_RSS/weather|cut -c21-40}
|
||||
${goto 75}${execpi 600 sed -n '1p' /home/altin/.fluxbox/conky/accu/Accuweather_RSS/weather|cut -c41-60}
|
||||
|
||||
${execi 600 sed -n '3p' /home/altin/.fluxbox/conky/accu/Accuweather_RSS/weather}
|
||||
${font conkyweather:size=30}${execpi 600 sed -n '5p' /home/altin/.fluxbox/conky/accu/Accuweather_RSS/weather}${font}${goto 75}${voffset -25}${execpi 600 sed -n '4p' /home/altin/.fluxbox/conky/accu/Accuweather_RSS/weather|cut -c1-20}
|
||||
${goto 75}${execpi 600 sed -n '4p' /home/altin/.fluxbox/conky/accu/Accuweather_RSS/weather|cut -c21-40}
|
||||
${goto 75}${execpi 600 sed -n '4p' /home/altin/.fluxbox/conky/accu/Accuweather_RSS/weather|cut -c41-60}
|
||||
|
||||
${execi 600 sed -n '6p' /home/altin/.fluxbox/conky/accu/Accuweather_RSS/weather}
|
||||
${font conkyweather:size=30}${execpi 600 sed -n '8p' /home/altin/.fluxbox/conky/accu/Accuweather_RSS/weather}${font}${goto 75}${voffset -25}${execpi 600 sed -n '4p' /home/altin/.fluxbox/conky/accu/Accuweather_RSS/weather|cut -c1-20}
|
||||
${goto 75}${execpi 600 sed -n '7p' /home/altin/.fluxbox/conky/accu/Accuweather_RSS/weather|cut -c21-40}
|
||||
${goto 75}${execpi 600 sed -n '7p' /home/altin/.fluxbox/conky/accu/Accuweather_RSS/weather|cut -c41-60}
|
||||
@@ -0,0 +1,115 @@
|
||||
#!/bin/bash
|
||||
|
||||
#function: test_image
|
||||
test_image () {
|
||||
case $1 in
|
||||
1|01)
|
||||
echo a
|
||||
;;
|
||||
2|02)
|
||||
echo b
|
||||
;;
|
||||
3|03)
|
||||
echo c
|
||||
;;
|
||||
4|04)
|
||||
echo c
|
||||
;;
|
||||
5|05)
|
||||
echo c
|
||||
;;
|
||||
6|06)
|
||||
echo d
|
||||
;;
|
||||
7|07)
|
||||
echo e
|
||||
;;
|
||||
8|08)
|
||||
echo e
|
||||
;;
|
||||
11)
|
||||
echo 0
|
||||
;;
|
||||
12)
|
||||
echo h
|
||||
;;
|
||||
13|14)
|
||||
echo g
|
||||
;;
|
||||
15)
|
||||
echo l
|
||||
;;
|
||||
16|17)
|
||||
echo k
|
||||
;;
|
||||
18|26)
|
||||
echo i
|
||||
;;
|
||||
19)
|
||||
echo p
|
||||
;;
|
||||
20|21|23)
|
||||
echo o
|
||||
;;
|
||||
22)
|
||||
echo r
|
||||
;;
|
||||
24|31)
|
||||
echo E
|
||||
;;
|
||||
25)
|
||||
echo u
|
||||
;;
|
||||
29)
|
||||
echo v
|
||||
;;
|
||||
30)
|
||||
echo 5
|
||||
;;
|
||||
32)
|
||||
echo 6
|
||||
;;
|
||||
33)
|
||||
echo A
|
||||
;;
|
||||
34|36|37)
|
||||
echo B
|
||||
;;
|
||||
35|38)
|
||||
echo C
|
||||
;;
|
||||
39|40)
|
||||
echo G
|
||||
;;
|
||||
41|42)
|
||||
echo K
|
||||
;;
|
||||
43|44)
|
||||
echo O
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
#put your accuweather rss address here
|
||||
address="http://rss.accuweather.com/rss/liveweather_rss.asp?metric=1&locCode=EUR|XK|298740|PRISTINA"
|
||||
|
||||
killall wget
|
||||
wget -O ./weather_raw $address
|
||||
|
||||
|
||||
if [[ -s ./weather_raw ]]; then
|
||||
|
||||
egrep 'Currently|Forecast<\/title>|_31x31.gif' ./weather_raw > ./weather
|
||||
sed -i '/AccuWeather\|Currently in/d' ./weather
|
||||
sed -i -e 's/^[ \t]*//g' -e 's/<title>\|<\/title>\|<description>\|<\/description>//g' ./weather
|
||||
sed -i -e 's/<img src="/\n/g' ./weather
|
||||
sed -i '/^$/d' ./weather
|
||||
sed -i -e 's/_31x31.*$//g' -e 's/^.*\/icons\///g' ./weather
|
||||
sed -i -e '1s/.$//' -e '3s/.$//' -e '6s/.$//' ./weather
|
||||
for (( i=2; i<=8; i+=3 ))
|
||||
do
|
||||
im=$(sed -n ${i}p ./weather)
|
||||
sed -i $i"s/^.*$/$(test_image $im)/" ./weather
|
||||
done
|
||||
|
||||
fi
|
||||
@@ -0,0 +1,8 @@
|
||||
Currently: Partly Sunny: 25C
|
||||
c
|
||||
7/22/2012 Forecast
|
||||
High: 29 C Low: 13 C Some sun, a t-storm; cooler
|
||||
k
|
||||
7/23/2012 Forecast
|
||||
High: 28 C Low: 14 C Variable clouds with t-storms
|
||||
k
|
||||
@@ -0,0 +1,56 @@
|
||||
<?xml version = "1.0"?>
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
<title>Pristina, XK - AccuWeather.com Forecast</title>
|
||||
<link>http://www.accuweather.com/en/xk/pristina/298740/%pagename%/298740</link>
|
||||
|
||||
<description>AccuWeather.com Forecast & Current Conditions</description>
|
||||
<ttl>60</ttl>
|
||||
<copyright>Copyright 2012, AccuWeather, Inc., All rights reserved. For personal use only.</copyright>
|
||||
<pubDate>Sun, 22 Jul 2012 09:38:43 GMT</pubDate>
|
||||
<language>en-us</language>
|
||||
<image>
|
||||
<title>Pristina, XK - AccuWeather.com Forecast</title>
|
||||
<link>/en/xk/pristina/298740/weather-forecast/298740</link>
|
||||
|
||||
<description>AccuWeather.com The Best Weather on the Web!</description>
|
||||
<url>http://vortex.accuweather.com/adc2004/pub/images/logos/adc_logo_187.gif</url>
|
||||
<width>144</width>
|
||||
<height>19</height>
|
||||
</image>
|
||||
<item>
|
||||
<title>Currently: Partly Sunny: 25C</title>
|
||||
<link>http://www.accuweather.com/en/xk/pristina/298740/weather-forecast/298740</link>
|
||||
<guid isPermaLink="false">http://www.accuweather.com/en/xk/pristina/298740/weather-forecast/298740</guid>
|
||||
|
||||
<description>Currently in Pristina, XK: 25 °C and Partly Sunny
|
||||
<img src="http://vortex.accuweather.com/phoenix2/images/common/icons/03_31x31.gif">
|
||||
</description>
|
||||
|
||||
<pubDate>Sun, 22 Jul 2012 09:38:43 GMT</pubDate>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>7/22/2012 Forecast</title>
|
||||
<link>http://www.accuweather.com/en/xk/pristina/298740/daily-weather-forecast/298740?day=1</link>
|
||||
<guid isPermaLink="false">http://www.accuweather.com/en/xk/pristina/298740/daily-weather-forecast/298740?day=1</guid>
|
||||
<description>High: 29 C Low: 13 C Some sun, a t-storm; cooler <img src="http://vortex.accuweather.com/phoenix2/images/common/icons/17_31x31.gif" ></description>
|
||||
<pubDate>Sun, 22 Jul 2012 09:38:43 GMT</pubDate>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>7/23/2012 Forecast</title>
|
||||
<link>http://www.accuweather.com/en/xk/pristina/298740/daily-weather-forecast/298740?day=2</link>
|
||||
<guid isPermaLink="false">http://www.accuweather.com/en/xk/pristina/298740/daily-weather-forecast/298740?day=2</guid>
|
||||
<description>High: 28 C Low: 14 C Variable clouds with t-storms <img src="http://vortex.accuweather.com/phoenix2/images/common/icons/16_31x31.gif" ></description>
|
||||
<pubDate>Sun, 22 Jul 2012 09:38:43 GMT</pubDate>
|
||||
</item>
|
||||
<item>
|
||||
<title>The AccuWeather.com RSS Center</title>
|
||||
<description>To discover additional weather feeds, visit the AccuWeather.com RSS Center at http://www.accuweather.com/en/downloads</description>
|
||||
<link>http://www.accuweather.com/en/downloads</link>
|
||||
<guid isPermaLink="false">http://www.accuweather.com/en/downloads</guid>
|
||||
<pubDate>Sun, 22 Jul 2012 09:38:43 GMT</pubDate>
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
||||
@@ -0,0 +1,348 @@
|
||||
--[[
|
||||
# Clock Rings by Linux Mint (2012) reEdited by Altin.
|
||||
#
|
||||
# This script draws percentage meters as rings, and also draws clock hands if you want! It is fully customisable; all options are described in the script.
|
||||
# This script is based off a combination of my clock.lua script and my rings.lua script.
|
||||
#
|
||||
# IMPORTANT: If you are using the 'cpu' function, it will cause a segmentation fault if it tries to draw a ring straight away.
|
||||
# The if statement on line 324 uses a delay to make sure that this doesn't happen.
|
||||
# It calculates the length of the delay by the number of updates since Conky started.
|
||||
# Generally, a value of 5s is long enough, so if you update Conky every 1s,
|
||||
# use update_num>5 in that if statement (the default).
|
||||
# If you only update Conky every 2s, you should change it to update_num>3;
|
||||
# conversely if you update Conky every 0.5s, you should use update_num>10.
|
||||
# ALSO, if you change your Conky, is it best to use "killall conky; conky" to update it,
|
||||
# otherwise the update_num will not be reset and you will get an error.
|
||||
#
|
||||
# To call this script in Conky, use the following in your conkyrc:
|
||||
#
|
||||
# lua_load ~/.conky/clock01_rings.lua
|
||||
# lua_draw_hook_pre clock_rings
|
||||
#
|
||||
# Changelog:
|
||||
# * v1.0 --> Original release (30.09.2009)
|
||||
# * v1.1p --> Jpope edit londonali1010 (05.10.2009)
|
||||
# * vX 2011mint --> reEdit despot77 (18.02.2011)
|
||||
# * vX 2012 --> Altin reEdit (22.07.2012)
|
||||
# * Added weather function (Accu Weather)
|
||||
# * Added battery monitoring
|
||||
# * Syslog monitoring
|
||||
# * Running processes monitoring
|
||||
# * Rearanged rings
|
||||
# * Exctra network functions/monitoring
|
||||
# * Changed Fonts
|
||||
]]
|
||||
|
||||
settings_table = {
|
||||
{
|
||||
-- Edit this table to customise your rings.
|
||||
-- You can create more rings simply by adding more elements to settings_table.
|
||||
-- "name" is the type of stat to display; you can choose from 'cpu', 'memperc', 'fs_used_perc', 'battery_used_perc'.
|
||||
name='time',
|
||||
-- "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 ''.
|
||||
arg='%I.%M',
|
||||
-- "max" is the maximum value of the ring. If the Conky variable outputs a percentage, use 100.
|
||||
max=12,
|
||||
-- "bg_colour" is the colour of the base ring.
|
||||
bg_colour=0xffffff,
|
||||
-- "bg_alpha" is the alpha value of the base ring.
|
||||
bg_alpha=0.15,
|
||||
-- "fg_colour" is the colour of the indicator part of the ring.
|
||||
fg_colour=0x8fbcbb,
|
||||
-- "fg_alpha" is the alpha value of the indicator part of the ring.
|
||||
fg_alpha=0.3,
|
||||
-- "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.
|
||||
x=100, y=175,
|
||||
-- "radius" is the radius of the ring.
|
||||
radius=50,
|
||||
-- "thickness" is the thickness of the ring, centred around the radius.
|
||||
thickness=5,
|
||||
-- "start_angle" is the starting angle of the ring, in degrees, clockwise from top. Value can be either positive or negative.
|
||||
start_angle=0,
|
||||
-- "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 than start_angle.
|
||||
end_angle=360
|
||||
},
|
||||
|
||||
{
|
||||
name='battery_percent',
|
||||
arg='',
|
||||
max=100,
|
||||
bg_colour=0xffffff,
|
||||
bg_alpha=0.2,
|
||||
fg_colour=0x8fbcbb,
|
||||
fg_alpha=0.8,
|
||||
x=222, y=110,
|
||||
radius=27,
|
||||
thickness=5,
|
||||
start_angle=-90,
|
||||
end_angle=270
|
||||
},
|
||||
|
||||
{
|
||||
name='time',
|
||||
arg='%M.%S',
|
||||
max=60,
|
||||
bg_colour=0xffffff,
|
||||
bg_alpha=0.1,
|
||||
fg_colour=0x8fbcbb,
|
||||
fg_alpha=0.4,
|
||||
x=100, y=175,
|
||||
radius=66,
|
||||
thickness=5,
|
||||
start_angle=0,
|
||||
end_angle=360
|
||||
},
|
||||
{
|
||||
name='time',
|
||||
arg='%S',
|
||||
max=60,
|
||||
bg_colour=0xffffff,
|
||||
bg_alpha=0.1,
|
||||
fg_colour=0x8fbcbb,
|
||||
fg_alpha=0.6,
|
||||
x=100, y=175,
|
||||
radius=72,
|
||||
thickness=5,
|
||||
start_angle=0,
|
||||
end_angle=360
|
||||
},
|
||||
{
|
||||
name='time',
|
||||
arg='%d',
|
||||
max=31,
|
||||
bg_colour=0xffffff,
|
||||
bg_alpha=0.1,
|
||||
fg_colour=0x8fbcbb,
|
||||
fg_alpha=0.8,
|
||||
x=100, y=175,
|
||||
radius=80,
|
||||
thickness=5,
|
||||
start_angle=-90,
|
||||
end_angle=90
|
||||
},
|
||||
{
|
||||
name='time',
|
||||
arg='%m',
|
||||
max=12,
|
||||
bg_colour=0xffffff,
|
||||
bg_alpha=0.1,
|
||||
fg_colour=0x8fbcbb,
|
||||
fg_alpha=1,
|
||||
x=100, y=175,
|
||||
radius=86,
|
||||
thickness=5,
|
||||
start_angle=-90,
|
||||
end_angle=90
|
||||
},
|
||||
{
|
||||
name='cpu',
|
||||
arg='cpu0',
|
||||
max=100,
|
||||
bg_colour=0xffffff,
|
||||
bg_alpha=0.3,
|
||||
fg_colour=0x8fbcbb,
|
||||
fg_alpha=0.8,
|
||||
x=145, y=337,
|
||||
radius=25,
|
||||
thickness=5,
|
||||
start_angle=-90,
|
||||
end_angle=180
|
||||
},
|
||||
{
|
||||
name='cpu',
|
||||
arg='cpu1',
|
||||
max=100,
|
||||
bg_colour=0xffffff,
|
||||
bg_alpha=0.3,
|
||||
fg_colour=0x8fbcbb,
|
||||
fg_alpha=0.8,
|
||||
x=220, y=337,
|
||||
radius=25,
|
||||
thickness=5,
|
||||
start_angle=-90,
|
||||
end_angle=180
|
||||
},
|
||||
{
|
||||
name='fs_used_perc',
|
||||
arg='/',
|
||||
max=100,
|
||||
bg_colour=0xffffff,
|
||||
bg_alpha=0.2,
|
||||
fg_colour=0x8fbcbb,
|
||||
fg_alpha=0.8,
|
||||
x=35, y=590,
|
||||
radius=25,
|
||||
thickness=5,
|
||||
start_angle=-90,
|
||||
end_angle=180
|
||||
},
|
||||
{
|
||||
name='memperc',
|
||||
arg='',
|
||||
max=100,
|
||||
bg_colour=0xffffff,
|
||||
bg_alpha=0.2,
|
||||
fg_colour=0x8fbcbb,
|
||||
fg_alpha=0.8,
|
||||
x=130, y=590,
|
||||
radius=25,
|
||||
thickness=5,
|
||||
start_angle=-90,
|
||||
end_angle=180
|
||||
},
|
||||
{
|
||||
name='swapperc',
|
||||
arg='',
|
||||
max=100,
|
||||
bg_colour=0xffffff,
|
||||
bg_alpha=0.2,
|
||||
fg_colour=0x8fbcbb,
|
||||
fg_alpha=0.8,
|
||||
x=220, y=590,
|
||||
radius=25,
|
||||
thickness=5,
|
||||
start_angle=-90,
|
||||
end_angle=172
|
||||
},
|
||||
}
|
||||
|
||||
-- Use these settings to define the origin and extent of your clock.
|
||||
|
||||
clock_r=65
|
||||
|
||||
-- "clock_x" and "clock_y" are the coordinates of the centre of the clock, in pixels, from the top left of the Conky window.
|
||||
|
||||
clock_x=100
|
||||
clock_y=175
|
||||
|
||||
show_seconds=true -- Change to true if you want the seconds hand
|
||||
|
||||
require 'cairo'
|
||||
|
||||
function rgb_to_r_g_b(colour,alpha)
|
||||
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
|
||||
end
|
||||
|
||||
function window_background(colour,alpha)
|
||||
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
|
||||
end
|
||||
|
||||
function draw_ring(cr,t,pt)
|
||||
local w,h=conky_window.width,conky_window.height
|
||||
|
||||
local xc,yc,ring_r,ring_w,sa,ea=pt['x'],pt['y'],pt['radius'],pt['thickness'],pt['start_angle'],pt['end_angle']
|
||||
local bgc, bga, fgc, fga=pt['bg_colour'], pt['bg_alpha'], pt['fg_colour'], pt['fg_alpha']
|
||||
|
||||
local angle_0=sa*(2*math.pi/360)-math.pi/2
|
||||
local angle_f=ea*(2*math.pi/360)-math.pi/2
|
||||
local t_arc=t*(angle_f-angle_0)
|
||||
|
||||
-- Draw background ring
|
||||
|
||||
cairo_arc(cr,xc,yc,ring_r,angle_0,angle_f)
|
||||
cairo_set_source_rgba(cr,rgb_to_r_g_b(bgc,bga))
|
||||
cairo_set_line_width(cr,ring_w)
|
||||
cairo_stroke(cr)
|
||||
|
||||
-- Draw indicator ring
|
||||
|
||||
cairo_arc(cr,xc,yc,ring_r,angle_0,angle_0+t_arc)
|
||||
cairo_set_source_rgba(cr,rgb_to_r_g_b(fgc,fga))
|
||||
cairo_stroke(cr)
|
||||
end
|
||||
|
||||
function draw_clock_hands(cr,xc,yc)
|
||||
local secs,mins,hours,secs_arc,mins_arc,hours_arc
|
||||
local xh,yh,xm,ym,xs,ys
|
||||
|
||||
secs=os.date("%S")
|
||||
mins=os.date("%M")
|
||||
hours=os.date("%I")
|
||||
|
||||
secs_arc=(2*math.pi/60)*secs
|
||||
mins_arc=(2*math.pi/60)*mins+secs_arc/60
|
||||
hours_arc=(2*math.pi/12)*hours+mins_arc/12
|
||||
|
||||
-- Draw hour hand
|
||||
|
||||
xh=xc+0.76*clock_r*math.sin(hours_arc)
|
||||
yh=yc-0.72*clock_r*math.cos(hours_arc)
|
||||
cairo_move_to(cr,xc,yc)
|
||||
cairo_line_to(cr,xh,yh)
|
||||
|
||||
cairo_set_line_cap(cr,CAIRO_LINE_CAP_ROUND)
|
||||
cairo_set_line_width(cr,5)
|
||||
cairo_set_source_rgba(cr,1.0,1.0,1.0,1.0)
|
||||
cairo_stroke(cr)
|
||||
|
||||
-- Draw minute hand
|
||||
|
||||
xm=xc+0.98*clock_r*math.sin(mins_arc)
|
||||
ym=yc-1.02*clock_r*math.cos(mins_arc)
|
||||
cairo_move_to(cr,xc,yc)
|
||||
cairo_line_to(cr,xm,ym)
|
||||
|
||||
cairo_set_line_width(cr,3)
|
||||
cairo_stroke(cr)
|
||||
|
||||
-- Draw seconds hand
|
||||
|
||||
if show_seconds then
|
||||
xs=xc+1.1*clock_r*math.sin(secs_arc)
|
||||
ys=yc-clock_r*math.cos(secs_arc)
|
||||
cairo_move_to(cr,xc,yc)
|
||||
cairo_line_to(cr,xs,ys)
|
||||
|
||||
cairo_set_line_width(cr,1)
|
||||
cairo_stroke(cr)
|
||||
end
|
||||
end
|
||||
|
||||
function conky_clock_rings()
|
||||
local function setup_rings(cr,pt)
|
||||
local str=''
|
||||
local value=0
|
||||
|
||||
if pt['name'] == 'time' then
|
||||
if pt['arg'] == '%I.%M' then
|
||||
value = math.fmod(os.date("%I"),12) + os.date("%M")/60
|
||||
elseif pt['arg'] == '%M.%S' then
|
||||
value = os.date("%M") + os.date("%S")/60
|
||||
else
|
||||
value = os.date(pt['arg'])
|
||||
end
|
||||
elseif pt['name'] == 'battery_percent' then
|
||||
|
||||
str='${if_existing /sys/class/power_supply/BAT0}${battery_percent BAT0}${else}${if_existing /sys/class/power_supply/BAT1}${battery_percent BAT1}${else}0${endif}${endif}'
|
||||
str=conky_parse(str)
|
||||
value=tonumber(str)
|
||||
|
||||
else
|
||||
str=string.format('${%s %s}',pt['name'],pt['arg'])
|
||||
str=conky_parse(str)
|
||||
value=tonumber(str)
|
||||
end
|
||||
|
||||
pct=value/pt['max']
|
||||
|
||||
draw_ring(cr,pct,pt)
|
||||
end
|
||||
|
||||
-- Check that Conky has been running for at least 5s
|
||||
|
||||
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)
|
||||
|
||||
local cr=cairo_create(cs)
|
||||
|
||||
local updates=conky_parse('${updates}')
|
||||
update_num=tonumber(updates)
|
||||
|
||||
if update_num>5 then
|
||||
for i in pairs(settings_table) do
|
||||
setup_rings(cr,settings_table[i])
|
||||
end
|
||||
end
|
||||
|
||||
draw_clock_hands(cr,clock_x,clock_y)
|
||||
end
|
||||
@@ -0,0 +1,146 @@
|
||||
conky.config = {
|
||||
-- Conky settings #
|
||||
background = false,
|
||||
update_interval = 1,
|
||||
|
||||
cpu_avg_samples = 2,
|
||||
net_avg_samples = 2,
|
||||
|
||||
override_utf8_locale = true,
|
||||
|
||||
double_buffer = true,
|
||||
no_buffers = true,
|
||||
|
||||
text_buffer_size = 2048,
|
||||
--imlib_cache_size 0
|
||||
|
||||
|
||||
-- Window specifications #
|
||||
own_window = true,
|
||||
own_window_type = 'override',
|
||||
own_window_transparent = true,
|
||||
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
|
||||
|
||||
border_inner_margin = 0,
|
||||
border_outer_margin = 5,
|
||||
|
||||
minimum_width = 280, minimum_height = 1080,
|
||||
maximum_width = 520, minimum_height = 1080,
|
||||
|
||||
alignment = 'middle_right',
|
||||
gap_x = 10,
|
||||
gap_y = -80,
|
||||
|
||||
-- Graphics settings #
|
||||
draw_shades = false,
|
||||
draw_outline = false,
|
||||
draw_borders = false,
|
||||
draw_graph_borders = true,
|
||||
|
||||
-- Text settings #
|
||||
use_xft = true,
|
||||
font = 'Roboto:style=Medium:size=10',
|
||||
xftalpha = 0.5,
|
||||
|
||||
uppercase = false,
|
||||
|
||||
-- temperature_unit = 'fahrenheit',
|
||||
temperature_unit = 'celsius',
|
||||
|
||||
-- default_color = 'fbf1c7',
|
||||
-- color0 = 'fbf1c7',
|
||||
-- color1 = 'fbf1c7',
|
||||
default_color = 'fbf1c7',
|
||||
color0 = 'fbf1c7',
|
||||
color1 = 'fbf1c7',
|
||||
|
||||
|
||||
-- network templates
|
||||
if_up_strictness = 'address',
|
||||
|
||||
template0 = [[${color1}\1: $color$alignr${addr \1}
|
||||
${color1}Current: $color${alignr}${execi 10 test -e /sys/class/net/\1 && /sbin/iwconfig \1 | awk '/Bit Rate=/ { sub(/Rate=/,"", $2); print $2 }'} Mbits/sec]],
|
||||
|
||||
template1 = [[
|
||||
${color1}\1: $color$alignr${addr \1}\n]],
|
||||
|
||||
template2 = [[${color1}Down: $color${downspeed \1} k/s ${alignr}${color1}Up:$color ${upspeed \1} k/s
|
||||
${downspeedgraph \1 30,120 000000 88c0d0} ${alignr}${upspeedgraph \1 30,120 000000 88c0d0}$color
|
||||
${color1}Total:$color ${totaldown \1} ${alignr}${color1}\1 ${alignr}${color1}Total:$color ${totalup \1}]],
|
||||
|
||||
template4 = 'ens33',
|
||||
template5 = 'eth1',
|
||||
template6 = 'wlan0',
|
||||
template7 = 'wlan1',
|
||||
|
||||
|
||||
-- wheather templates
|
||||
|
||||
template8 = '~/.conky/nordcore/weather',
|
||||
template9 = '~/.conky/nordcore/weather_raw',
|
||||
|
||||
|
||||
};
|
||||
|
||||
-- fluxbox adjustment``
|
||||
return_code = os.execute('pidof -q fluxbox')
|
||||
if _VERSION == 'Lua 5.1' and math.floor(return_code/256) == 0 or
|
||||
_VERSION ~= 'Lua 5.1' and return_code then
|
||||
conky.config.own_window_transparent = true
|
||||
conky.config.own_window_argb_visual = false
|
||||
end
|
||||
|
||||
conky.text = [[
|
||||
#----------------------------------------------------------------------------------------------------------------------------------------
|
||||
$font${color1}User:$color${alignr}$font$USER
|
||||
# Time and date
|
||||
#----------------------------------------------------------------------------------------------------------------------------------------
|
||||
#----------------------------------------------------------------------------------------------------------------------------------------
|
||||
# Battery Circle
|
||||
#----------------------------------------------------------------------------------------------------------------------------------------
|
||||
#----------------------------------------------------------------------------------------------------------------------------------------
|
||||
# Weather
|
||||
#----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# DISK/RAM/SWAP usage
|
||||
#----------------------------------------------------------------------------------------------------------------------------------------
|
||||
${color FFFFFF}${goto 7}${voffset 32}${fs_used_perc /}%
|
||||
${color1}${goto 7}DISK
|
||||
${color FFFFFF}${goto 102}${voffset -36}${memperc}%
|
||||
${color1}${goto 102}RAM
|
||||
${color FFFFFF}${goto 192}${voffset -37}${swapperc}%
|
||||
${color1}${goto 191}SWAP
|
||||
|
||||
${color1}Root Directory: ${alignr}$color${fs_used /} / ${fs_size /}(${fs_used_perc}%)
|
||||
${color1}${fs_bar 30 /}
|
||||
${color1}Home Directory : ${alignr}$color${fs_used /home} / ${fs_size /home}(${fs_used_perc}%)
|
||||
${color1}${fs_bar 30 /home}
|
||||
#${color1}CPU 1${alignr}$color${cpu cpu1 \1}%
|
||||
#${cpugraph cpu1 \1 000000 88c0d0}
|
||||
#${color1}CPU 2${alignr}$color${cpu cpu2 \1}%
|
||||
#${cpugraph cpu2 \1 000000 88c0d0}
|
||||
#----------------------------------------------------------------------------------------------------------------------------------------
|
||||
# Running processes
|
||||
#----------------------------------------------------------------------------------------------------------------------------------------
|
||||
${color1}${voffset 5}NAME${goto 122}PID${goto 163}CPU%${goto 210}MEM%$color${voffset 5}
|
||||
${top name 1}${goto 115}${top pid 1}${goto 160}${top cpu 1}${goto 205}${top mem 1}
|
||||
${top name 2}${goto 115}${top pid 2}${goto 160}${top cpu 2}${goto 205}${top mem 2}
|
||||
${top name 3}${goto 115}${top pid 3}${goto 160}${top cpu 3}${goto 205}${top mem 3}
|
||||
${top name 4}${goto 115}${top pid 3}${goto 160}${top cpu 4}${goto 205}${top mem 4}
|
||||
${top name 5}${goto 115}${top pid 3}${goto 160}${top cpu 5}${goto 205}${top mem 5}
|
||||
${top name 6}${goto 115}${top pid 6}${goto 160}${top cpu 6}${goto 205}${top mem 6}
|
||||
${top name 7}${goto 115}${top pid 7}${goto 160}${top cpu 7}${goto 205}${top mem 7}
|
||||
${top name 8}${goto 115}${top pid 8}${goto 160}${top cpu 8}${goto 205}${top mem 8}
|
||||
${top name 9}${goto 115}${top pid 9}${goto 160}${top cpu 9}${goto 205}${top mem 9}
|
||||
${top name 10}${goto 115}${top pid 10}${goto 160}${top cpu 10}${goto 205}${top mem 10}
|
||||
#----------------------------------------------------------------------------------------------------------------------------------------
|
||||
# Computer info
|
||||
#----------------------------------------------------------------------------------------------------------------------------------------
|
||||
${color1}${voffset 2}${hr 1}${voffset 5}
|
||||
${color1}Hostname:$color${alignr}${nodename}
|
||||
${color1}OS:$color${alignr}${exec cat /etc/issue}${color1}Machine:$color${alignr}${machine}
|
||||
${color1}Kernel:$color${alignr}${kernel}
|
||||
]];
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 140 KiB |
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
https://github.com/MX-Linux/mx-conky-data/tree/master/MX-CoreBlue
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
sleep 10
|
||||
conky -c ~/.conky/nordcore/conkyrc2core
|
||||
@@ -0,0 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Exec=/home/linuxscoop/.conky/nordcore/start_conky.sh
|
||||
Hidden=false
|
||||
NoDisplay=false
|
||||
X-GNOME-Autostart-enabled=true
|
||||
Name[en_US]=conky
|
||||
Name=conky
|
||||
Comment[en_US]=conky
|
||||
Comment=conky
|
||||
@@ -0,0 +1,8 @@
|
||||
Currently: Partly Sunny: 25C
|
||||
c
|
||||
7/5/2013 Forecast
|
||||
High: 27 C Low: 13 C A couple of thunderstorms
|
||||
k
|
||||
7/6/2013 Forecast
|
||||
High: 24 C Low: 14 C Rain and a thunderstorm
|
||||
i
|
||||
@@ -0,0 +1,56 @@
|
||||
<?xml version = "1.0"?>
|
||||
<rss version="2.0">
|
||||
<channel>
|
||||
<title>Pristina, XK - AccuWeather.com Forecast</title>
|
||||
<link>http://www.accuweather.com/en/xk/pristina/298740/%pagename%/298740</link>
|
||||
|
||||
<description>AccuWeather.com Forecast & Current Conditions</description>
|
||||
<ttl>60</ttl>
|
||||
<copyright>Copyright 2013, AccuWeather, Inc., All rights reserved. For personal use only.</copyright>
|
||||
<pubDate>Fri, 05 Jul 2013 09:12:00 GMT</pubDate>
|
||||
<language>en-us</language>
|
||||
<image>
|
||||
<title>Pristina, XK - AccuWeather.com Forecast</title>
|
||||
<link>/en/xk/pristina/298740/weather-forecast/298740</link>
|
||||
|
||||
<description>AccuWeather.com The Best Weather on the Web!</description>
|
||||
<url>http://vortex.accuweather.com/adc2004/pub/images/logos/adc_logo_187.gif</url>
|
||||
<width>144</width>
|
||||
<height>19</height>
|
||||
</image>
|
||||
<item>
|
||||
<title>Currently: Partly Sunny: 25C</title>
|
||||
<link>http://www.accuweather.com/en/xk/pristina/298740/weather-forecast/298740</link>
|
||||
<guid isPermaLink="false">http://www.accuweather.com/en/xk/pristina/298740/weather-forecast/298740</guid>
|
||||
|
||||
<description>Currently in Pristina, XK: 25 °C and Partly Sunny
|
||||
<img src="http://vortex.accuweather.com/phoenix2/images/common/icons/03_31x31.gif">
|
||||
</description>
|
||||
|
||||
<pubDate>Fri, 05 Jul 2013 09:12:00 GMT</pubDate>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>7/5/2013 Forecast</title>
|
||||
<link>http://www.accuweather.com/en/xk/pristina/298740/daily-weather-forecast/298740?day=1</link>
|
||||
<guid isPermaLink="false">http://www.accuweather.com/en/xk/pristina/298740/daily-weather-forecast/298740?day=1</guid>
|
||||
<description>High: 27 C Low: 13 C A couple of thunderstorms <img src="http://vortex.accuweather.com/phoenix2/images/common/icons/17_31x31.gif" ></description>
|
||||
<pubDate>Fri, 05 Jul 2013 09:12:00 GMT</pubDate>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>7/6/2013 Forecast</title>
|
||||
<link>http://www.accuweather.com/en/xk/pristina/298740/daily-weather-forecast/298740?day=2</link>
|
||||
<guid isPermaLink="false">http://www.accuweather.com/en/xk/pristina/298740/daily-weather-forecast/298740?day=2</guid>
|
||||
<description>High: 24 C Low: 14 C Rain and a thunderstorm <img src="http://vortex.accuweather.com/phoenix2/images/common/icons/18_31x31.gif" ></description>
|
||||
<pubDate>Fri, 05 Jul 2013 09:12:00 GMT</pubDate>
|
||||
</item>
|
||||
<item>
|
||||
<title>The AccuWeather.com RSS Center</title>
|
||||
<description>To discover additional weather feeds, visit the AccuWeather.com RSS Center at http://www.accuweather.com/en/downloads</description>
|
||||
<link>http://www.accuweather.com/en/downloads</link>
|
||||
<guid isPermaLink="false">http://www.accuweather.com/en/downloads</guid>
|
||||
<pubDate>Fri, 05 Jul 2013 09:12:00 GMT</pubDate>
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
||||
Reference in New Issue
Block a user