You are not logged in.
whoops
We all do it sometimes. One has to learn to at SELF.
Last edited by Sector11 (2014-03-10 19:13:30)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
OK, it's Sunday and between other things I worked on a rather simple conky.
First I made a semi-transparent 8's image with a transparent background and then applied it in a conky. Once that was done I did the same idea but just using text.
TEXT
${image /home/sector11/images/888888_50.png -p 0,0}${voffset 1}${font Digit:size=50}${color6}${goto 6}${time %d} ${time %m} ${time %y}${goto 331}${time %T}${font monofur:bold:size=8}
${color7}${goto 038}DAY${goto 120}MONTH${goto 212}YEAR${goto 0360}HRS${goto 0445}MINS${goto 0532}SECS
${color 2f2f2f}${font Digit:size=150}${goto 001}88 88 88${goto 1150}88:88:88\
${color6}${goto 001}${time %d} ${time %m} ${time %y}${goto 1150}${time %T}${font monofur:bold:size=10}
${color7}${goto 110}DAY${goto 365}MONTH${goto 640}YEAR${goto 1255}HRS${goto 1515}MINS${goto 1770}SECS
Here's the image: 888888_50.png
Last edited by Sector11 (2014-03-10 22:00:20)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
A simple clock. Nothing new. More of a long time no conky OCD thing
A poster in Arch screenshot thread had a wallpaper like this. It wasn't a clock, so I decided to make one.
Just a matter of copying mrpeachy's out function. My umpteenth conky that does that
--[[
text_clock.lua
easysid
Wednesday 12 March 2014 1250 IST
lua script for the text clock. 12 hr format. Hours in words, mins in numbers.
No big deal. Just create a hash table with 12 entries.
out() copied from v9000 weather conky. Courtesy mrpeachy
]]--
require 'cairo'
function conky_main()
local hours_table = {'ONE', 'TWO', 'THREE', 'FOUR', 'FIVE', 'SIX', 'SEVEN', 'EIGHT', 'NINE', 'TEN', 'ELEVEN', 'TWELVE'}
--Do customisation here
default_font = 'champagne & limousines'
default_font_size = 20
default_color = 0xdddddd
default_hj = 'c'
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)
-- Start drawing
local H = hours_table[tonumber(os.date('%I'))]
local M = os.date('%M')
local AP = os.date('%p')
out{x=150, y=80, fs=70, txt=H}
out{x=150, y=130, fs=65, txt=M}
out{x=205, y=130, fs=25, txt=AP}
-- End drawing
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end-- end main function
--MrPeachy's out function. Copied shamelessly from v9000
function out(txj)--c,a,f,fs,face,x,y,txt,hj,vj,ro
local extents=cairo_text_extents_t:create()
tolua.takeownership(extents)
local function color(col,alp)
return ((col / 0x10000) % 0x100) / 255, ((col / 0x100) % 0x100) / 255, (col % 0x100) / 255, alp
end
local c=txj.c or default_color or 0xffffff
local a=txj.a or default_alpha or 1
local f=txj.f or default_font or "monospace"
local fs=txj.fs or default_font_size or 20
local x=txj.x or 100
local y=txj.y or 100
local txt=txj.txt or "set text"
local hj=txj.hj or default_hj or "l"
local vj=txj.vj or default_vj or "n"
local face=txj.face or default_face or "normal"
--set face
if face=="normal" then
cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
elseif face=="bold" then
cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
elseif face=="italic" then
cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_NORMAL);
elseif face=="bolditalic" then
cairo_select_font_face (cr, f, CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_BOLD);
else
print ('face not set correctly - "normal","bold","italic","bolditalic"')
end
cairo_set_font_size (cr, fs)
cairo_text_extents(cr,txt,extents)
local wx=extents.x_advance
local wd=extents.width
local hy=extents.height
local bx=extents.x_bearing
local by=extents.y_bearing+hy
local tx=x
local ty=y
--set horizontal alignment - l, c, r
if hj=="l" then
x=x-bx
rad=0
elseif hj=="c" then
x=x-((wx-bx)/2)-bx
rad=(wx-bx)/2
elseif hj=="r" then
x=x-wx
rad=wx-bx
else
print ("hj not set correctly - l, c, r")
end
--vj. n=normal, nb=normal-ybearing, m=middle, mb=middle-ybearing, t=top
if vj=="n" then
y=y
rad2=0
ry=by
elseif vj=="nb" then
y=y-by
rad2=-by
ry=by
elseif vj=="m" then
y=y+((hy-by)/2)
rad2=((hy-by)/2)
ry=((hy-by)/2)-by
elseif vj=="mb" then
y=y+(hy/2)-by
rad2=(hy/2)-by
ry=((hy-by)/2)-by
elseif vj=="t" then
y=y+hy-by
rad2=hy-by
ry=0+by
else
print ("vj not set correctly - n, nb, m, mb, t")
end
cairo_move_to (cr,x,y)
cairo_set_source_rgba (cr,color(c,a))
cairo_show_text (cr,txt)
cairo_stroke (cr)
end--function out
Last edited by easysid (2014-03-12 09:06:57)
Desktop screenshots :: Origami :: github
Offline
A simple clock.
Nice one.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
i display a webcam. i download an image with wget. is it possible to create a link and display this?
here is an example how to create a link:
ln -s http://www.eso.org/public/webcams/vlt.jpg /home/alexander/vlt
i want to display the link this way:
myimg({x=0,y=0,w=200,h=200,file='/home/alexander/vlt'})
it works when i use wget but i also want to use it with a small usb-stick this would save some space on the disc.
Offline
Hello!
did anyone make a narrow sidebar config, panel type, possibly for a 1080p monitor? i'd love to have a config that would be always visible on the right side of my monitor..
Offline
Hello!
did anyone make a narrow sidebar config, panel type, possibly for a 1080p monitor? i'd love to have a config that would be always visible on the right side of my monitor..
Preferably the idea is to make your own or borrow someone's code and tweak it to match your system. As no two systems are the same it's never a 100% fit unless it's a very simple conky with generic calls.
Check out the gallery at Conky PitStop ... see my signature.
Last edited by Sector11 (2014-03-13 20:51:52)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Please someone can help me with this code.
${color2}${voffset 1}${alignc 57}${font cure:size=7}${execi 300 grep "lastBuildDate" ~/.cache/weather.xml}${color}${font}
but what is wrong?
It appear like this
I want to remove <lastBuildDate> </lastBuildDate> just want to remain only fetched date and hour.
information is grabbed from developer.yahoo.weather
Thanks in advance,
Nili
Offline
Please someone can help me with this code.
Thanks in advance,
Nili
One way: use "cut"
Nili wants this: ${execi 300 grep "lastBuildDate" ~/.cache/weather.xml | cut -c 16-44}
Last edited by Sector11 (2014-03-16 15:08:43)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Offline
Sector11, You're the man!
Thanks a lot friend.
More than welcome.
cut and fold are friends of grep, awk and sed.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
for no reason other than i wanted to see if i could work it out...
this should work also, just using gawk
${execi 300 gawk 'match($0, /lastBuildDate>(.*)<\/lastBuildDate>/ ,a){print a[1]}' ~/.cache/weather.xml}
Offline
for no reason other than i wanted to see if i could work it out...
this should work also, just using gawk${execi 300 gawk 'match($0, /lastBuildDate>(.*)<\/lastBuildDate>/ ,a){print a[1]}' ~/.cache/weather.xml}
You doubted yourself.
So over in my conky playground - desktop 5 - I ran another test:
TEXT
Nili wants this: ${execi 10 grep "lastBuildDate" ~/.cache/weather.xml | cut -c 16-43}
- cut 16-43
or this: ${execi 10 sed -n '1p' ~/.cache/weather.xml | cut -c 16-39}
- cut 16-39 - if the "line number" is consistant.
mrpeachy's entry: gawk
${execi 10 gawk 'match($0,/lastBuildDate>(.*)<\/lastBuildDate>/,a){print a[1]}' ~/.cache/weather.xml}
awk:
${execi 10 awk 'match($0,/lastBuildDate>(.*)<\/lastBuildDate>/,a){print a[1]}' ~/.cache/weather.xml}
mawk:
${execi 10 mawk 'match($0,/lastBuildDate>(.*)<\/lastBuildDate>/,a){print a[1]}' ~/.cache/weather.xml}
hmmmmmmmmmmmmmm mawk doesn't work
So we have
grep
gawk
awk
but not mawk
and sed - if the line number is a constant
Understandable about mawk:
Description: a pattern scanning and text processing language
Mawk is an interpreter for the AWK Programming Language. The AWK language is useful for manipulation of data files, text retrieval and processing, and for prototyping and experimenting with algorithms. Mawk is a new awk meaning it implements the AWK language as defined in Aho, Kernighan and Weinberger, The AWK Programming Language, Addison-Wesley Publishing, 1988. (Hereafter referred to as the AWK book.) Mawk conforms to the POSIX 1003.2 (draft 11.3) definition of the AWK language which contains a few features not described in the AWK book, and mawk provides a small number of extensions.Mawk is smaller and much faster than gawk. It has some compile-time limits such as NF = 32767 and sprintf buffer = 1020.
Can't ya hear it --- M i i i i i i i i i i i i i i i l k!
Well done mrpeachy!
Any other options out there that someone knows about?
Last edited by Sector11 (2014-03-16 17:35:53)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
You doubted yourself.
I thought to myself, what would dk75 do LOL
when it comes to awk etc ive only ever scratched the surface
Offline
Sector11 wrote:You doubted yourself.
I thought to myself, what would dk75 do LOL
when it comes to awk etc ive only ever scratched the surface
I have to admit as I was playing with it I was wondering the same thing.
I remember reading a blog about a programming student that was learning "X" language ...
.. and as I left the classroom the proff was at his desk programming something in awk. While not new and versatile as "X", he knows it intimately and is more comfortable using it.
Power to him
Before that I didn't know it was a programming language and then I saw some of the stuff dk75 did! 8)
I use his ncal.awk script:
#!/usr/bin/gawk -f
# based on: cal.C512.sh
# a bash script by Crinos512
#####################################################################
# #
# ncal.awk script by dk75 #
# #
# usage: #
# ncal -h | ncal.awk - if Sunday is a first day of #
# the week #
# ncal -h | ncal.awk monday=TRUE - if Monday is a first day of #
# the week #
# #
#####################################################################
BEGIN \
{
weekend[1]=7
weekend[2]=1
if ( ARGV[1]=="monday=TRUE" )
{
weekend[1]=6
weekend[2]=7
}
today=strftime("%02d")
}
NR==1 \
{
month=$1
year=$2
}
NR>1 \
{
gsub(/ {4}/," 0 ", $0)
days[NR-1,1]=$1
days[NR-1,2]=$2
days[NR-1,3]=$3
days[NR-1,4]=$4
days[NR-1,5]=$5
days[NR-1,6]=$6
days[NR-1,7]=$7
}
END \
{
#############################################################
# preparing and formatting data #
#############################################################
for ( i=1; i<=7; i++ )
{
for ( j=2; j<=7; j++ )
{
days[i,j]=sprintf("%02d", days[i,j])
if ( days[i,j]=="00" )
days[i,j]="··"
if ( days[i,j]==today )
days[i,j]="${color5}"days[i,j]"${color}"
else
days[i,j]="${color}"days[i,j]"${color}"
}
if ( i==weekend[1] )
days[i,1]="${color5}"days[i,1]"${color}"
else if ( i==weekend[2] )
days[i,1]="${color5}"days[i,1]"${color}"
else
days[i,1]="${color1}"days[i,1]"${color}"
}
# ###########################################################
#############################################################
# displaying data #
#############################################################
#print "${alignc}${color6}"month"${color}"
for ( j=0; j<=1; j++ )
{
for ( i=1; i<=7; i++ )
{
printf "%s %s %s %s\n", days[i,1], days[i,2+j], days[i,4+j], days[i,6+j]
}
}
#print "${alignc}${color6}"year"${color}"
}
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
AWK in most systems is a symlink to either GAWK or MAWK.
MAWK is simpler and smaller version, and it's regexp engine don't conform to POSIX standard.
As for actual command, it would be better to make selector at front to choose line to process (like GREP), before we go with "match" command on it:
gawk 'tolower($0) ~ "lastbuilddate" {match($0, /<.*>(.*)<.*>/, a); print a[1]}' ~/.cache/weather.xml
Debian Sid (Minted) x86_64/3.12-10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Intel X3100
Lenovo T61, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | Conky Pitstop
Offline
AWK in most systems is a symlink to either GAWK or MAWK.
MAWK is simpler and smaller version, and it's regexp engine don't conform to POSIX standard.
As for actual command, it would be better to make selector at front to choose line to process (like GREP), before we go with "match" command on it:
gawk 'tolower($0) ~ "lastbuilddate" {match($0, /<.*>(.*)<.*>/, a); print a[1]}' ~/.cache/weather.xml
Nice ... I seem to recall the bit about symlinks ... I also found this:
As of late 2012, Ubuntu/Debian systems install mawk by default. The command line file /etc/alternatives/awk returns symbolic link to /usr/bin/mawk – Mike Sherrill 'Cat Recall' Dec 5 '12 at 22:28
So I ran the command:
17 Mar 14 | 12:27:28 ~
$ file /etc/alternatives/awk
/etc/alternatives/awk: symbolic link to `/usr/bin/gawk'
17 Mar 14 | 12:27:31 ~
$
so much for mawk! Somewhere along the way they must have switched back.
One question:
tolower(str)
Return a copy of the string str, with all the uppercase characters in str translated
to their corresponding lowercase counterparts. Non-alphabetic characters are left
unchanged.
When I run your line ... it doesn't translate the string to the lower case did I miss something?
Last edited by Sector11 (2014-03-17 15:55:10)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Yes, you missed one thing - "tolower" command was applied for conditional regexp only, not to the string itself.
So, string is intact, but it's lowercase copy is compared to regexp string, so I don't need to write regexp with exact lower/upper characters in it.
Debian Sid (Minted) x86_64/3.12-10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Intel X3100
Lenovo T61, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | Conky Pitstop
Offline
Yes, you missed one thing - "tolower" command was applied for conditional regexp only, not to the string itself.
So, string is intact, but it's lowercase copy is compared to regexp string, so I don't need to write regexp with exact lower/upper characters in it.
OK, I'll have to believe you because:
1. I've seen the results, and
2. you say so.
I have no idea why or how it works. I saw in the man page it translated upper case to lower case and then it didn't. I have no idea 'how' you applied it to "regexp only".
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
Simple explanation:
1) tolower($0) - it takes string from "$0" and makes it lowercase, but it not change string that is inside of "$0"
if you want to do that, you must assign new value to variable
$0 = tolower($0)
2) "~" means "contains?"
tolower($0) ~ "lastbuilddate"
means "if lowercase copy of string from '$0' contains 'lastbuiddate' string then"
Debian Sid (Minted) x86_64/3.12-10, Conky 2.0_pre, Xorg 7.7/1.15.0, KDE 4.11.5, Intel X3100
Lenovo T61, HITACHI HTS722010K9SA00 100GB, WDC_WD5000BEVT 500GB
Linux user No.: 483055 | Conky Pitstop
Offline
Simple explanation:
1) tolower($0) - it takes string from "$0" and makes it lowercase, but it not change string that is inside of "$0"
if you want to do that, you must assign new value to variable$0 = tolower($0)
2) "~" means "contains?"
tolower($0) ~ "lastbuilddate"
means "if lowercase copy of string from '$0' contains 'lastbuiddate' string then"
OH OK! I totally over looked the fact you had changed "lastBuildDate" to "lastbuilddate" and now it makes sense.
Thank you for the explanation .. now it's clear how that works.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
@Sector11
Care to share your modified Emergency Tinfoil Hat Conky Alert System script, like you offered?
I'm looking forward to see what you came up with.
Those who would trade essential liberty for temporary security deserve neither
Member of the (Un)Official #! Emergency Tinfoil Hat Distribution Center
Emergency Tinfoil Hat Conky Alert System development team
Offline
EDIT: @ #!_828 - been a busy morning ... had a lot of interruptions doing this and didn't even see your post until I got this up. Have fun.
Having a bit of fun in the Spam Alert thread with a Tin Foil Hat Alert conky.
This idea comes from #1_828 ... so I thought I'd tweak it a tad ... I used something close to the UV Index colours but kept things as close to #!_828's idea as I could ...
UVI Web Colour
Table (HEX)
1 4eb400 - green
2 a0ce00 - green
3 f7e400 - yellow
4 f8b600 - yellow
5 f88700 - yellow
6 f85900 - orange
7 e82c0e - orange
8 d8001d - red
9 ff0099 - red
10 b54cff - red
11+ 998cff - purple
The little one on the top is actually using the UVI call in one of TEO's weather scripts and has one colour
... what come next is #!_828's code as shown in the link
... after that the ${if_match} calls looking at TFH.txt file to get a number.
# pkill -xf "conky -c /media/5/Conky/TFH_Alert.conky" &
# conky -c /media/5/Conky/TFH_Alert.conky &
### 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 TFH_Alert
### ARGB can be used for real transparency
#own_window_argb_visual yes
#own_window_argb_value 0 # 0 - clear | 255 - solid
# 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
minimum_size 340 150 ### w|h
maximum_width 340 ### w
gap_x 10 ### l|r
gap_y 15 ### u|d
# Aligned position on screen: tl, tr, tm, bl, br, bm, ml, mr
alignment tl #tr
##################################left################# End Window Settings ###
### Font Settings #########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
#xftfont Liberation Sans:size=15
#xftfont monofur:bold:size=11
xftfont monofur:bold:size=11
#xftfont Sesame Shadow:size=200
# 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 #### <<<--- yes --- To see it easier on light screens.
default_shade_color 000000
draw_outline no #### <<<--- yes --- Amplifies text if yes OJO with changing fonts
default_outline_color 000000
default_color DCDCDC #220 220 220 Gainsboro
#default_color C0C0C0 #192 192 192 Silver
#default_color B0E0E6 #176 224 230 PowderBlue
#default_color D8BFD8 #216 191 216 Thistle
color0 8FBC8F #DarkSeaGreen
color1 C0C0C0 # Silver
#color1 D3D3D3 #LightGrey
#color1 778899 #LightSlateGray
color2 F5F5DC #Beige
color3 87CEFA #LightSkyBlue
#color3 87CEFA #E0FFFF #LightCyan
color4 48D1CC #MediumTurquoise
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 B0E0E6 #PowderBlue
#color7 5F9EA0 #CadetBlue
#color8 FFFFE0 #LightYellow
color8 FFD700 #Gold
#color8 F0E68C #Khaki
color9 FFA07A #LightSalmon
#color9 CD5C5C #IndianRed
#color9 FF0000 #Red
##################################################### End Color Settings ###
### Borders Section ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 0
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders yes
#default_graph_size 15 40
##################################################### End Borders Secton ###
### Miscellaneous Section ##################################################
# Boolean value, if true, Conky will be forked to background when started.
background yes
# 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 1028 # required for the horiz-cal
# 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 16384conky -c /media/5/Conky/liloo-time_tm.conky &
# Desired output unit of all objects displaying a temperature. Parameters are
# either "fahrenheit" or "celsius". The default unit is degree Celsius.
# temperature_unit Fahrenheit
## Imlib2 image cache size, in bytes. Defaults to 4MiB. Increase this value
## if you use $image lots. Set to 0 to disable the image cache.
imlib_cache_size 0
#top_name_width 15
############################################## End Miscellaneous Section ###
### LUA Settings ###########################################################
## Above and After TEXT ###########
#lua_load /media/5/Conky/LUA/draw-bg.lua
#lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.45
#lua_draw_hook_post draw_bg 15 0 0 0 0 0x000000 0.05
# TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}
####################################################### End LUA Settings ###
update_interval 1
## ${texeci 900 bash /media/5/Conky/Conky_WeatherCom_metric/weath_com_metric}\
## ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}\
TEXT
${alignc}${color}T.F.H. Alert${color9}
${alignc}${execpi 1200 sed -n '30p' /media/5/Conky/Conky_WeatherCom_metric/Today/raw_td}${color}
${color}${alignc}${membar 0,200}
${font Andale Mono:bold:size=15}${alignc}TINFOIL HAT ALERT${font}
#${color 17a013}
#green
#${color ebf706}
#yellow
#${color c84716}
#orange
#${color f00e0e}
#red
#${color d5ebf1}
#white
${font Andale Mono:bold:size=11}
Alert Level: ${alignr}${color 17a013} DEFCON 5
#${font Andale Mono:size=11}${alignc}Low Risk:
#${alignc}Tinfoil Hats on Standby
#
#
#
#
#${font Andale Mono:size=11}${alignc}Moderate Risk:
#Take precautions. Tinfoil Hat
#use recommended for prolonged
#exposure. Remain on Alert.
#
${font Andale Mono:size=11}${alignc}Elevated Threat:
Wear Tinfoil Hat when risk of
exposure is present. Limit any
nonessential forum use at night.
#
#${font Andale Mono:size=11}${alignc}Severe Threat:
#Wear Tinfoil Hat at all times.
#Be prepared to seek shelter.
#Avoid forum use at night.
#Exercise extreme caution.
#
#${font Andale Mono:size=11}${alignc}Extreme Threat:
#Seek fortified shelter.
#Do not remove Tinfoil Hat.
#Avoid forums at night & limit
#nonessential daytime use.
${font}
${color}${alignc}${membar 0,200}
${font Andale Mono:bold:size=15}${alignc}TINFOIL HAT ALERT${font}
${if_match ${execi 5 sed -n '1p' /media/5/Conky/TFH.txt} == 1}${font Andale Mono:bold:size=11}Alert Level:${alignr}${color 4eb400}DEFCON 1
${alignc}Low Risk:
${alignc}Tinfoil Hats on Standby
${else}${if_match ${execi 5 sed -n '1p' /media/5/Conky/TFH.txt} == 2}${font Andale Mono:bold:size=11}Alert Level:${alignr}${color f7e400}DEFCON 2
${alignc}Moderate Risk:
Take precautions. Tinfoil Hat
use recommended for prolonged
exposure. Remain on Alert.
${else}${if_match ${execi 5 sed -n '1p' /media/5/Conky/TFH.txt} == 3}${font Andale Mono:bold:size=11}Alert Level:${alignr}${color f85900}DEFCON 3
${alignc}Elevated Threat:
Wear Tinfoil Hat when risk of
exposure is present. Limit any
nonessential forum use at night.
${else}${if_match ${execi 5 sed -n '1p' /media/5/Conky/TFH.txt} == 4}${font Andale Mono:bold:size=11}Alert Level:${alignr}${color f00e0e}DEFCON 4
${alignc}Severe Threat:
Wear Tinfoil Hat at all times.
Be prepared to seek shelter.
Avoid forum use at night.
Exercise extreme caution.${else}${if_match ${execi 5 sed -n '1p' /media/5/Conky/TFH.txt} == 5}${font Andale Mono:bold:size=11}Alert Level:${alignr}${color 998cff}DEFCON 5
${alignc}Extreme Threat:
Seek fortified shelter.
Do not remove Tinfoil Hat.
Avoid forums at night & limit
nonessential daytime use.${else}${endif}${endif}${endif}${endif}${endif}
${color6}${hr}
Conky Version:${alignr}${conky_version}
${hr}
${hr}${font}
Using a text file just changing the number from 1 to 5 sets the DEFCON level and colours
Last edited by Sector11 (2014-03-18 15:42:13)
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
@Sector11
Care to share your modified Emergency Tinfoil Hat Conky Alert System script, like you offered?
I'm looking forward to see what you came up with.
Sure look up
You popped this in as I was creating that post.
· ↓ ↓ ↓ ↓ ↓ ↓ ·
BunsenLabs Forums now Open for Registration
· ↑ ↑ ↑ ↑ ↑ ↑ · BL ModSquad
Offline
^Ok. That's pretty cool, definitely easier to change Alert levels. One minor thing: you got the DEFCONS backwards. It starts with DEFCON 5 at the lowest, & counts down as the situation worsens, with DEFCON 5 being business as usual, & DEFCON 1 being the apocalypse
Those who would trade essential liberty for temporary security deserve neither
Member of the (Un)Official #! Emergency Tinfoil Hat Distribution Center
Emergency Tinfoil Hat Conky Alert System development team
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