You are not logged in.
decided to change my conky to a single line topbar one like i saw packrat have i think
hey guys i have a quick question. i am trying to get my cpu temp to change color
so i tried my hand at writing some code.
${color d2cbb9}Temp:${offset 3}${if_match ${execi 20 sensors | awk '/temp1/ {gsub(/\+/,"",$2); gsub(/\..+/,"",$3); print $2}'}<50}${color7}${else}${if_match ${execi 20 sensors | awk '/temp1/ {gsub(/\+/,"",$2); gsub(/\..+/,"",$3); print $2}'}>=70}${color red}${else}${if_match ${execi 20 sensors | awk '/temp1/ {gsub(/\+/,"",$2); gsub(/\..+/,"",$3); print $2}'}>70}${color9}${endif}${endif}${endif}${execi 20 sensors | awk '/temp1/ {gsub(/\+/,"",$2);
this however is very wrong and doesn't work to change the color of anything. any help would be apprciated.
edit:
actually i figured it out after some reading
${color d2cbb9}Temp:${offset 3}${if_match ${hwmon 0 temp 1}<=50}${color7}${else}${if_match ${hwmon 0 temp 1}<=80}${color8}${else}${if_match ${hwmon 0 temp 1}>80}${color9}${endif}${endif}${endif}${hwmon 0 temp 1}°C${color}${offset 15}\
Last edited by mustlearnuse (2013-09-15 15:58:28)
Offline
^ screenshot or it didn't happen 8o
@Sector11 - that will an (even more) awesome end product if you figure out something for the temps.
For your next trick you can have a semi-transparent lua background move across the map for night time ]:D
Last edited by PackRat (2013-09-15 18:24:21)
"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe
Offline
^ dang sorry i forgot here is what i have going
use_xft yes
xftfont Sans:bold:pixelsize=11
xftalpha 0.1
update_interval 1
total_run_times 0
own_window yes
own_window_type desktop
own_window_colour 0A0A0A
own_window_transparent no
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 1600 5
maximum_width 1600
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color
default_shade_color red
default_outline_color green
alignment top_left
gap_x 0
gap_y 5
no_buffers yes
uppercase no
cpu_avg_samples 2
net_avg_samples 1
override_utf8_locale yes
use_spacer none
color0 ffffff
color1 000000
color2 red
color3 yellow
color4 blue
color5 green
color6 orange
color7 00BFFF
color8 FFFF00
color9 F40E0E
TEXT
${goto 20}${color d2cbb9}Uptime: ${uptime_short}${offset 15}${offset 15}\
${color d2cbb9}Battery:${offset 3}${if_match ${battery_percent BAT1}<=15}${color FFFF00}${blink ${battery_percent BAT1}%}${color}${else}${if_match ${battery_percent BAT1}<=33}${color FFA500}${battery_percent BAT1}%${else}${if_match ${battery_percent BAT1}>33}${color7}${battery_percent BAT1}%${endif}${endif}${endif}${offset 15}\
${color d2cbb9}Temp:${offset 3}${if_match ${hwmon 0 temp 1}<=50}${color7}${else}${if_match ${hwmon 0 temp 1}<=80}${color8}${else}${if_match ${hwmon 0 temp 1}>80}${color9}${endif}${endif}${endif}${hwmon 0 temp 1}°C${color}${offset 15}\
${color d2cbb9}MEM:${offset 3}${if_match ${memperc}<=50}${color7}${else}${if_match ${memperc}<=70}${color8}${else}${if_match ${memperc}>70}${color9}${endif}${endif}${endif}$memperc%${color}${offset 12} $mem / $memmax${offset 24}\
${color d2cbb9}Down:${offset 8}${downspeedf wlp3s0} kb/s${offset 12}${offset 12}Up:${offset 8}${upspeedf wlp3s0} kb/s${offset 12}${offset 12}Download:${offset 8}${totaldown wlp3s0}${offset 12}${offset 12}Upload:${offset 8}${totalup wlp3s0}\
${color d2cbb9}${goto 1217}${color d2cbb9}${time %a %b %d / %I:%M %p}
Last edited by mustlearnuse (2013-09-15 19:40:33)
Offline
Hi Sector11!
Thanks again for your nice work. I used a script to display world weather conditions with an xplanet map... I've commented a line just for generate the picture with xplanet and not displaying with "gnome" because I'm openbox user...(The picture is generated in /tmp changing size and projection settings is possible)
Do you think it's possible to use this script without xplanet ? It can take the datas from : http://www.wunderground.com/auto/rss_full/ I don't have enough knowledges in perl to do that... May be someone ?
I show you the script for example (with the commented line):
weather.pl:
#!/usr/bin/perl
# Copyright (c) 2006 John Graham-Cumming
# This file wraps xplanet to produce a background image in GNOME that
# shows the following:
#
# The time in various cities around the world
# A rectangular view of the entire world
# Night time imagery where it is currently dark
# Day time imagery adjusted for the correct season where it is light
# The weather in the same cities from wunderground.com
use strict;
use LWP::Simple;
my $root = '/tmp/';
my @images = ( 'xplanetemp.png', 'xplanetemp2.png' );
my $screen = '1280x720';
my $projection = 'ORTHOGRAPHIC';
my ( $latitude, $longitude ) = ( 47.17,8.36 );
my $config = 'config';
my $marker = 'marker';
my $update = 780;
my $image = 0;
open CONFIG, ">$root$config";
print CONFIG<<EOF;
[earth]
"Earth"
marker_file=$root$marker
night_map=night.jpg
marker_color=DarkGoldenrod1
marker_font=DroidSansMono.ttf
marker_fontsize=8
min_radius_for_label=0
map=/home/raphix/.xplanet/images/earth.jpeg
cloud_map=/home/raphix/.xplanet/images/clouds_2048.jpg
cloud_threshold=0
cloud_gamma=1.25
shade=80
bump_map=/home/raphix/.xplanet/images/bump_H2.png
bump_scale=0.15
magnify=40
EOF
close CONFIG;
my %cities = ( 'Londres' => { lat => 51.50,
lon => -0.17,
tz => 'Europe/London',
loc => '03772',
con => '' },
'Moscou' => { lat => 55.75,
lon => 37.70,
tz => 'Europe/Moscow',
loc => '27612',
con => '' },
'Tokyo' => { lat => 35.75,
lon => 139.50,
tz => 'Asia/Tokyo',
loc => '47671',
con => '' },
'New York' => { lat => 40.70,
lon => -74.00,
tz => 'America/New_York',
loc => 'NY/New_York',
con => '' },
'Los Angeles' => { lat => 34.05,
lon => -118.23,
tz => 'America/Los_Angeles',
loc => 'CA/Los_Angeles',
con => '' },
'Reykjavik' => { lat => 64.15,
lon => -21.97,
tz => 'Atlantic/Reykjavik',
loc => '04030',
con => '' },
'Buenos Aires' => { lat => -34.67,
lon => -58.50,
tz => 'America/Buenos_Aires',
loc => '87582',
con => '' },
'Tunis' => { lat => 36.83,
lon => 10.22,
tz => 'Africa/Tunis',
loc => '60715',
con => '' },
'Hong Kong' => { lat => 22.30,
lon => 114.17,
tz => 'Asia/Hong_Kong',
loc => '45007',
con => '' },
'Horgen' => { lat => 47.17,
lon => 8.36,
tz => 'Europe/Paris',
loc => '06660',
con => '' },
'Ouarzazate' => { lat => 30.83,
lon => -6.16,
tz => 'Africa/Ouarzazate',
loc => '60265',
con => '' },
'Anchorage' => { lat => 61.22,
lon => -149.90,
tz => 'America/Anchorage',
loc => 'AK/Anchorage',
con => '' },
'Bangkok' => { lat => 13.73,
lon => 100.50,
tz => 'Asia/Bangkok',
loc => '48456',
con => '' },
'Berlin' => { lat => 52.53,
lon => 13.42,
tz => 'Europe/Berlin',
loc => '10389',
con => '' },
'Le Caire' => { lat => 30.05,
lon => 31.25,
tz => 'Africa/Cairo',
loc => '62366',
con => '' },
'Cayenne' => { lat => 4.92,
lon => -52.30,
tz => 'America/Cayenne',
loc => '81405',
con => '' },
'Dakar' => { lat => 14.63,
lon => -17.45,
tz => 'Africa/Dakar',
loc => '61641',
con => '' },
'Damas' => { lat => 33.50,
lon => 36.32,
tz => 'Asia/Damascus',
loc => '40080',
con => '' },
'Istanbul' => { lat => 41.03,
lon => 28.95,
tz => 'Asia/Istanbul',
loc => '17060',
con => '' },
'Chicago' => { lat => 41.85,
lon => -87.65,
tz => 'America/Chicago',
loc => 'IL/Chicago',
con => '' },
'San Juan' => { lat => 18.48,
lon => -66.13,
tz => 'America/Puerto_Rico',
loc => '87311',
con => '' },
'La Mecque' => { lat => 21.45,
lon => 39.82,
tz => 'Asia/Riyadh',
loc => '41030',
con => '' },
'Nuuk' => { lat => 64.18,
lon => -51.75,
tz => 'WGST/Nuuk',
loc => '04250',
con => '' },
'Auckland' => { lat => -36.92,
lon => 174.78,
tz => 'Pacific/Auckland',
loc => '93119',
con => '' },
'Darwin' => { lat => -12.38,
lon => 130.73,
tz => 'Australia/Darwin',
loc => '94120',
con => '' },
'Delhi' => { lat => 28.67,
lon => 77.22,
tz => 'Asia/Calcutta',
loc => '42182',
con => '' },
'Fortaleza' => { lat => -3.75,
lon => -38.58,
tz => 'America/Fortaleza',
loc => '82397',
con => '' },
'Houston' => { lat => 29.75,
lon => -95.35,
tz => 'America/Chicago',
loc => 'TX/Houston',
con => '' },
'Kabul' => { lat => 34.52,
lon => 69.18,
tz => 'Asia/Kabul',
loc => '40948',
con => '' },
'Havana' => { lat => 23.17,
lon => -82.35,
tz => 'America/Havana',
loc => '78224',
con => '' },
'Kathmandu' => { lat => 27.70,
lon => 85.32,
tz => 'Asia/Katmandu',
loc => '44454',
con => '' },
'Kinshasa' => { lat => -4.30,
lon => 15.30,
tz => 'Africa/Kinshasa',
loc => '64210',
con => '' },
'Washington' => { lat => 38.88,
lon => -77.03,
tz => 'America/Washington',
loc => 'DC/Washington',
con => '' },
'Jerusalem' => { lat => 31.76,
lon => 35.23,
tz => 'Asia/Jerusalem',
loc => '40184',
con => '' },
'NDjamena' => { lat => 12.17,
lon => 14.98,
tz => 'Africa/Ndjamena',
loc => '64700',
con => '' },
'Cap de bonne Espérance' => { lat => -33.93,
lon => 18.47,
tz => 'Africa/Johannesburg',
loc => '68816',
con => '' },
);
my $weather_countdown = 0;
while ( 1 ) {
my $uptime = `uptime`;
chomp $uptime;
if ( $weather_countdown == 0 ) {
get_all_weather();
$weather_countdown = 30;
}
--$weather_countdown;
open MARKER, ">$root$marker";
print MARKER<<EOF;
-80 -45 "$uptime"
EOF
foreach my $city (sort keys %cities) {
my $con = ( $city =~ /London|Paris/)?$cities{$city}{con}:'';
my $lat1 = $cities{$city}{lat}-2;
print MARKER<<EOF;
$cities{$city}{lat} $cities{$city}{lon} "$city %H:%M $con" timezone=$cities{$city}{tz}
EOF
if ( $con eq '' ) {
print MARKER<<EOF;
$lat1 $cities{$city}{lon} "$cities{$city}{con}" symbolsize=0
EOF
}
}
close MARKER;
system( "xplanet -num_times 1 -output $root$images[$image] -geometry $screen -longitude $longitude -latitude $latitude -projection $projection -config $root$config" );
#system( "gconftool-2 -t str -s /desktop/gnome/background/picture_filename $root$images[$image]" );
$image = 1 - $image;
unlink( "$root$images[$image]" );
sleep( $update );
}
sub get_weather
{
my ( $location ) = @_;
my $base = 'http://www.wunderground.com/auto/rss_full/';
my $url = $base;
if ( $location =~ /\d/ ) {
$url .= 'global/stations/';
}
$url .= "${location}.xml?units=both";
my $weather = get( $url );
my $conditions;
if ( $weather =~
/Temperature: [^\/]+ \/ (-?\d+)[^\|]+ \| .+ \| Conditions: ([^\|]+) \|/ ) {
$conditions = "($1C: $2)";
}
return $conditions;
}
sub get_all_weather
{
foreach my $city (sort keys %cities) {
$cities{$city}{con} = get_weather( $cities{$city}{loc} );
print "$city weather is $cities{$city}{con}\n";
}
}
An example with a rectangular projection :
The clouds map is not true, It was just for generate an example...
Last edited by ragamatrix (2013-09-15 20:02:53)
Offline
ragamatrix & S11 Beautiful job you two!..
You could add weather icons.. I didn't look at the code, but if using v9000 and a button script we could get crazy with it.
Peachy's Wun Lua / Peachy's v9000 / Conky PitStop / My DA Page
........
Offline
@ PackRat
Forecast hi/low and condition temps are in the making as I type this.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Hi Sector11!
An example with a rectangular projection :
http://s13.postimg.org/aeaj9x8qr/xplanetemp.jpg
The clouds map is not true, It was just for generate an example...
Awesome ... I think that blows my work away!
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
ragamatrix & S11 Beautiful job you two!..
You could add weather icons.. I didn't look at the code, but if using v9000 and a button script we could get crazy with it.
I think mrpeachy told me once that v9000 only does one city.
I have weather started with a bash script thanks to Teo though!
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
@Sector 11
Hello;
Your world map background link is "dead" or it gives me an error... I will play with the blue one to try and show you something.
Offline
I will play with the blue one to try and show you something.
Doesn't work because I can't do the maps are the same... I'm too bad with gimp to make them exactly the same...
The bad result:
I'd like this image : exactly supperimpose with this one :
but I can't. Is it because there are completly différents ?
Last edited by ragamatrix (2013-09-16 10:48:43)
Offline
^ looks like the map projections are different so they won't superimpose. Are there options for different map projections from your weather site?
"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe
Offline
Offline
@Sector 11
Hello;
Your world map background link is "dead" or it gives me an error... I will play with the blue one to try and show you something.
OK, those two posts with links have been fixed ... but they point to the 1920x1080 image. others will have to use tin.eye to find variations.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
@ ragamatrix - PackRat is on the right idea.
The "blue" world maps are 'flat maps' (for the sake of a name) designed for maps in schools etc to show general locations.
The third map is an oval distortion to show things in a more realistic light, the curve of Ellesmere Island to the left of Greenland that looks squashed - because of the curvature of the earth. It is a "better" representation of how the the continents actually look.
Note: I said better ... it's not possible to get a TRUE representation of 'everything' on a map. And even then better is an opinion based on - what's it used for?
As is this:
Different maps for different uses.
While 'way' beyond the scope of this thread, Choosing a projection is an interesting read. Sorry but it is in English.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
I tried to make something "lighter" with the background integration. Thanks for Sector11 advices
http://s17.postimg.org/9kqzqrqmz/Board_Compo.jpg
@PackRat
I must think another way... I didn't find a solution for this future project
I like that. Looks good!
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Another idea...
I've modified a world map and convert it in .png (to use transparency) for using on differents backgrounds... ?
Here's the 1920x1080:
world_png_map
Last edited by ragamatrix (2013-09-16 16:29:55)
Offline
^ I have done the same, have various versions as well.
OK, here we go with a GIMPed version of the grunge_scrached map:
World Times Conky for 1920x1080 screen
Conky has been tweaked a bit so here it is:
# killall conky && conky -c /media/5/Conky/ragamatrix_Map/Map_Time_LG.conky &
# From and idea started by ragamatrix
# http://crunchbang.org/forums/viewtopic.php?pid=331813#p331813
# grunge_earth_scratches.jpg
### Begin Window Settings ##################################################
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_colour 000000
own_window_class Conky
own_window_title S11
# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes
### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type normal
# own_window_argb_visual yes
### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 0
minimum_size 1780 940 ## width, height
maximum_width 1780 ## width
gap_x 120 # left-right
gap_y 80 # up-down
alignment tl
################################################### End Window Settings ###
### Font Settings #########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Monofur:bold:size=11
# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes
uppercase no
###################################################### End Font Settings ###
### Color Settings #########################################################
draw_shades yes #no # amplifies text if yes
default_shade_color 000000
draw_outline no # amplifies text if yes
default_outline_color 000000
default_color FFFFE0 #255 255 224 LightYellow FAFAD2 #250 250 210 LightGoldenrodYellow DCDCDC #220 220 220 Gainsboro
color0 8FBC8F #143 188 143 DarkSeaGreen
color1 778899 #119 136 153 LightSlateGray
color2 D8BFD8 #216 191 216 Thistle
color3 9ACD32 #154 205 50 YellowGreen
color4 FFA07A #255 160 122 LightSalmon
color5 FFDEAD #255 222 173 NavajoWhite
color6 00BFFF # 0 191 255 DeepSkyBlue
color7 5F9EA0 # 95 158 160 CadetBlue
color8 BDB76B #189 183 107 DarkKhaki
color9 CD5C5C #205 92 92 IndianRed
##################################################### End Color Settings ###
### Borders Section ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 4
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders no #yes
#default_graph_size 15 40
##################################################### End Borders Secton ###
### Miscellaneous Section ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background no
# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer none
# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
#text_buffer_size 256
# Subtract (file system) buffers from used memory?
no_buffers yes
# change GiB to G and MiB to M
short_units yes
# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2
# Maximum size of user text buffer, i.e. layout below TEXT line in config file
# (default is 16384 bytes)
# max_user_text 16384
# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit
############################################## End Miscellaneous Section ###
# lua_load /media/5/Conky/LUA/draw-bg.lua
# lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.1
update_interval 1
TEXT
${goto 635}${tztime America/Anchorage %a %d %b %Y} ${color1}Seconds: ${time %S}${color6} ${tztime NZ %a %d %b %Y}${color}
${voffset -3}${goto 530}${if_match ${tztime Canada/Eastern %d} == ${tztime NZ %d}}${color6}° Alert ${tztime Canada/Eastern %R}${color}${else}° Alert ${tztime Canada/Eastern %R}${endif}${voffset 3}
${goto 880}${if_match ${tztime Arctic/Longyearbyen %d} == ${tztime NZ %d}}${color6}° Longyearbyen ${tztime Arctic/Longyearbyen %R}${color}${else}° Longyearbyen ${tztime Arctic/Longyearbyen %R}${endif}
${goto 573}${if_match ${tztime America/Godthab %d} == ${tztime NZ %d}}${color6}° Nuuk ${tztime America/Godthab %R}${color}${else}° Nuuk ${tztime America/Godthab %R}${endif}\
${goto 710}${if_match ${tztime Atlantic/Reykjavik %d} == ${tztime NZ %d}}${color6}° Reykjavik ${tztime Atlantic/Reykjavik %R}${color}${else}° Reykjavik ${tztime Atlantic/Reykjavik %R}${endif}
${voffset 5}${goto 130}${if_match ${tztime America/Anchorage %d} == ${tztime NZ %d}}${color6}° Anchorage ${tztime America/Anchorage %R}${color}${else}° Anchorage ${tztime America/Anchorage %R}${endif}${voffset -5}\
${voffset -10}${goto 290}${if_match ${tztime America/Yellowknife %d} == ${tztime NZ %d}}${color6}° Yellowknife ${tztime America/Yellowknife %R}${color}${else}° Yellowknife ${tztime America/Yellowknife %R}${endif}${voffset 10}\
${voffset 12}${goto 783}${if_match ${tztime Europe/Oslo %d} == ${tztime NZ %d}}${color6}Oslo ${tztime Europe/Oslo %R} °${color}${else}Oslo ${tztime Europe/Oslo %R} °${endif}${voffset -12}
${goto 890}${if_match ${tztime Europe/Stockholm %d} == ${tztime NZ %d}}${color6}° Stockholm ${tztime Europe/Stockholm %R}${color}${else}° Stockholm ${tztime Europe/Stockholm %R}${endif}
${voffset -5}${goto 382}${if_match ${tztime America/Churchill %d} == ${tztime NZ %d}}${color6}° Churchill ${tztime America/Churchill %R}${color}${else}° Churchill ${tztime America/Churchill %R}${endif}${voffset 5}
${voffset -5}${goto 865}${if_match ${tztime Europe/Copenhagen %d} == ${tztime NZ %d}}${color6}° Copenhagen ${tztime Europe/Copenhagen %R}${color}${else}° Copenhagen ${tztime Europe/Copenhagen %R}${endif}${voffset 5}
${goto 290}${if_match ${tztime America/Edmonton %d} == ${tztime NZ %d}}${color6}° Edmonton ${tztime America/Edmonton %R}${color}${else}° Edmonton ${tztime America/Edmonton %R}${endif}\
${goto 535}${if_match ${tztime America/Goose_Bay %d} == ${tztime NZ %d}}${color6}° Goose Bay ${tztime America/Goose_Bay %R}${color}${else}° Goose Bay ${tztime America/Goose_Bay %R}${endif}
${voffset 12}${goto 367}${if_match ${tztime America/Winnipeg %d} == ${tztime NZ %d}}${color6}° Winnipeg ${tztime America/Winnipeg %R}${color}${else}° Winnipeg ${tztime America/Winnipeg %R}${endif}${voffset -12}${voffset -5}${goto 718}${if_match ${tztime UTC %d} == ${tztime NZ %d}}${color6}London ${tztime UTC %R} °${color}${else}London ${tztime UTC %R} °${endif}${voffset 5}
${voffset 2}${goto 140}${if_match ${tztime Canada/Pacific %d} == ${tztime NZ %d}}${color6}Vancouver ${tztime Canada/Pacific %R} °${color}${else}Vancouver ${tztime Canada/Pacific %R} °${endif}${voffset -2}\
${goto 820}${if_match ${tztime Europe/Paris %d} == ${tztime NZ %d}}${color6}° Paris ${tztime Europe/Paris %R}${color}${else}° Paris ${tztime Europe/Paris %R}${endif}
${voffset -1}${goto 567}${if_match ${tztime Canada/Newfoundland %d} == ${tztime NZ %d}}${color6}° St. John's ${tztime Canada/Newfoundland %R}${color}${else}° St. John's ${tztime Canada/Newfoundland %R}${endif}${voffset 1}
${goto 395}${if_match ${tztime America/Toronto %d} == ${tztime NZ %d}}${color6}Toronto ° ${tztime America/Toronto %R}${color}${else}Toronto ° ${tztime America/Toronto %R}${endif}\
${voffset -5}${goto 520}${if_match ${tztime America/Halifax %d} == ${tztime NZ %d}}${color6}°${voffset 5}Halifax ${tztime America/Halifax %R}${voffset -5}${color}${else}°${voffset 5}Halifax ${tztime America/Halifax %R}${voffset -5}${endif}${voffset 5}
${voffset -5}${goto 865}${if_match ${tztime Europe/Rome %d} == ${tztime NZ %d}}${color6}° Rome ${tztime Europe/Rome %R}${color}${else}° Rome ${tztime Europe/Rome %R}${endif}${voffset 5}
${voffset -3}${goto 468}${if_match ${tztime America/New_York %d} == ${tztime NZ %d}}${color6}° New York ${tztime America/New_York %R}${color}${else}° New York ${tztime America/New_York %R}${endif}${voffset 3}\
${voffset -8}${goto 790}${if_match ${tztime Europe/Madrid %d} == ${tztime NZ %d}}${color6}° Madrid ${tztime Europe/Madrid %R}${color}${else}° Madrid ${tztime Europe/Madrid %R}${endif}${voffset 8}
${voffset -10}${goto 915}${if_match ${tztime Europe/Athens %d} == ${tztime NZ %d}}${color6}° Athens ${tztime Europe/Athens %R}${color}${else}° Athens ${tztime Europe/Athens %R}${endif}${voffset 10}
${goto 270}${if_match ${tztime America/Los_Angeles %d} == ${tztime NZ %d}}${color6}° Los Angeles ${tztime America/Los_Angeles %R}${color}${else}° Los Angeles ${tztime America/Los_Angeles %R}${endif}${voffset -10}\
${goto 1448}${if_match ${tztime Asia/Tokyo %d} == ${tztime NZ %d}}${color6}° Tokyo ${tztime Asia/Tokyo %R}${color}${else}° Tokyo ${tztime Asia/Tokyo %R}${endif}${voffset 10}
${voffset 5}${goto 953}${if_match ${tztime Africa/Cairo %d} == ${tztime NZ %d}}${color6}° Cairo ${tztime Africa/Cairo %R}${color}${else}° Cairo ${tztime Africa/Cairo %R}${endif}${voffset -5}\
${goto 1366}${if_match ${tztime Asia/Shanghai %d} == ${tztime NZ %d}}${color6}° Shanghai ${tztime Asia/Shanghai %R}${color}${else}° Shanghai ${tztime Asia/Shanghai %R}${endif}
${goto 1170}${if_match ${tztime GMT-5:30 %d} == ${tztime NZ %d}}${color6}° New Delhi ${tztime GMT-5:30 %R}${color}${else}° New Delhi ${tztime GMT-5:30 %R}${endif}
${goto 440}${if_match ${tztime US/Eastern %d} == ${tztime NZ %d}}${color6}° Miami ${tztime US/Eastern %R}${color}${else}° Miami ${tztime US/Eastern %R}${endif}\
${goto 1065}${if_match ${tztime Africa/Djibouti %d} == ${tztime NZ %d}}${color6}° Djibouti ${tztime Africa/Djibouti %R}${color}${else}° Djibouti ${tztime Africa/Djibouti %R}${endif}
${goto 435}${if_match ${tztime America/Havana %d} == ${tztime NZ %d}}${color6}° Havana ${tztime America/Havana %R}${color}${else}° Havana ${tztime America/Havana %R}${endif}\
${goto 1328}${if_match ${tztime Hongkong %d} == ${tztime NZ %d}}${color6}° Hong Kong ${tztime Hongkong %R}${color}${else}° Hong Kong ${tztime Hongkong %R}${endif}
${goto 260}${if_match ${tztime America/Mexico_City %d} == ${tztime NZ %d}}${color6}Mexico ${tztime America/Mexico_City %R} °${color}${else}Mexico ${tztime America/Mexico_City %R} °${endif}
${voffset -3}${goto 735}${if_match ${tztime Africa/Dakar %d} == ${tztime NZ %d}}${color6}° Dakar ${tztime Africa/Dakar %R}${color}${else}° Dakar ${tztime Africa/Dakar %R}${endif}${voffset 3}
${goto 880}${voffset 11}${if_match ${tztime Africa/Ndjamena %d} == ${tztime NZ %d}}${color6}° N'Djamena ${tztime Africa/Ndjamena %R}${color}${else}° N'Djamena ${tztime Africa/Ndjamena %R}${endif}${voffset -11}
${voffset 5}${goto 500}${if_match ${tztime America/Caracas %d} == ${tztime NZ %d}}${color6}° Caracas ${tztime America/Caracas %R}${color}${else}° Caracas ${tztime America/Caracas %R}${endif}${voffset -5}${voffset -5}\
${goto 1005}${if_match ${tztime Africa/Djibouti %d} == ${tztime NZ %d}}${color6}° Djibouti ${tztime Africa/Djibouti %R}${color}${else}° Djibouti ${tztime Africa/Djibouti %R}${endif}${voffset 5}
${goto 1285}${if_match ${tztime Asia/Singapore %d} == ${tztime NZ %d}}${color6}° Singapore ${tztime Asia/Singapore %R}${color}${else}° Singapore ${tztime Asia/Singapore %R}${endif}
${goto 457}${if_match ${tztime America/Lima %d} == ${tztime NZ %d}}${color6}° Lima ${tztime America/Lima %R}${color}${else}° Lima ${tztime America/Lima %R}${endif}${voffset -5}\
${goto 1481}${if_match ${tztime Pacific/Port_Moresby %d} == ${tztime NZ %d}}${color6}° Port Moresby ${tztime Pacific/Port_Moresby %R}${color}${else}° Port Moresby ${tztime Pacific/Port_Moresby %R}${endif}${voffset 5}
${voffset -3}${goto 1407}${if_match ${tztime Australia/Darwin %d} == ${tztime NZ %d}}${color6}° Darwin ${tztime Australia/Darwin %R}${color}${else}° Darwin ${tztime Australia/Darwin %R}${endif}${voffset 3}
${voffset 9}${goto 1620}${if_match ${tztime Pacific/Fiji %d} == ${tztime NZ %d}}${color6}° Suva ${tztime Pacific/Fiji %R}${color}${else}° Suva ${tztime Pacific/Fiji %R}${endif}${voffset -9}
${goto 1025}${if_match ${tztime Indian/Antananarivo %d} == ${tztime NZ %d}}${color6}° Antananarivo ${tztime Indian/Antananarivo %R}${color}${else}° Antananarivo ${tztime Indian/Antananarivo %R}${endif}
${goto 615}${if_match ${tztime Brazil/East %d} == ${tztime NZ %d}}${color6}° Rio de Janeiro ${tztime Brazil/East %R}${color}${else}° Rio de Janeiro ${tztime Brazil/East %R}${endif}
${voffset -2}${goto 1505}${if_match ${tztime Australia/Brisbane %d} == ${tztime NZ %d}}${color6}° Brisbane ${tztime Australia/Brisbane %R}${color}${else}° Brisbane ${tztime Australia/Brisbane %R}${endif}${voffset 2}
${goto 484}${if_match ${tztime Chile/Continental %d} == ${tztime NZ %d}}${color6}° Santiago ${tztime Chile/Continental %R}${color}${else}° Santiago ${tztime Chile/Continental %R}${endif}${voffset -3}\
${goto 1340}${if_match ${tztime Australia/Perth %d} == ${tztime NZ %d}}${color6}° Perth ${tztime Australia/Perth %R}${color}${else}° Perth ${tztime Australia/Perth %R}${endif}${voffset 3}
${goto 545}${if_match ${tztime America/Buenos_Aires %d} == ${tztime NZ %d}}${color6}° Buenos Aires ${tztime America/Buenos_Aires %R}${color}${else}° Buenos Aires ${tztime America/Buenos_Aires %R}${endif}\
${goto 895}${voffset -10}${if_match ${tztime Africa/Johannesburg %d} == ${tztime NZ %d}}${color6}° Cape Town ${tztime Africa/Johannesburg %R}${color}${else}° Cape Town ${tztime Africa/Johannesburg %R}${endif}${voffset 10}
${goto 1470}${if_match ${tztime Australia/Melbourne %d} == ${tztime NZ %d}}${color6}° Melborne ${tztime Australia/Melbourne %R}${color}${else}° Melborne ${tztime Australia/Melbourne %R}${endif}
${voffset 1}${goto 1596}${color6}° Christchurch ${tztime NZ %R}${color}${voffset -1}
${goto 500}${if_match ${tztime America/Argentina/Ushuaia %d} == ${tztime NZ %d}}${color6}° Ushuaia ${tztime America/Argentina/Ushuaia %R}${color}${else}° Ushuaia ${tztime America/Argentina/Ushuaia %R}${endif}
And a version with World Weather thanks to Teo - Get it here
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
@Sector11
Well done for the global-weathermap-conky !! really nice (I'll try it soon)
When radiotray is inactive a slide-show with little pics covers, I add a little bash script in the radiotray conky.
slide-show each 30s:
radiotray active:
(you just have to put your all covers in /slidecovers and put your right paths)
image.sh:
#! /bin/bash
line=$(($RANDOM%`ls /home/raphix/.conky/slidecovers/ | wc -l`))
line=$((line + 1))
ls /home/raphix/.conky/slidecovers/ | nl | while read a b
do
[ "$a" = "$line" ] && { cp /home/raphix/.conky/slidecovers/"$b" /home/raphix/.conky/image; }
done
convert ~/.conky/image ~/.conky/image.png
convert ~/.conky/image.png -resize 200x200\! ~/.conky/image.png
exit 0
ConkyRadioCovers:
# killall conky && conky -c /media/5/conky/Radiotray.conky &
### Begin Window Settings ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
# Use the Xdbe extension? (eliminates flicker)
# It is highly recommended to use own window with this one
# so double buffer won't be so big.
double_buffer yes
own_window_type normal #override
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# own_window_colour #4d4d4d
own_window_class test 221
own_window_title test 221
### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### own_window_type override
# own_window_argb_visual yes
### When ARGB visuals are enabled, this use this to modify the alpha value
### Use: own_window_type normal
### Use: own_window_transparent no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 150
minimum_size 130 140 ## width, height
maximum_width 130 ## width, usually a good idea to equal minimum width
gap_x 137 ### left &right
gap_y 295 ### up & down
alignment tl
#################################################### End Window Settings ###
### Font Settings ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
#xftfont Anonymous Pro:size=9
#xftfont WenQuanYi Micro Hei Mono:bold:size=8
xftfont Monofur:bold:size=9
# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1
# Force UTF8? requires XFT ###
override_utf8_locale yes
draw_shades no #### <<<<<<------------------To see it easier on light screens.
#default_shade_color black
draw_outline no #### <<<<<<---------------- Amplifies text if yes
default_outline_color black
UPPERcase no
###################################################### End Font Settings ###
### Color Settings #########################################################
default_shade_color gray
default_outline_color black
default_color DCDCDC #Gainsboro
color0 ffe595 #Teo Gold
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan #48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red #A52A2A #DarkRed
##################################################### End Color Settings ###
### Borders Section ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 5
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders no
##################################################### End Borders Secton ###
### Miscellaneous Section ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background no
# Adds spaces around certain objects to stop them from moving other things
# around, this only helps if you are using a mono font
# Options: right, left or none
use_spacer right
# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 256
# Subtract (file system) buffers from used memory?
no_buffers yes
# change GiB to G and MiB to M
short_units yes
# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2
# Maximum size of user text buffer, i.e. layout below TEXT line in config file
# (default is 16384 bytes)
# max_user_text 16384
############################################## End Miscellaneous Section ###
### LUA Settings ###########################################################
## Above and After TEXT - requires a composite manager or blinks.
##
# lua_load ~/Conky/LUA/draw-bg.lua
#TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}
#
## ${lua conky_draw_bg corner_radius x_position y_position width height color alpha}
##
## OR Both above TEXT (No composite manager required - no blinking!)
#
lua_load ~/.conky/conky32/draw_bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.5
lua_load ~/.conky/script/image.lua
#
####################################################### End LUA Settings ###
#digiThe all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1 # in seconds
# stuff after 'TEXT' will be formatted on screen
TEXT
${if_match "${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray net.sourceforge.radiotray.getCurrentRadio}" == "not playing"}${execi 30 /home/raphix/.conky/script/image.sh}${lua conky_fDrawImage /home/raphix/.conky/image.png 30 30 100 100}${else}Radio: ${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray net.sourceforge.radiotray.getCurrentRadio}
${color white}Artist: ${color B0E0E6}${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray getCurrentMetaData| fold -s -w20}${color}${endif}
forgot one:
image.lua:
require 'cairo'
home = os.getenv ('HOME')
--Fonction d'affichage
function conky_fDrawImage(path,x,y,w,h,arc)
path = string.gsub(path, "~", home)
path = string.gsub(path, "$HOME", home)
local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
local function fDrawImage(path,x,y,w,h,arc)
x=x+(w/2)
y=y+(h/2)
local img = cairo_image_surface_create_from_png(path)
local w_img, h_img = cairo_image_surface_get_width (img), cairo_image_surface_get_height (img)
local cr = cairo_create (cs)
cairo_translate (cr, x, y)
if arc then
cairo_rotate (cr, arc)
end
cairo_scale (cr, w/w_img, h/h_img)
cairo_set_source_surface (cr, img, -w_img/2, -h_img/2)
cairo_paint (cr)
cairo_destroy(cr)
cairo_surface_destroy (img)
end
fDrawImage(path,x,y,w,h,arc)
cairo_surface_destroy(cs)
return ""
end
Last edited by ragamatrix (2013-09-17 13:04:15)
Offline
Nice little slide show ragamatrix. I'll have to look at that.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
COnky stopped showing data on desktop when I run conky on a terminal I get the information there. I dont know where to find any hint to debug...
I am using default conkyrc
# note that the $xmms2_* and $mpd_* stuff will only work if you have support for them built into conky
TEXT
$nodename - $sysname $kernel on $machine
$hr
${color grey}Uptime:$color $uptime
${color grey}Frequency (in MHz):$color $freq
${color grey}Frequency (in GHz):$color $freq_g
${color grey}RAM Usage:$color $mem/$memmax - $memperc% ${membar 4}
${color grey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar 4}
${color grey}CPU Usage:$color $cpu% ${cpubar 4}
${color grey}Processes:$color $processes ${color grey}Running:$color $running_processes
$hr
${color grey}File systems:
/ $color${fs_free /}/${fs_size /} ${fs_bar 6 /}
${color grey}Networking:
Up:$color ${upspeed eth0} k/s${color grey} - Down:$color ${downspeed eth0} k/s
$hr
${color grey}MPD: $mpd_status $mpd_artist - $mpd_title from $mpd_album at $mpd_vol
Bitrate: $mpd_bitrate\n" "Progress: $mpd_bar
${color grey}XMMS2: $xmms2_status $xmms2_artist - $xmms2_title from $xmms2_album
Progress: $xmms2_bar
${color grey}Name PID CPU% MEM%
${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${tail /var/log/Xorg.0.log 3}";
I tried doing a killall conky and after I restarted did a ps -e | grep conky and got that conky and conkywonky are running... still I dont see anything on the desktop.
When I execute conkywonky, I get all the data I'm supposed to see but in terminal.
Any idea where can I debug?
Offline
This might be what you're looking for:
conky -DD
-DD is for DEBUGIFICATEMODETIME
Offline
When I execute conkywonky, I get all the data I'm supposed to see but in terminal.
Any idea where can I debug?
First lets try a process of elimination - try this:
I added a closing } to everything and eliminated the non-standard stuff at the end.
TEXT
${nodename} - ${sysname} ${kernel} on ${machine}
${hr}
${color grey}Uptime:${color} ${uptime}
${color grey}Frequency (in MHz):${color} ${freq}
${color grey}Frequency (in GHz):${color} ${freq_g}
${color grey}RAM Usage:${color} ${mem}/${memmax} - ${memperc}% ${membar 4}
${color grey}Swap Usage:${color} ${swap}/${swapmax} - ${swapperc}% ${swapbar 4}
${color grey}CPU Usage:${color} ${cpu}% ${cpubar 4}
${color grey}Processes:${color} ${processes} ${color grey}Running:${color} ${running_processes}
${hr}
${color grey}File systems:
/ ${color}${fs_free /}/${fs_size /} ${fs_bar 6 /}
${color grey}Networking:
Up:${color} ${upspeed eth0} k/s${color grey} - Down:${color} ${downspeed eth0} k/s
${hr}
${color grey}Name PID CPU% MEM%
${color lightgrey} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color lightgrey} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${tail /var/log/Xorg.0.log 3}
Without the ending
${color grey}MPD: ${mpd_status} ${mpd_artist} - ${mpd_title from ${mpd_album} at ${mpd_vol}
Bitrate: ${mpd_bitrate\n} Progress: ${mpd_bar}
${color grey}XMMS2: ${xmms2_status} ${xmms2_artist} - ${xmms2_title} from ${xmms2_album}
Progress: ${xmms2_bar}
Why?
Bitrate: $mpd_bitrate\n" "Progress: $mpd_bar
the " " in that line?
and the "; ending?
${tail /var/log/Xorg.0.log 3}";
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Today i've released my first skin! Due to time issues it's not polished but it's certainly usable.
link: http : //n00by4ever.deviantart.com /art/ conkyBar-401254455
http : //fc02.deviantart.net /fs70/f/2013/262/f/3/ conkybar_by_n00by4ever-d6mw9x3.png
moderator edit: screenshot links obfuscated; may be considered NSFW
edit: sorry about the possible NSFW, it's none nude
Last edited by iami (2013-09-19 15:19:48)
Offline
Offline
Cool find! Looks like an opportunity for HUD-style setup.
A custom compile of compton with the fade in animation doing a "flicker" would be awesome with this.
Offline
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat