SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#7151 2014-03-18 19:27:24

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 1,572

Re: Conky v1.9 Thread

^ doesn't matter, when you where a tin-foil hat it is always DEFCON 1 ... somewhere.

back on topic, simple 2-liner:

Screenshot_fvwm_new.jpg


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

Be excellent to each other!

#7152 2014-03-18 22:23:47

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

#!_828 wrote:

^Ok. That's pretty cool, definitely easier to change Alert levels. smile 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  big_smile

OOPS!  Hey I'm a Canuck, what do I know about DEFCON - at first I thought it was short for DEaF CONvict.

Bet you didn't buy that one huh.   lol  lol  lol  lol

Anyway I changed it to SPAMCON in the new conky.

Oh well I'll bet you have it straightened out by now.  It was fun creating it, backwards or not!
And yes, changing one number and not even having to restart the conky helps bunches with ease of use.

I got a new one ... conky that is ...

2014_03_18_18_48_28_1920x1080_Sector11.jpg«--» 2014_03_18_18_49_05_1920x1080_Sector11.jpg

The top part, UVI Protection, actually uses the UV Index from a weather script along with a text file UVI_TXT.txt with 5 lines:

When the UV Index is 'low' there is little risk of exposure. Unless you are especially sensitive to UV radiation generally no protection is needed.
If the UV Index level is closer to low not much protection is needed. Otherwise, sunglasses, a hat, and SPF 15+ applied to exposed areas should provide adequate UV protection.
When the UV Index is 'high' there is a real possibility of skin or eye damage. Good UV protection would include sunglasses, a hat, SPF 15+ and clothing that blocks UV.
If you're in the Sun and the UV Index is 'very high' a wide brimmed hat can help protect your head, face, eyes, neck, and shoulders by creating shade. Legs and arms can be protected with UV protective clothing. SPF 30+ should be used on exposed skin.
Prolonged exposure to extreme levels of UV radiation can pose serious health risks. Try to stay out of direct sunlight until UV Index levels decrease or really cover up! UV protective clothes and wide brimmed hat should be used along with sunglasses and SPF 30+. Seek shade when possible.

And a second section for Crunchbang Spam Protection

TFH_AL.txt  (Alert Level): just a number: 0 to 11, and
TFHAL_TXT.txt that use my original text.

Wearing a Tin Foil Hat is not necessary.
Take precautions, such as covering up with a simple Tin Foil Hat; use is recommended if you are tempted to click on links without checking.
WearTin Foil Hat's and use SPF 30+ spamscreen, cover the body with spam approved protective clothing and a wide-brim hat covered with tin foil, and reduce time in the CB Forum from three hours before to three hours after corenominal and bobobex go to/get out of bed.
Wear a double layered Tin Foil Hat and SPF 30+ spamscreen, and sunglasses. Do not stay out in the Forums for too long.
Take all precautions, including: wear TRIPLE layered Tin Foil Hat, sunglasses and use SPF 60+ spamscreen, cover the body with a long-sleeve shirt and trousers, wear a very broad Tin Foil Hat hat, and avoid the forums from three hours before until three hours after corenominal and bobobex go to/get out of bed.
0	green	- Low		327600 - 1
1	green	- Low		4EB400 - 1
2	green	- Low		A0CE00 - 1
3	yellow	- Moderate	F7E400 - 2
4	yellow	- Moderate	F8B600 - 2
5	yellow	- Moderate	F88700 - 2
6	orange	- High		F85900 - 3
7	orange	- High		E82C0E - 3
8	red	- Very High	D8001D - 4
9	red	- Very High	FF0099 - 4
10	red	- Very High	7933AB - 4
11+	purple	- Extreme	998CFF - 5

See: http://www.uvawareness.com/uv-info/uv-index.php

The conky:

# pkill -xf "conky -c /media/5/Conky/TFH_Alert_2.conky" &
# conky -c /media/5/Conky/TFH_Alert_2.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=10
#xftfont monofur:bold:size=10.5
#xftfont monofur:bold:size=11
#xftfont monofur:bold:size=12
#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 2056 # 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 &
${color 4eb400}
# 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}${membar 0,200}
${font monofur:bold:size=16}${alignc}UVI Protection${font}

Level: ${if_match ${execi 600  sed -n '121p' /media/5/Conky/Teo_wun/Conditions} == 0}${color 327600}0 - Low${color}

${execi 5 sed -n '1p' /media/5/Conky/UVI_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 600  sed -n '121p' /media/5/Conky/Teo_wun/Conditions} == 1}${color 4EB400}1 - Low${color}

${execi 5 sed -n '1p' /media/5/Conky/UVI_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 600  sed -n '121p' /media/5/Conky/Teo_wun/Conditions} == 2}${color A0CE00}2 - Low${color}

${execi 5 sed -n '1p' /media/5/Conky/UVI_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 600  sed -n '121p' /media/5/Conky/Teo_wun/Conditions} == 3}${color F7E400}3 - Moderate${color}

${execi 5 sed -n '2p' /media/5/Conky/UVI_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 600  sed -n '121p' /media/5/Conky/Teo_wun/Conditions} == 4}${color F8B600}4 - Moderate${color}

${execi 5 sed -n '2p' /media/5/Conky/UVI_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 600  sed -n '121p' /media/5/Conky/Teo_wun/Conditions} == 5}${color F88700}5 - Moderate${color}

${execi 5 sed -n '2p' /media/5/Conky/UVI_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 600  sed -n '121p' /media/5/Conky/Teo_wun/Conditions} == 6}${color F85900}6 - High${color}

${execi 5 sed -n '3p' /media/5/Conky/UVI_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 600  sed -n '121p' /media/5/Conky/Teo_wun/Conditions} == 7}${color E82C0E}7 - High${color}

${execi 5 sed -n '3p' /media/5/Conky/UVI_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 600  sed -n '121p' /media/5/Conky/Teo_wun/Conditions} == 8}${color D8001D}8 - Very High${color}

${execi 5 sed -n '4p' /media/5/Conky/UVI_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 600  sed -n '121p' /media/5/Conky/Teo_wun/Conditions} == 9}${color FF0099}9 - Very High${color}

${execi 5 sed -n '4p' /media/5/Conky/UVI_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 600  sed -n '121p' /media/5/Conky/Teo_wun/Conditions} == 10}${color 7933AB}10 - Very High${color}

${execi 5 sed -n '4p' /media/5/Conky/UVI_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 600  sed -n '121p' /media/5/Conky/Teo_wun/Conditions} == 11}${color 998CFF}11+ - Extreme${color}

${execi 5 sed -n '5p' /media/5/Conky/UVI_TXT.txt | fold -s -w 49}\
${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}
${color6}${hr}${color}

${font monofur:bold:size=16}${alignc}Crunchbang Spam Protection${font}

 T.F.H. Level: ${if_match ${execi 5 sed -n '1p' /media/5/Conky/TFH_AL.txt} == 0}${color 327600}Low${alignr 10}SPAMCON 0${color}

${execi 5 sed -n '1p' /media/5/Conky/TFHAL_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 5 sed -n '1p' /media/5/Conky/TFH_AL.txt} == 1}${color 4EB400}Low${alignr 10}SPAMCON 1${color}

${execi 5 sed -n '1p' /media/5/Conky/TFHAL_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 5 sed -n '1p' /media/5/Conky/TFH_AL.txt} == 2}${color A0CE00}Low${alignr 10}SPAMCON 2${color}

${execi 5 sed -n '1p' /media/5/Conky/TFHAL_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 5 sed -n '1p' /media/5/Conky/TFH_AL.txt} == 3}${color F7E400}Moderate${alignr 10}SPAMCON 3${color}

${execi 5 sed -n '2p' /media/5/Conky/TFHAL_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 5 sed -n '1p' /media/5/Conky/TFH_AL.txt} == 4}${color F8B600}Moderate${alignr 10}SPAMCON 4${color}

${execi 5 sed -n '2p' /media/5/Conky/TFHAL_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 5 sed -n '1p' /media/5/Conky/TFH_AL.txt} == 5}${color F88700}Moderate${alignr 10}SPAMCON 5${color}

${execi 5 sed -n '2p' /media/5/Conky/TFHAL_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 5 sed -n '1p' /media/5/Conky/TFH_AL.txt} == 6}${color F85900}High${alignr 10}SPAMCON 6${color}

${execi 5 sed -n '3p' /media/5/Conky/TFHAL_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 5 sed -n '1p' /media/5/Conky/TFH_AL.txt} == 7}${color E82C0E}High${alignr 10}SPAMCON 7${color}

${execi 5 sed -n '3p' /media/5/Conky/TFHAL_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 5 sed -n '1p' /media/5/Conky/TFH_AL.txt} == 8}${color D8001D}Very High${alignr 10}SPAMCON 8${color}

${execi 5 sed -n '4p' /media/5/Conky/TFHAL_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 5 sed -n '1p' /media/5/Conky/TFH_AL.txt} == 9}${color FF0099}Very High${alignr 10}SPAMCON 9${color}

${execi 5 sed -n '4p' /media/5/Conky/TFHAL_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 5 sed -n '1p' /media/5/Conky/TFH_AL.txt} == 10}${color 7933AB}Very High${alignr 10}SPAMCON 10${color}

${execi 5 sed -n '4p' /media/5/Conky/TFHAL_TXT.txt | fold -s -w 49}${else}\
${if_match ${execi 5 sed -n '1p' /media/5/Conky/TFH_AL.txt} == 11}${color 998CFF}Extreme${alignr 10}SPAMCON 11${color}

${execi 5 sed -n '5p' /media/5/Conky/TFHAL_TXT.txt | fold -s -w 49}\
${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}${endif}
${color6}${hr}

·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7153 2014-03-18 22:32:38

mrpeachy
20% cooler
From: The Everfree Forest
Registered: 2009-11-08
Posts: 3,460

Re: Conky v1.9 Thread

Sector11 wrote:

at first I thought it was short for DEaF CONvict.

big_smile that made me chuckle  big_smile

Offline

#7154 2014-03-18 22:47:50

#!_828
#! Tinfoil Hat
From: Ohio, U. S. of A.
Registered: 2013-09-19
Posts: 1,244

Re: Conky v1.9 Thread

Sector11 wrote:
#!_828 wrote:

^Ok. That's pretty cool, definitely easier to change Alert levels. smile 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  big_smile

OOPS!  Hey I'm a Canuck, what do I know about DEFCON - at first I thought it was short for DEaF CONvict.

Bet you didn't buy that one huh.   lol  lol  lol  lol

Anyway I changed it to SPAMCON in the new conky.

Oh well I'll bet you have it straightened out by now.  It was fun creating it, backwards or not!
And yes, changing one number and not even having to restart the conky helps bunches with ease of use.

Yes it was fun.  smile  With a little bit of fiddling, I got it to work perfectly for me (changed the color scheme back to my original, though)

Screenshots:
Tinfoil_Hat_Conky_D5.jpg Tinfoil_Hat_Conky_D4.jpg Tinfoil_Hat_Conky_D3.jpg Tinfoil_Hat_Conky_D2.jpg Tinfoil_Hat_Conky_D1.jpg


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

#7155 2014-03-18 23:50:02

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

mrpeachy wrote:
Sector11 wrote:

at first I thought it was short for DEaF CONvict.

big_smile that made me chuckle  big_smile

I couldn't help myself!  I just had to do it.  lol lol lol

#!_828 wrote:

Yes it was fun.  smile  With a little bit of fiddling, I got it to work perfectly for me (changed the color scheme back to my original, though)

Looks good.  Tweaking was an obvious given.  big_smile

OK what can we get into next?


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7156 2014-03-19 02:47:20

#!_828
#! Tinfoil Hat
From: Ohio, U. S. of A.
Registered: 2013-09-19
Posts: 1,244

Re: Conky v1.9 Thread

Sector11 wrote:

Looks good.  Tweaking was an obvious given.  big_smile

OK what can we get into next?

Well, after showing off our script to some people I know, they suggested that there could be some way to sync all the files in a way that there could be an official alert level set & some web resource would automatically update the .txt file to change the alert level. If there's some way to do that without spending an arm & a leg, I'd be interested in taking a look at it. smile Hell, we could even get the mods in on it, to decide the day's official alert level based on SPAM activity, & everyone with the "official" O#!ETHDC Emergency Tinfoil Hat Conky Alert System setup could all be notified of the change in status. Like a package that could be added to the repos & auto-update daily with the new alert level. big_smile Hmmmmm . . . .  .  .  .  Any thoughts on this?


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

#7157 2014-03-19 14:46:18

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

#!_828 wrote:
Sector11 wrote:

OK what can we get into next?

Any thoughts on this?

Well, that can be done easy enough ... I think with a small text file in a "dropbox" someplace or any other site that can be accessed by the public.  I would suggest a random number generator to select a number between 0 and 11 and save it to a file

I would imagine a bash script could be written that would do that - and upload the file to the web someplace.  Way beyond my expertise though.  And since this would be an immensely popular conky ( roll ) the "dropbox" would be talking serious hits. ... so maybe that's not a good idea.  lol lol lol  Mind you it could be at a secret location and only trusted O#!ETHDC Emergency Tinfoil Hat members would be given the location.  roll roll

Unless as you say, daily updates.  big_smile

However with 16 spams this morning that would be an 11 - or SPAMCON 5 - and the UVI is at 4 at the moment, which on my scale would be:

4    yellow    - Moderate    F8B600 - 2

That 2 on the end is Line 2 in the text file.

That's quite a difference:
2014_03_19_11_37_55_342x338_Sector11.jpg

And another confession:
I used this as a test to actually colour code the UVI in weather scripts.   8)
Since the UV Index ranges from 0 to 11 here with 5 warning levels it made sense, summer sun here is hell in the sky.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7158 2014-03-19 15:44:24

#!_828
#! Tinfoil Hat
From: Ohio, U. S. of A.
Registered: 2013-09-19
Posts: 1,244

Re: Conky v1.9 Thread

^ I wouldn't use random numbers. I've got an idea of what would warrant what Alert Level.

DEFCON 5: Business as usual, minimal threat of SPAM  smile
DEFCON 4: Suspicious activity, but no more than 5 confirmed SPAM incidents  neutral
DEFCON 3: 5-20 confirmed SPAM incidents sad
DEFCON 2: 20-30 confirmed SPAM incidents yikes
DEFCON 1: Over 30 confirmed SPAM incidents 8.(

Of course, it'd be a new Alert Level every day, or whenever I can update it. Therefore, staying up to date with SPAM count is essential.

It might be something fun to do, so if I get something up & running, you'll be the first to know  smile


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

#7159 2014-03-19 16:30:28

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

#!_828 wrote:

^ I wouldn't use random numbers. I've got an idea of what would warrant what Alert Level.

DEFCON 5: Business as usual, minimal threat of SPAM  smile
DEFCON 4: Suspicious activity, but no more than 5 confirmed SPAM incidents  neutral
DEFCON 3: 5-20 confirmed SPAM incidents sad
DEFCON 2: 20-30 confirmed SPAM incidents yikes
DEFCON 1: Over 30 confirmed SPAM incidents 8.(

Of course, it'd be a new Alert Level every day, or whenever I can update it. Therefore, staying up to date with SPAM count is essential.

It might be something fun to do, so if I get something up & running, you'll be the first to know  smile

I'll be here.  big_smile

Those DEFCON levels are actually quite nice - less the smilies.  Todays count for me would have been DEFCON 3 as there were 16 in my mailbox

I'd still lobby for SPAMCON though - and take SPAM out of the warnings:

SPAMCON 5: Business as usual, minimal threat
SPAMCON 4: Suspicious activity, but no more than 5 confirmed incidents
SPAMCON 3: 5-20 confirmed incidents
SPAMCON 2: 20-30 confirmed incidents
SPAMCON 1: Over 30 confirmed incidents

... looks more business like to me (opinion)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7160 2014-03-19 17:43:33

#!_828
#! Tinfoil Hat
From: Ohio, U. S. of A.
Registered: 2013-09-19
Posts: 1,244

Re: Conky v1.9 Thread

^ I wouldn't be changing the Tinfoil Hat Alerts, that was just the criteria for what would appropriate which alert level, & I'm still conflicted on weather or not to use SPAMCON, as I like DEFCON because of how official it sounds.


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

#7161 2014-03-19 18:30:14

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

#!_828 wrote:

I'm still conflicted on weather or not to use SPAMCON, as I like DEFCON because of how official it sounds.

DEFCON is over used - and totally military.  DEFCON 1 has never been used and I hope never will be.

After my Oops! with reversing them - as a some movies do BTW - I did some checking:

DEFCON is a sub system of Alert Conditions (LERTCON)

LERTCON has:

  • DEFCON - DEFense readiness CONdition

  • EMERGCON - Emergency Conditions

  • FPCONS - Force Protection Conditions

  • REDCONS - Readiness Conditions

  • INFOCON - Information Operations Condition

  • CYBERCON - Cyber Operations Condition ... This one is cool!

  • WATCHCONS - Watch Conditions

So seeing all that I thought SPAMCON was a pretty good option.

Not as cool as CYBERCON  but that's taken like DEFCON

There's always: CBSCON - CrunchBang Spam CONdition - but sounds too much like a television network!

Or TFHCON ... But how do you say it?

I'll defer to your choice since in my confession I explained why I did this.  big_smile
Plus: damo put me up to it.  lol  lol  lol

Last edited by Sector11 (2014-03-19 18:32:17)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7162 2014-03-19 20:01:59

Joe90
#! Junkie
Registered: 2013-10-10
Posts: 337

Re: Conky v1.9 Thread

I have a setup I am working on with three "conkys" / "conkyrcs" all started in a script. Is it possible to kill/restart only one of them?

I have a background image changer script firing nitrogen off every minute.

Am having trouble with the redrawing of the background image (semi transparent conkies and rounded corners, old background image gets left behind), and the conkys run at different update intervals.

Offline

#7163 2014-03-19 20:35:55

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

Joe90 wrote:

I have a setup I am working on with three "conkys" / "conkyrcs" all started in a script. Is it possible to kill/restart only one of them?

I have trouble with this if the scripts are ~/.conkyrc  but it works for all my daily run conkys and test conkys:

The top lines in my conkys are like these samples:

# pkill -xf "conky -c /media/5/Conky/S11_Email_0.conky" &
# pkill -xf "conky -c /media/5/Conky/S11_OJO.conky" &
# pkill -xf "conky -c /media/5/Conky/S11_Vert.conky" &

I run 12 conkys on 3 desktops ... running any of the three commands will kill that specific conky:
ie:

pkill -xf "conky -c /media/5/Conky/S11_Vert.conky" &

2014_03_19_17_28_42_1920x1080_Sector11.jpg«-» 2014_03_19_17_28_54_1920x1080_Sector11.jpg«-» 2014_03_19_17_29_20_1920x1080_Sector11.jpg

How are you doing:

semi transparent conkies and rounded corners

Last edited by Sector11 (2014-03-19 20:36:32)


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7164 2014-03-19 21:52:12

boisei0
#! CrunchBanger
From: Gaanderen, Netherlands
Registered: 2013-07-16
Posts: 193

Re: Conky v1.9 Thread

#!_828 wrote:

^ I wouldn't use random numbers. I've got an idea of what would warrant what Alert Level.

DEFCON 5: Business as usual, minimal threat of SPAM  smile
DEFCON 4: Suspicious activity, but no more than 5 confirmed SPAM incidents  neutral
DEFCON 3: 5-20 confirmed SPAM incidents sad
DEFCON 2: 20-30 confirmed SPAM incidents yikes
DEFCON 1: Over 30 confirmed SPAM incidents 8.(

Of course, it'd be a new Alert Level every day, or whenever I can update it. Therefore, staying up to date with SPAM count is essential.

It might be something fun to do, so if I get something up & running, you'll be the first to know  smile

Got a couple of ideas to work this out. Bit late to start working on it, but I might have some time tomorrow. It involves:

  • Parsing the CrunchBang forums feed

  • Keep the results updated realtime

  • Building a web application around it

I've a server up and running with enough bandwidth and an uptime of over 99%, so serving a single page site will not be a problem wink


YAWS (cli weather script with conkyForecast syntax) | Bitbucket | Github | Blog
Member of the Unofficial #! Emergency Tinfoil Hat Distribution Center
Emergency Tinfoil Hat Conky Alert System development team

Offline

#7165 2014-03-19 22:27:08

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

boisei0 wrote:

Got a couple of ideas to work this out. Bit late to start working on it, but I might have some time tomorrow. It involves:

  • Parsing the CrunchBang forums feed

  • Keep the results updated realtime

  • Building a web application around it

I've a server up and running with enough bandwidth and an uptime of over 99%, so serving a single page site will not be a problem wink

smile I say this is getting bigger than I thought .. wget the results and conky will have it.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7166 2014-03-19 22:58:41

Joe90
#! Junkie
Registered: 2013-10-10
Posts: 337

Re: Conky v1.9 Thread

@ Sector11

Many thanks for the solution on killing one of many conkies smile I'll have to see if I can get all the timings right to minimise "background overlay" from previous image.

In answer to your question I am using lua to get a background on which you can set a colour and an alpha value between 0 and 1, and also a radius for the rounded corners. Found conky entries and lua script via google.

Entries to .conkyrc

lua_load /path/to/draw_bg.lua
lua_draw_hook_pre draw_bg
imlib_cache_size 0

draw_bg.lua

--[[
Background by londonali1010 (2009)

This script draws a background to the Conky window. It covers the whole of the Conky window, but you can specify rounded corners, if you wish.

To call this script in Conky, use (assuming you have saved this script to ~/scripts/):
	lua_load ~/scripts/draw_bg.lua
	lua_draw_hook_pre draw_bg

Changelog:
+ v1.0 -- Original release (07.10.2009)
]]

-- Change these settings to affect your background.
-- "corner_r" is the radius, in pixels, of the rounded corners. If you don't want rounded corners, use 0.

corner_r=25

-- Set the colour and transparency (alpha) of your background.

bg_colour=0xffffff
bg_alpha=0.25

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 conky_draw_bg()
	if conky_window==nil then return end
	local w=conky_window.width
	local h=conky_window.height
	local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, w, h)
	cr=cairo_create(cs)
	
	cairo_move_to(cr,corner_r,0)
	cairo_line_to(cr,w-corner_r,0)
	cairo_curve_to(cr,w,0,w,0,w,corner_r)
	cairo_line_to(cr,w,h-corner_r)
	cairo_curve_to(cr,w,h,w,h,w-corner_r,h)
	cairo_line_to(cr,corner_r,h)
	cairo_curve_to(cr,0,h,0,h,0,h-corner_r)
	cairo_line_to(cr,0,corner_r)
	cairo_curve_to(cr,0,0,0,0,corner_r,0)
	cairo_close_path(cr)
	
	cairo_set_source_rgba(cr,rgb_to_r_g_b(bg_colour,bg_alpha))
	cairo_fill(cr)
end

Requires lua  wink  and cairo, both should already be on board.

Offline

#7167 2014-03-20 00:54:43

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

@ Joe90

You're welcome.

I use an updated version of that script where both elements can be called above TEXT or one above, load lua, and one - or more - below TEXT:
draw_bk.jpg
Give draw-bg.lua a try and see it it helps (mrpeachy also added a lua calendar):

--[[Background originally by londonali1010 (2009)
    ability to set any size for background mrpeachy 2011
    ability to set variables for bg in conkyrc dk75

  the change is that if you set width and/or height to 0
  then it assumes the width and/or height of the conky window

so:

Above and After TEXT  (requires a composite manager or it blinks!)

 lua_load ~/wea_conky/draw_bg.lua
 TEXT
 ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}

OR Both above TEXT (no composite manager required - no blinking!)

 lua_load ~/wea_conky/draw_bg.lua
 lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.2
 TEXT

Note
${lua conky_draw_bg 20 0 0 0 0 0x000000 0.2}
  See below:        1  2 3 4 5 6        7

${lua conky_draw_bg corner_radius x_position y_position width height color alpha}

covers the whole window and will change if you change the minimum_size setting

1 = 20             corner_radius
2 = 0             x_position
3 = 0             y_position
4 = 0             width
5 = 0             height
6 = 0x000000      color
7 = 0.4           alpha

######### calendar function ##################################################

then to use it, you activate the calendar function BELOW TEXT like this

${lua luacal {settings}}

#${lua luacal {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gh=,gt=,gv=,sd=}}
#    x=x position top left
#    y=y position top left
#    tf=title font, eg "mono" must be in quotes
#    tfs=title font size
#    tc=title color
#    ta=title alpha
#    bf=body font, eg "mono" must be in quotes
#    bfs=body font size
#    bc=body color
#    ba=body alpha
#    hf=highlight font, eg "mono" must be in quotes
#    hfs=highlight font size
#    hc=highlight color
#    ha=highlight alpha
#    sp=spacer, eg " " or sp="0"... 0,1 or 2 spaces can help with positioning of non-monospaced fonts

#    gt=gap from title to body
#    gh=gap horizontal between columns
#    gv=gap vertical between rows
#    sd=start day, 0=Sun, 1=Mon

#    hstyle = heading style, 0=just days, 1=date insert
#    tdf=title date font, eg "mono" must be in quotes
#    tdfs=title date font size
#    tdc=title date color
#    tda=title date alpha

# test line
-- ${lua luacal {x=40,y=40,tf="Monofur",tfs=24,tc=0xFFDEAD,ta=1,bf="Monofur",bfs=24,bc=0xFFDEAD,ba=1,hf="Monofur",hfs=24,hc=0x00BFFF,ha=1,sp=" ",gh=40,gt=25,gv=20,sd=0,hstyle=1,tdf="Monofur",tdfs=24,tdc=0x00BFFF,tda=1}}


]]

require 'cairo'
local    cs, cr = nil
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function conky_draw_bg(r,x,y,w,h,color,alpha)
if conky_window == nil then return end
if cs == nil then cairo_surface_destroy(cs) end
if cr == nil then cairo_destroy(cr) 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)
w=w
h=h
if w=="0" then w=tonumber(conky_window.width) end
if h=="0" then h=tonumber(conky_window.height) end
cairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local xbl=(x+r)
local ybl=(y+r)+((h)-(2*r))
-----------------------------
cairo_move_to (cr,xtl,ytl-r)
cairo_line_to (cr,xtr,ytr-r)
cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))
cairo_line_to (cr,xbr+r,ybr)
cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))
cairo_line_to (cr,xbl,ybl+r)
cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))
cairo_line_to (cr,xtl-r,ytl)
cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))
cairo_close_path(cr)
cairo_fill (cr)
------------------------------------------------------------
cairo_surface_destroy(cs)
cairo_destroy(cr)
return ""
end
-- ###### calendar function ##################################################
function conky_luacal(caltab) -- {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gt=,gh=,gv=,sd=,hstyle=,tdf=,tdfs=,tdc=,tda=}
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)
--############################################################################
if caltab.x==nil then
caltab=loadstring("return" .. caltab)()
end
local cal_x=caltab.x
local cal_y=caltab.y
local tfont=caltab.tf		or "mono"
local tfontsize=caltab.tfs	or 12
local tc=caltab.tc			or 0xffffff
local ta=caltab.ta			or 1
local bfont=caltab.bf		or "mono"
local bfontsize=caltab.bfs	or 12
local bc=caltab.bc			or 0xffffff
local ba=caltab.ba			or 1
local hfont=caltab.hf		or "mono"
local hfontsize=caltab.hfs	or 12
local hc=caltab.hc			or 0xff0000
local ha=caltab.ha			or 1
local spacer=caltab.sp		or " "
local gaph=caltab.gh		or 20
local gapt=caltab.gt		or 15
local gapl=caltab.gv		or 15
local sday=caltab.sd		or 0
local hstyle=caltab.hstyle	or 0
--convert colors
--local font=string.gsub(font,"_"," ")
local tred,tgreen,tblue,talpha=rgb_to_r_g_b(tc,ta)
--main body text color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b(bc,ba)
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b(hc,ha)
--############################################################################
--calendar calcs
local year=os.date("%G")
local today=tonumber(os.date("%d"))
local t1 = os.time( {    year=year,month=03,day=01,hour=00,min=0,sec=0} );
local t2 = os.time( {    year=year,month=02,day=01,hour=00,min=0,sec=0} );
local feb=(os.difftime(t1,t2))/(24*60*60)
local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
local day=tonumber(os.date("%w"))+1-sday
local day_num = today
local remainder=day_num % 7
local start_day=day-(day_num % 7)
if start_day<0 then start_day=7+start_day end
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
local x=mdays+start_day
local dnum={}
local dnumh={}
if mdays+start_day<36 then
dlen=35
plen=29
else
dlen=42
plen=36
end
for i=1,dlen do
    if i<=start_day then
    dnum[i]="  "
    else
    dn=i-start_day
        if dn=="nil" then dn=0 end
        if dn<=9 then dn=(spacer .. dn) end
        if i>x then dn="" end
        dnum[i]=dn
        dnumh[i]=dn
        if dn==(spacer .. today) or dn==today then
        dnum[i]=""
        end
        if dn==(spacer .. today) or dn==today then
        dnumh[i]=dn
        place=i
        else dnumh[i]="  "
        end
    end
end--for
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
local extents=cairo_text_extents_t:create()
tolua.takeownership(extents)
if hstyle==0 then
    if tonumber(sday)==0 then
    dys={"SU","MO","TU","WE","TH","FR","SA"}
    else
    dys={"MO","TU","WE","TH","FR","SA","SU"}
    end
    --draw calendar titles
elseif hstyle==1 then
    if tonumber(sday)==0 then
    dys={"SU","MO"," ","  ","  ","FR","SA"}
    cairo_text_extents(cr,"MO",extents)
    local s=extents.x_advance+gaph
    local f=gaph*5
    local tdfont=caltab.tdf        or "mono"
    local tdfontsize=caltab.tdfs    or 12
    local tdc=caltab.tdc        or 0xffffff
    local tda=caltab.tda        or 1
    cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tdfontsize);
    local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
    cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
    local insert=os.date("%b %y")
    cairo_text_extents(cr,insert,extents)
    local w=extents.x_advance
    cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
    cairo_show_text (cr,insert)
    cairo_stroke (cr)
    else
    dys={"MO","TU"," ","  ","  ","SA","SU"}
    cairo_text_extents(cr,"TU",extents)
    local s=extents.x_advance+gaph
    local f=gaph*5
    local tdfont=caltab.tdf        or "mono"
    local tdfontsize=caltab.tdfs    or 12
    local tdc=caltab.tdc        or 0xffffff
    local tda=caltab.tda        or 1
    cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
    cairo_set_font_size (cr, tdfontsize);
    local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda)
    cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha)
    local insert=os.date("%b %y")
    cairo_text_extents(cr,insert,extents)
    local w=extents.x_advance
    cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y)
    cairo_show_text (cr,insert)
    cairo_stroke (cr)
    end
end
--draw calendar titles
for i=1,7 do
cairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, tfontsize);
cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)
cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)
cairo_show_text (cr, dys[i])
cairo_stroke (cr)
end
--draw calendar body
cairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, bfontsize);
cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)
for i=1,plen,7 do
local fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
    cairo_show_text (cr, dnum[i])
    cairo_stroke (cr)
    end
end
--highlight
cairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, hfontsize);
cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)
for i=1,plen,7 do
local fn=i
    for i=fn,fn+6 do
    cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7)))
    cairo_show_text (cr, dnumh[i])
    cairo_stroke (cr)
    end
end
--############################################################################
caltab=nil
dlen=nil
plen=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end
-- end main function #########################################################

2014_03_19_21_28_04_1920x1080_Sector11.jpg

Of the three conkys here the one on the right and email conky on the bottom update almost instantly.

They have settings like this:

## draw-bg.lua Above and/or 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 10 0 0 0 0 0x000000 0.45
# TEXT
#${lua conky_draw_bg 10 0 0 0 0 0x000000 0.45}
#######################################################  End LUA Settings  ###

update_interval 1
TEXT

The weather conky on the left uses it like this (because of the images) and takes about 1 second to change backgrounds when I switch.

## 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 10 0 0 0 0 0x000000 0.45
# TEXT
##${lua conky_draw_bg 10 0 0 0 0 0x000000 0.6}\
#######################################################  End LUA Settings  ###
update_interval 1

TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.6}\
${execi 600 bash /media/5/Conky/Teo_wun/wunder}\

This:

I'll have to see if I can get all the timings right to minimise "background overlay" from previous image.

intrigues me.  Could you post a screen shot of them with the "background overlay"?


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7168 2014-03-20 01:09:03

ragamatrix
#! Junkie
From: Earth
Registered: 2012-12-05
Posts: 286

Re: Conky v1.9 Thread

Hi!
I'm discovering dzen2 bar with conky, the nice news is dzen2 accept "click option menu" and popup informations, but I'm learning slowly for coding things for it...
Screen is a compiz-stand-alone session (with deskmenu right click like openbox). Soon as possible the french #! team share to you this session packages with a translated menu. Few ressources used for these "big-graphics-effects" session. It's like a compiz rebirth..?
sscsa.jpgcompiz_en.jpg

Last edited by ragamatrix (2014-03-20 01:13:17)

Offline

#7169 2014-03-20 09:56:09

Joe90
#! Junkie
Registered: 2013-10-10
Posts: 337

Re: Conky v1.9 Thread

@ Sector11

Thanks for the lua scripts and configs, will try out smile

Here is a screenshot where I have exaggerated the problem. The "Daily News" conky has an interval of 30 seconds, the clock, 1 seccond and the background is changing every 15 seconds. The clock is fine, this updates in a second so no big problem with that (unless there is a way around it!) but I am looking to resolve the delay in update for the big conky. The small square conky is running at a different interval showing another background!

1024_scrot2.jpg

Offline

#7170 2014-03-20 13:43:27

boisei0
#! CrunchBanger
From: Gaanderen, Netherlands
Registered: 2013-07-16
Posts: 193

Re: Conky v1.9 Thread

I forgot to mention the hardest part: building and training the spam filter itself. Just started the development. I do not expect to release within a week, as selecting training material for the filter is quite difficult.


YAWS (cli weather script with conkyForecast syntax) | Bitbucket | Github | Blog
Member of the Unofficial #! Emergency Tinfoil Hat Distribution Center
Emergency Tinfoil Hat Conky Alert System development team

Offline

#7171 2014-03-20 14:32:52

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

@ Joe90

OK, without knowing what is under TEXT I'll see if I can help.

I have a conky that updates every second.  But the info in that conky only gets displayed ONCE - when the conky starts:

pre_exec
     shell command
     Executes a shell command one time before conky displays anything and puts output as text.

Example: the TV listing:

${pre_exec head /media/5/Conky/Days/all.txt -n 28}

and the one other command that will not accept that - a calendar script: once a day:

${execpi 86400 ncal -bh | /media/5/Conky/scripts/ncal2.awk}

So I copied everything into:

1. test_l.conky	- update_interval 0.5
2. test_m.conky	- update_interval 15
3. test_r.conky	- update_interval 30

On the bottom of them I added a couple of conky commands that update when conky updates:

CPU Avg:   ${alignc}${membar 0,25}   ${cpu cpu0}
${alignc}${time %T}

Changed the wallpaper and took a screenshot... then again after each of the next two updated.
2014_03_20_11_03_26_1920x1080_Sector11.jpg«-» 2014_03_20_11_03_39_1920x1080_Sector11.jpg«-» 2014_03_20_11_04_00_1920x1080_Sector11.jpg

That conky on the left updates every .5 seconds, change the wall paper and it's maybe a second behind, and all three conkys update the information at the same time (or not at all).

Does that help you?

update_interval 0.5
TEXT
${font monofur:size=20}${alignc}${color6}Easter${color}${font}
${alignc}${pre_exec ncal -e}
${color7}${hr}${color}
${execpi 86400 ncal -bh | /media/5/Conky/scripts/ncal2.awk}
${color7}${hr}${color}
${font monofur:size=20}${alignc}${color6}Today${color}${font}
${pre_exec remind -q -r ~/.reminders | fold -sw70 | sed -e "/.*(today):/d" -e '/^$/d'}
${color7}${hr}${color}
${font monofur:size=20}${alignc}${color6}This Month${color}${font}
${pre_exec rem -s | cut -c9-10,19-}
${color7}${hr}${color}
${pre_exec head /media/5/Conky/Days/all.txt -n 28}
CPU Avg:   ${alignc}${membar 0,25}   ${cpu cpu0}
${alignc}${time %T}

EDIT:  Looking at that I see where I can trim some fat. - Off to tweak.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7172 2014-03-20 14:36:30

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

ragamatrix wrote:

I'm learning slowly for coding things for it...

That's the best part! Up there ↑↑↑

I like the looks of that ... on other computers.  It doesn't do anything for me, but it does look nice!  wink


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7173 2014-03-20 14:38:30

Sector11
#!'er to BL'er
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 15,667
Website

Re: Conky v1.9 Thread

boisei0 wrote:

I forgot to mention the hardest part: building and training the spam filter itself. Just started the development. I do not expect to release within a week, as selecting training material for the filter is quite difficult.


Say what!  A week?  That fast huh!  I though longer .... 

Just kidding.  The fact you are trying to pull this out of a hat is great.  We'll get it when it's done, not a problem.

Thanks.


·  ↓   ↓   ↓   ↓   ↓   ↓  ·
BunsenLabs Forums now Open for Registration
·  ↑   ↑   ↑   ↑   ↑   ↑  · BL ModSquad

Offline

#7174 2014-03-20 21:50:16

Joe90
#! Junkie
Registered: 2013-10-10
Posts: 337

Re: Conky v1.9 Thread

@ sector 11

I have got as close as I can, it is a bit lengthy but does what I want. Conky with update interval of 1 second, which deals with the background changing in an acceptable timeframe, and text display remaining on screen for 10 seconds, then a new text for 10 seconds, then a further new text for 10 seconds, then back to the beginning again. With thanks to MrPeachy I achieved this with updatenr. Below is the pertinent parts of my conkyrc. Be good to know if I could get this into a loop to cut down on the length of it! My little raspberrypi is chugging along at 30% CPU doing this.

update_interval 1.0

TEXT
${font Mono:pixelsize=40}${color orange}DAILY NEWS: ${hr 2}$color${font}
${color white}
${font Mono:pixelsize=35}\
${if_updatenr 1}${exec cat t1.txt}\
${else}\
${if_updatenr 2}${exec cat t1.txt}\
${else}\
${if_updatenr 3}${exec cat t1.txt}\
${else}\
${if_updatenr 4}${exec cat t1.txt}\
${else}\
${if_updatenr 5}${exec cat t1.txt}\
${else}\
${if_updatenr 6}${exec cat t1.txt}\
${else}\
${if_updatenr 7}${exec cat t1.txt}\
${else}\
${if_updatenr 8}${exec cat t1.txt}\
${else}\
${if_updatenr 9}${exec cat t1.txt}\
${else}\
${if_updatenr 10}${exec cat t1.txt}\
${else}\
${if_updatenr 11}${exec cat t2.txt}\
${else}\
${if_updatenr 12}${exec cat t2.txt}\
${else}\
${if_updatenr 13}${exec cat t2.txt}\
${else}\
${if_updatenr 14}${exec cat t2.txt}\
${else}\
${if_updatenr 15}${exec cat t2.txt}\
${else}\
${if_updatenr 16}${exec cat t2.txt}\
${else}\
${if_updatenr 17}${exec cat t2.txt}\
${else}\
${if_updatenr 18}${exec cat t2.txt}\
${else}\
${if_updatenr 19}${exec cat t2.txt}\
${else}\
${if_updatenr 20}${exec cat t2.txt}\
${else}\
${if_updatenr 21}${exec cat t3.txt}\
${else}\
${if_updatenr 22}${exec cat t3.txt}\
${else}\
${if_updatenr 23}${exec cat t3.txt}\
${else}\
${if_updatenr 24}${exec cat t3.txt}\
${else}\
${if_updatenr 25}${exec cat t3.txt}\
${else}\
${if_updatenr 26}${exec cat t3.txt}\
${else}\
${if_updatenr 27}${exec cat t3.txt}\
${else}\
${if_updatenr 28}${exec cat t3.txt}\
${else}\
${if_updatenr 29}${exec cat t3.txt}\
${else}\
${if_updatenr 30}${exec cat t3.txt}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
${endif}\
$color${font}

Last edited by Joe90 (2014-03-20 22:01:27)

Offline

Be excellent to each other!

#7175 2014-03-20 22:50:11

boisei0
#! CrunchBanger
From: Gaanderen, Netherlands
Registered: 2013-07-16
Posts: 193

Re: Conky v1.9 Thread

Sector11 wrote:
boisei0 wrote:

I forgot to mention the hardest part: building and training the spam filter itself. Just started the development. I do not expect to release within a week, as selecting training material for the filter is quite difficult.


Say what!  A week?  That fast huh!  I though longer .... 

Just kidding.  The fact you are trying to pull this out of a hat is great.  We'll get it when it's done, not a problem.

Thanks.

Well, it's almost working now. Next step is to gather enough spam messages to train the filter. This will take quite a bit of time, as I need lots of messages for an automated system that can be trusted.


YAWS (cli weather script with conkyForecast syntax) | Bitbucket | Github | Blog
Member of the Unofficial #! Emergency Tinfoil Hat Distribution Center
Emergency Tinfoil Hat Conky Alert System development team

Offline

Board footer

Powered by FluxBB

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

Debian Logo