SEARCH

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

You are not logged in.

#3176 2012-10-08 14:37:43

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,017
Website

Re: The New Monster Conky Thread

Deegan wrote:

Hi boys, need one help of yours!! wink

Thanks.....;)

Ciao vecchio amico.
- (check your messages - top of the page)

1. glad to see a conkyForecast still in use.
2. upgrade to conky v1.9.0-2 if possible.
3. conky v1.8.1-6 has problems in general and especially with ${goto} statements in the conkyForecast.template
4. may or may not help but is a good idea, kaivalagi showed in a post where it can cause errors:
- take all commands like this: $stippled_hr
- and add the {} = ${stippled_hr}
5. are you still using Ubuntu? Unity? We need to know.
6. where do you keep your conkyForecast cache?

#===============================================#
# USER SETTINGS, EDIT BASED ON DOCUMENTED SETUP #
#===============================================#
CACHE_FOLDERPATH = /home/sector11/Conky/cache/

Please show me:

/home/deegan/.scripts/varese.template

#! Conky = 13 Threads & the Conky Archives | Conky PitStop | OHCG'er
#! Forum Moderator   |   StartPage -  protect your privacy   |   BBQ Linux

Offline

Be excellent to each other!

#3177 2012-10-08 15:20:47

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,017
Website

Re: The New Monster Conky Thread

arclance wrote:

I don't recognize that error but you really should not use v1.8.1 it had a lot of problems.
You should upgrade to v1.9.0 and see if that fixes it.

Errore di segmentazione = Segmentation Fault

Wow, I would have though you would have known about that?  It's been an issue for a while now:  Google: conky 1.8.1 segfault error

And I mean no disrespect by the above whatsoever ... just surprised me.

But you're right ... upgrading should fix it.


#! Conky = 13 Threads & the Conky Archives | Conky PitStop | OHCG'er
#! Forum Moderator   |   StartPage -  protect your privacy   |   BBQ Linux

Offline

#3178 2012-10-08 15:49:48

dlharp2
Member
Registered: 2009-05-17
Posts: 14

Re: The New Monster Conky Thread

Sector11 wrote:
dlharp2 wrote:

I keep getting the error:

/conky-rss.sh: 1: Syntax error: newline unexpected

i'm pretty frustrated.  lol

EDIT:  I got it working!

no no no no no no no no ... did I say no?

That doesn't work - How did you get it working would be wonderful!  big_smile

Here is how i got it working:

conkyrc2 file:

\

# conky configuration
#
# The list of variables has been removed from this file in favour
# of keeping the documentation more maintainable.
# Check http://conky.sf.net for an up-to-date-list.
#
# For ideas about how to modify conky, please see:
# http://crunchbanglinux.org/forums/topic … ky-config/
#
# For help with conky, please see:
# http://crunchbanglinux.org/forums/topic … onky-help/
#
# Enjoy! smile
##############################################
# Settings
##############################################
background yes
use_xft yes
xftfont Liberation Sans:size=9
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
##############################################
# Compositing tips:
# Conky can play strangely when used with
# different compositors. I have found the
# following to work well, but your mileage
# may vary. Comment/uncomment to suit.
##############################################
## no compositor
own_window_type override
own_window_argb_visual no

## xcompmgr
#own_window_type override
#own_window_argb_visual yes

## cairo-compmgr
#own_window_type desktop
#own_window_argb_visual yes
##############################################
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 700 200
maximum_width 700
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color 000000
default_outline_color 828282
alignment bottom_left
gap_x 12
gap_y 15
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no
##############################################
#  Output
##############################################
TEXT


     
    ${execi 300 /home/sid/simple-rss-reader.pl }


simple-rss-reader.pl:

#!/usr/bin/perl -w

############################
# Creator: Jeff Israel
#
# Script:    ./simple-rss-reader-v3.pl
# Version:     3.001
#
# Coded for for Wikihowto http://howto.wikia.com
#
# Description:     This code downloads an RSS feed,
#         extracts the <title> lines,
#         cleans them up lines,
#         prints the pretty lines
#         exits on max-lines
# Usage:
# .conkyrc: ${execi [time] /path/to/script/simple-rss-reader-v3.pl}
#
# Usage Example
# ${execi 300 /path/to/script/simple-rss-reader-v3.pl}
#

use LWP::Simple;


############################
# Configs
#

#$rssPage = "http://tvrss.net/feed/combined/";
$rssPage = "http://uknow.uky.edu/athleticsRSS";
$numLines = 10;
$maxTitleLenght = 700;

###########################
# Code
#

# Downloading RSS feed
my $pageCont = get($rssPage);

# Spliting the page to lines
@pageLines = split(/\n/,$pageCont);

# Parse each line, strip no-fun data, exit on max-lines
$numLines--; #correcting count for loop
$x = 0;
foreach $line (@pageLines) {
    if($line =~ /\<title\>/){ # Is a good line?
        #print "- $line\n";
        $lineCat = $line;
        $lineCat =~ s/.*\<title\>//;
        $lineCat =~ s/\<\/title\>.*//;
        $lineCat =~ s/\[.{4,25}\]$//; # strip no-fun data ( [from blaaa] )
        $lineCat =~ substr($lineCat, 0, $maxTitleLenght);
        print "- $lineCat \n";
        $x++;
    }
    if($x > $numLines) {
        last; #exit on max-lines
    }
   
}

#print $page;
#print "\nBy Bye\n";


would like to have scrolling but i am satisfied with this for now.

Offline

#3179 2012-10-08 16:56:58

arclance
#! Die Hard
Registered: 2012-03-29
Posts: 883

Re: The New Monster Conky Thread

Sector11 wrote:
arclance wrote:

I don't recognize that error but you really should not use v1.8.1 it had a lot of problems.
You should upgrade to v1.9.0 and see if that fixes it.

Errore di segmentazione = Segmentation Fault

Wow, I would have though you would have known about that?  It's been an issue for a while now:  Google: conky 1.8.1 segfault error

And I mean no disrespect by the above whatsoever ... just surprised me.

But you're right ... upgrading should fix it.

I never used v1.8.1, that is why I did not recognize it immediately.
When I switched to Debian it had v1.8.1 and I saw the "execp output alignment is broken" bug so I complied v1.8.2 from git which had a fix for that bug in it.

I had heard of that bug before but I did not go look things up to see if that was really what it is.
There is more than one way to cause a segmentation fault so I would have had to ask more questions to be sure what the problem was.
Since v1.8.1 was so broken I just recommended upgrading to v1.9.0 so it would be possible to figure out the problem if it was not caused by using v1.8.1.

Offline

#3180 2012-10-08 17:17:43

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,017
Website

Re: The New Monster Conky Thread

dlharp2 wrote:

would like to have scrolling but i am satisfied with this for now.

Thanks for sharing that ... scrolling, I saw one the other day - across the top of the monitor Tickr - not conky though, but clickable.

Tickr is a GTK-based RSS/Atom Reader that displays feeds as a smooth
scrolling line on your Desktop, as known from TV stations. Open feed
links in your favourite Browser. Graphics are highly customizable.

sudo apt-get install tickr

acwHlku6.jpg


#! Conky = 13 Threads & the Conky Archives | Conky PitStop | OHCG'er
#! Forum Moderator   |   StartPage -  protect your privacy   |   BBQ Linux

Offline

#3181 2012-10-08 17:28:52

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,017
Website

Re: The New Monster Conky Thread

arclance wrote:

I never used v1.8.1, that is why I did not recognize it immediately.
When I switched to Debian it had v1.8.1 and I saw the "execp output alignment is broken" bug so I complied v1.8.2 from git which had a fix for that bug in it.

I had heard of that bug before but I did not go look things up to see if that was really what it is.
There is more than one way to cause a segmentation fault so I would have had to ask more questions to be sure what the problem was.
Since v1.8.1 was so broken I just recommended upgrading to v1.9.0 so it would be possible to figure out the problem if it was not caused by using v1.8.1.

Well, that explains it.  big_smile  Not being as well versed in the ways of Linux as you are I have to depend on DEB packages.  big_smile  I saw that mess and stayed with 1.8.0 until 1.8.1-5 came out, it was OK but had a few built in "Oopsies!", as mobilediesel would say.  I went back to 1.8.0 when 1.8.1-6 came out that was a disaster.

Never knew that 1.8.2 existed.
I have a collection of them:

  • conky_1.6.0-2+lenny1_amd64.deb

  • conky_1.7.1.1-1_amd64.deb

  • conky_1.8.0-1+squeeze1_all.deb

  • conky-all_1.8.0-1_amd64.deb

  • conky-all_1.8.0-1+squeeze1_i386.deb

  • conky-all_1.8.1-5_amd64.deb

  • conky-all_1.8.1-6_amd64.deb

  • conky-all_1.9.0-2_amd64.deb

  • conky-all_1.9.0-2_i386.deb

  • conky-cli_1.8.0-1+squeeze1_amd64.deb

  • conky-cli_1.8.0-1+squeeze1_i386.deb

  • conky-cli_1.9.0-2_amd64.deb

  • conky-cli_1.9.0-2_i386.deb

  • conky-std_1.8.0-1+squeeze1_amd64.deb

  • conky-std_1.8.0-1+squeeze1_i386.deb

  • conky-std_1.9.0-2_amd64.deb

  • conky-std_1.9.0-2_i386.deb

Some people collect spoons, some music, others baseball cards ... me!

- I can quite any time  lol
Now it's 1.9.0-2  wink

Last edited by Sector11 (2012-10-08 17:29:51)


#! Conky = 13 Threads & the Conky Archives | Conky PitStop | OHCG'er
#! Forum Moderator   |   StartPage -  protect your privacy   |   BBQ Linux

Offline

#3182 2012-10-08 19:29:03

1LordAnubis
New Member
Registered: 2012-10-08
Posts: 4

Re: The New Monster Conky Thread

What I want: the 'proper' CPU temp displayed in conky
The CPU: AMD Bulldozer, 6 core (FX-6100)

sensors output:

fam15h_power-pci-00c4
Adapter: PCI adapter
power1:       27.43 W  (crit =  95.01 W)

k10temp-pci-00c3
Adapter: PCI adapter
temp1:        +10.2°C  (high = +70.0°C)
                       (crit = +90.0°C, hyst = +87.0°C)

Now, if I understand correctly, it's saying that my temperature is 10.2°C ; this is incorrect. I have the ability of reading the correct, believable temperature in the bios, which is usually ~35C (95F)

I stuck ${execi 10 sensors | grep ^temp1 | tail -n 1 |awk '{print $2}'} in conky, and upon login, for an instant lo and behold it displayed the correct temperature (37C), and after a second went to the usual ~10.0C

Well... when looking at my sensors output, something else looked a bit odd... it seems the proportion of the power1 value of the crit value is equal to my 'proper' temperature.
In other words, if i goto my sensors output, and do (95.01/27.43)*10.2 , I get 35.33 C (95.6F)... the 'proper' temperature...

When I do cat /sys/module/k10temp/drivers/pci\:k10temp/0000\:00\:18.3/temp1_input, on the other hand, the value seems to have no correlation with the temperature whatsoever at around 10500

Is it supposed to display temp1 as a proportion of the power usage to max usage?
How can I get out this info, and put it in conky?

I need 95.01/ the output of sensors | grep ^power1 | tail -n 1 |awk '{print $2}' , multiplied by the output of sensors | grep ^temp1 | tail -n 1 |awk '{print $2}' , then converted to F --> *(9/5)+32

What is the best way to do this?, is it possible to do in conky, or should you use a script?

Thanks

Offline

#3183 2012-10-08 19:32:07

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 10,163
Website

Re: The New Monster Conky Thread

^ That sensors output looks incomplete.

Have you run sudo sensors-detect?  This assumes that you have lm_sensors installed.

This is my sensors output after running those

vastone@vastone:~$ sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +71.0°C  (high = +82.0°C, crit = +100.0°C)
Core 1:       +69.0°C  (high = +82.0°C, crit = +100.0°C)
Core 2:       +68.0°C  (high = +82.0°C, crit = +100.0°C)
Core 3:       +68.0°C  (high = +82.0°C, crit = +100.0°C)

f8000-isa-0a00
Adapter: ISA adapter
+3.3V:        +3.31 V  
3VSB:         +3.36 V  
Vbat:         +3.28 V  
fan1:        1560 RPM
fan2:        1374 RPM
fan3:           0 RPM  ALARM
fan4:           0 RPM
temp1:        +47.0°C  (high = +70.0°C, hyst = +60.0°C)
temp2:        +53.0°C  (high = +100.0°C, hyst = +85.0°C)
temp3:        +55.0°C  (high = +100.0°C, hyst = +85.0°C)

VSIDO | SolusOS

Words That Build Or Destroy

Offline

#3184 2012-10-08 19:39:07

1LordAnubis
New Member
Registered: 2012-10-08
Posts: 4

Re: The New Monster Conky Thread

I ran sensors-detect, which gives me more outputs:

k10temp-pci-00c3
Adapter: PCI adapter
temp1:        +20.0°C  (high = +70.0°C)
                       (crit = +90.0°C, hyst = +87.0°C)

fam15h_power-pci-00c4
Adapter: PCI adapter
power1:       54.09 W  (crit =  95.01 W)

it8721-isa-0290
Adapter: ISA adapter
in0:          +2.81 V  (min =  +1.64 V, max =  +1.42 V)  ALARM
in1:          +2.77 V  (min =  +0.59 V, max =  +0.68 V)  ALARM
in2:          +0.98 V  (min =  +1.61 V, max =  +1.82 V)  ALARM
+3.3V:        +3.36 V  (min =  +2.76 V, max =  +2.57 V)  ALARM
in4:          +1.85 V  (min =  +1.74 V, max =  +1.54 V)  ALARM
in5:          +2.51 V  (min =  +0.59 V, max =  +0.78 V)  ALARM
in6:          +0.00 V  (min =  +0.34 V, max =  +1.02 V)  ALARM
3VSB:         +0.00 V  (min =  +2.45 V, max =  +2.16 V)  ALARM
Vbat:         +3.41 V  
fan1:        1400 RPM  (min =   80 RPM)
fan2:        2109 RPM  (min =  532 RPM)
fan3:           0 RPM  (min =   39 RPM)  ALARM
temp1:        +36.0°C  (low  =  +0.0°C, high =  +0.0°C)  ALARM  sensor = thermistor
temp2:        +31.0°C  (low  = +43.0°C, high = +45.0°C)  sensor = thermistor
temp3:       -128.0°C  (low  = -30.0°C, high = +64.0°C)  sensor = disabled
intrusion0:  OK

However, the fam15h and k10temp are the ones that seem to determine my cpu temperature...

Edit: now that you mention it, the temp1 value down at the bottom of the updated sensors output looks pretty true to the mark...

Last edited by 1LordAnubis (2012-10-08 19:50:01)

Offline

#3185 2012-10-08 19:43:54

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 10,163
Website

Re: The New Monster Conky Thread

^ I think this line is your cpu temp

temp1:        +36.0°C  (low  =  +0.0°C, high =  +0.0°C)  ALARM  sensor = thermistor

If you also agree, I can show you how to get that output to Conky.


VSIDO | SolusOS

Words That Build Or Destroy

Offline

#3186 2012-10-08 19:53:04

1LordAnubis
New Member
Registered: 2012-10-08
Posts: 4

Re: The New Monster Conky Thread

Ahh, didn't see your post there when I edited; I'm testing to see currently, but I do believe that temp1 line looks like my cpu temp.

THANK YOU ; I just assumed the k10temp would give me what I wanted...

Last edited by 1LordAnubis (2012-10-08 19:53:50)

Offline

#3187 2012-10-08 20:49:51

dlharp2
Member
Registered: 2009-05-17
Posts: 14

Re: The New Monster Conky Thread

Sector11 wrote:
dlharp2 wrote:

would like to have scrolling but i am satisfied with this for now.

Thanks for sharing that ... scrolling, I saw one the other day - across the top of the monitor Tickr - not conky though, but clickable.

Tickr is a GTK-based RSS/Atom Reader that displays feeds as a smooth
scrolling line on your Desktop, as known from TV stations. Open feed
links in your favourite Browser. Graphics are highly customizable.

sudo apt-get install tickr

acwHlku6.jpg

love tickr althoug very, very buggy.

I managed to fix the layering problems by decorating tickers then layering it to always on bottom.  then i removed the decorations.

Offline

#3188 2012-10-08 21:09:17

1LordAnubis
New Member
Registered: 2012-10-08
Posts: 4

Re: The New Monster Conky Thread

Alright, meh updated conky:

snapshot29thumb.png

background no
use_xft yes
xftfont "nimbus sans l-8"
#xftfont "Terminus:size=7"
xftalpha 0.9
update_interval 1.0
total_run_times 0
own_window yes
own_window_type desktop
own_window_transparent no
own_window_hints undecorated,sticky,skip_taskbar,skip_pager
double_buffer yes
#minimum_size 4 0
maximum_width 1920
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes
default_color FFFFFF
default_shade_color 101319
default_outline_color green
alignment top_middle
gap_x 5
gap_y 0
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
temperature_unit "fahrenheit"

TEXT
${color 0968E6}${font ConkySymbols:size=10}t${font nimbus sans l:size=8}${voffset -4}$color  ${color 53aedc}Uptime: ${color}${uptime} ${color 53aedc}  |  Kern: ${color}$kernel ${color 53aedc}  |  CPU: ${color}${cpu}%${color 53aedc}  | TEMP: ${color}${execi 1 sensors | grep ^temp1 | tail -n 1 |awk '{print ($2*9)/5+32}'} F${color 53aedc}  |  GPU: $color}${execi 10 nvidia-settings -q GPUCoreTemp | awk '{if (NR==2) {print ($4*9)/5+32}}'} F${color 53aedc}  |  GPU MEM-Clock: ${color}${nvidia memfreq}${color 53aedc}  |  RAM: ${color}$memperc%${color 53aedc}  |  SWAP: ${color}$swapperc%${color 53aedc}  |  /root: ${color}${fs_free /}/${fs_size /}${color 53aedc}  |  /home: ${color}${fs_free /home}/${fs_size /home}${color 53aedc}  |  IP: ${color}${addr eth0}${color 53aedc}  |  Wireless: ${color}${wireless_essid wlan0} @ ${wireless_link_qual_perc wlan0}%${color 53aedc}  |  Up: ${color}${upspeedf eth0}k/s${color 53aedc}  |  Down: ${color}${downspeedf eth0}k/s${color 53aedc}   |  Downloaded: ${color}${totaldown eth0}${color 53aedc}  |   ${color}${execi 1200 sh ~/scripts/weather.sh} ${color 53aedc} |   ${execi 1800 perl /home/anubis/scripts/conky-updates.pl}${color} ${execi 1800 ~/scripts/newpm.sh}${voffset -1}${font PizzaDude Bullets:size=9}U${font nimbus sans l:size=8} ${exec head -n1 ~/scripts/pacmanupdates.txt} ${voffset -1}${font PizzaDude Bullets:size=9}O${font nimbus sans l:size=8} ${exec tail -n1 ~/scripts/pacmanupdates.txt}${color 53aedc} | ${color} ${time %l:%M %P }  ${color 53aedc} |   ${color}

weather.sh:

#!/bin/sh
#Accuweather script for conky
#
#adapted from Michael Seiler 2007 by p brisbin
#

METRIC=0 #0 for deg F, 1 for deg C
LOC=28457

curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=${LOC} | perl -ne 'if (/Currently/) {chomp;/\<title\>Currently: (.*)?\<\/title\>/; print "$1";}'

Offline

#3189 2012-10-09 00:14:28

dlharp2
Member
Registered: 2009-05-17
Posts: 14

Re: The New Monster Conky Thread

yeah...i love that anubis

Offline

#3190 2012-10-09 03:42:07

Vicophine
#! Member
From: Detroit, MI
Registered: 2009-11-02
Posts: 98
Website

Re: The New Monster Conky Thread

Sector11 wrote:
Vicophine wrote:

Moderately simple conky config, only variables are the font (free font "silkscreen" required) and the resolution should be manually set depending on your own.

smile

tZnNwaw

I popped in to tell you that a scrot would be nice and saw the code for an image.

tZnNwaw <<-- I though it was a line.

lol lol --> OK chuckle done!! Nice oneliner.


Haha yeah I tried to make it bigger, but oh well, at least you saw it!


Thinkpad x120e 8GB DDR3, 1.6Ghz X2 - Laptop/Netbook
AMD Athlon X2 OC'ed to 3.33GHz, 4GB DDR2 2TBx2 - Desktop/Seedbox

Offline

#3191 2012-10-09 14:05:39

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,017
Website

Re: The New Monster Conky Thread

Vicophine wrote:
Sector11 wrote:

lol lol --> OK chuckle done!! Nice oneliner.

Haha yeah I tried to make it bigger, but oh well, at least you saw it!

Yea, but did I tell you I still needed a magnifying glass to read it.
Now that's tiny ... or my eyes are not as good as I thought.
Combination of both maybe. wink


#! Conky = 13 Threads & the Conky Archives | Conky PitStop | OHCG'er
#! Forum Moderator   |   StartPage -  protect your privacy   |   BBQ Linux

Offline

#3192 2012-10-09 16:26:26

TeoBigusGeekus
#! Die Hard
From: /Greece/Kastoria
Registered: 2012-04-28
Posts: 675

Re: The New Monster Conky Thread

To all archey users: try alsi instead.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3193 2012-10-09 17:51:42

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,017
Website

Re: The New Monster Conky Thread

TeoBigusGeekus wrote:

To all archey users: try alsi instead.

alsi? what's that?  New form of conky?


#! Conky = 13 Threads & the Conky Archives | Conky PitStop | OHCG'er
#! Forum Moderator   |   StartPage -  protect your privacy   |   BBQ Linux

Offline

#3194 2012-10-09 18:02:00

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

Re: The New Monster Conky Thread

^ I think he's talking about this:

http://i42.tinypic.com/6qbs3p.jpg

it's in the Arch aur repository.


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

Offline

#3195 2012-10-09 18:13:11

dura
Bloated Gimp
From: interzone
Registered: 2012-09-15
Posts: 2,106

Re: The New Monster Conky Thread

Sector11 wrote:

Yea, but did I tell you I still needed a magnifying glass to read it.
Now that's tiny ... or my eyes are not as good as I thought.
Combination of both maybe. wink

A slight case of conky blindness perhaps? wink

Offline

#3196 2012-10-09 18:17:56

dura
Bloated Gimp
From: interzone
Registered: 2012-09-15
Posts: 2,106

Re: The New Monster Conky Thread

To all archey users: try alsi instead.

It looks like it only has support for arch logos currently (they're the only ones visible in the text).

Offline

#3197 2012-10-09 20:04:22

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,017
Website

Re: The New Monster Conky Thread

PackRat wrote:

^ I think he's talking about this:

http://i42.tinypic.com/6qbs3p.jpg

it's in the Arch aur repository.

That looks good... ARCH huh sad


#! Conky = 13 Threads & the Conky Archives | Conky PitStop | OHCG'er
#! Forum Moderator   |   StartPage -  protect your privacy   |   BBQ Linux

Offline

#3198 2012-10-09 20:30:32

Sector11
77345 ¡#
From: SR11 Cockpit
Registered: 2010-05-05
Posts: 11,017
Website

Re: The New Monster Conky Thread

d! wrote:

Sector11 wrote:

Yea, but did I tell you I still needed a magnifying glass to read it.
Now that's tiny ... or my eyes are not as good as I thought.
Combination of both maybe. wink

A slight case of conky blindness perhaps? wink

I would never admit to that!  cool
It's an age thing and I really do wear specks!

Talking about conky blindness here's something new:
adeOXaU9.jpg

doggie wrote:

OH! OH! Pick me! Pick me!

Shamelessly borrowed, with modifications, from Voyager Linux while found on the ARCH forums.
Imagine that no shame anywhere.  wink

The Oneliner:

#=== borrowed from: === Voyager Linux === http://voyager.legtux.org/ =========
###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_colour black
own_window_class Conky
own_window_title OneLiner

# 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 override
own_window_argb_visual yes

### When ARGB visuals are enabled, this use this to modify the alpha value
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 200

#minimum_size 500 500 ## width, height
#maximum_width 500  ## width, usually a good idea to be '=' or '>' minimum width

gap_x -40 # left-right
gap_y 5 # up-down

alignment top_middle
###################################################  End Window Settings  ###
###  Font Settings  #########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont DejaVu Sans Mono:size=9

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 0
# Force UTF8? requires XFT ###
override_utf8_locale yes

draw_shades no
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 grey
default_outline_color black

default_color DCDCDC #220 220 220    Gainsboro
color0 8FBC8F #143 188 143    DarkSeaGreen
color1 778899 #119 136 153    LightSlateGray
color2 FF8C00 #255 140   0    DarkOrange
color3 7FFF00 #127 255   0    Chartreuse
color4 FFA07A #255 160 122    LightSalmon
color5 FFDEAD #255 222 173    NavajoWhite
color6 00BFFF #  0 191 255    DeepSkyBlue
color7 00FFFF #  0 255 255    Cyan
color8 FFFF00 #255 255   0    Yellow
color9 B22222 #178  34  34    FireBrick
#####################################################  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 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

##############################################  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.6}
#
## ${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/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg 5 0 0 0 0 0x000000 0.3
#
#######################################################  End LUA Settings  ###
# The 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


TEXT
 ${color6}HHD${color8} ${execi 15 hddtemp -n /dev/sda}°${color3} / ${color}${fs_free /} | ${fs_size /} ${color3}/home ${color}${fs_free /home} | ${fs_size /home}  ${color6}RAM${color} ${color3}${if_match ${memperc} < 10}00${memperc}\
${else}${if_match ${memperc} < 100}0${memperc}\
${else}${memperc}\
${endif}${endif} %${color} ${mem} | ${memmax}  ${color6}CPU ${color8}${platform f71882fg.2560 temp 1}°${color} ${color3}1|${color}${if_match ${cpu cpu1} < 10}00${cpu cpu1}\
${else}${if_match ${cpu cpu1} < 100}0${cpu cpu1}\
${else}${cpu cpu1}\
${endif}${endif}·${color3}2|${color}${if_match ${cpu cpu2} < 10}00${cpu cpu2}\
${else}${if_match ${cpu cpu2} < 100}0${cpu cpu2}\
${else}${cpu cpu2}\
${endif}${endif}·${color3}3|${color}${if_match ${cpu cpu3} < 10}00${cpu cpu3}\
${else}${if_match ${cpu cpu3} < 100}0${cpu cpu3}\
${else}${cpu cpu3}\
${endif}${endif}·${color3}A|${color}${color3}${if_match ${cpu cpu0} < 10}00${cpu cpu0}\
${else}${if_match ${cpu cpu0} < 100}0${cpu cpu0}\
${else}${cpu cpu0}\
${endif}${endif} % ${color6}GPU ${color8}${nvidia temp}° ${color3}Vid ${color}${nvidia gpufreq} Mhz${color3} MEM ${color}${nvidia memfreq} Mhz ${color6}MOBO${color8} ${platform f71882fg.2560 temp 2}°${color}

The Clock:

#=== borrowed from: === Voyager Linux === http://voyager.legtux.org/ =========
#                               conkyrc_orange
#
#  author  : SLK
#  version : v2011011601
#  license : Distributed under the terms of GNU GPL version 2 or later
#
#=== Modified by: Sector11 09 Oct 12 =========================================
###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
#own_window_colour black
own_window_class Conky
own_window_title Clock

### 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
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 200

# 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 156 0 ## width, height
maximum_width 156  ## width

gap_x 5 # left-right
gap_y 5 # up-down

alignment top_left
###################################################  End Window Settings  ###
###  Font Settings  #########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont WenQuanYi Micro Hei Mono:size=8

# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 0
# Force UTF8? requires XFT ###
override_utf8_locale yes

draw_shades no
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 grey
default_outline_color black

default_color DCDCDC #220 220 220    Gainsboro
color0 8FBC8F #143 188 143    DarkSeaGreen
color1 778899 #119 136 153    LightSlateGray
color2 FF8C00 #255 140   0    DarkOrange
color3 7FFF00 #127 255   0    Chartreuse
color4 FFA07A #255 160 122    LightSalmon
color5 FFDEAD #255 222 173    NavajoWhite
color6 00BFFF #  0 191 255    DeepSkyBlue
color7 00FFFF #  0 255 255    Cyan
color8 FFFF00 #255 255   0    Yellow
color9 B22222 #178  34  34    FireBrick
#####################################################  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 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

##############################################  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.6}
#
## ${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/LUA/draw-bg.lua
lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.3
#
lua_load ~/.conky/conky5/clock_conky.lua
lua_draw_hook_post main
#
#######################################################  End LUA Settings  ###
# The 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


TEXT
${voffset 55}${goto 55}${color7}${font White Rabbit:size=22}${time %e}${color1}${goto 45}${font WenQuanYi Micro Hei Mono:size=10}${time %a}
${goto 55}${color2}${font WenQuanYi Micro Hei Mono:size=9}${time %b}${color3} ${font WenQuanYi Micro Hei Mono:size=12}${time %y}${font}

NOTE: 6 blank lines at the end.

clock_conky.lua

--==============================================================================
--  Modifired from: conky_orange.lua
--  author  : SLK
--  version : v2011011601
--  license : Distributed under the terms of GNU GPL version 2 or later
--
--  Sector11: 09 Oct 12 - clock_conky.lua
--==============================================================================

require 'cairo'

--------------------------------------------------------------------------------
--                                                                    clock DATA
-- HOURS
clock_h = {
    {
    name='time',                   arg='%H',                    max_value=12,
    x=78,                          y=80,
    graph_radius=53,
    graph_thickness=3,
    graph_unit_angle=30,           graph_unit_thickness=30,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.0,
    graph_fg_colour=0xFFFFFF,      graph_fg_alpha=0.3,
    txt_radius=34,
    txt_weight=1,                  txt_size=10.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=0.6,
    graduation_radius=53,
    graduation_thickness=6,        graduation_mark_thickness=2,
    graduation_unit_angle=30,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    },
}
-- MINUTES
clock_m = {
    {
    name='time',                   arg='%M',                    max_value=60,
    x=78,                          y=80,
    graph_radius=57,
    graph_thickness=2,
    graph_unit_angle=6,            graph_unit_thickness=6,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.1,
    graph_fg_colour=0xFFFFFF,      graph_fg_alpha=0.3,
    txt_radius=70,
    txt_weight=0,                  txt_size=9.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=0.6,
    graduation_radius=57,
    graduation_thickness=0,        graduation_mark_thickness=2,
    graduation_unit_angle=30,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.3,
    },
}
-- SECONDS
clock_s = {
    {
    name='time',                   arg='%S',                    max_value=60,
    x=78,                          y=80,
    graph_radius=50,
    graph_thickness=2,
    graph_unit_angle=6,            graph_unit_thickness=2,
    graph_bg_colour=0xffffff,      graph_bg_alpha=0.0,
    graph_fg_colour=0xFFFFFF,      graph_fg_alpha=0.2,
    txt_radius=40,
    txt_weight=0,                  txt_size=12.0,
    txt_fg_colour=0xFFFFFF,        txt_fg_alpha=0.3,
    graduation_radius=0,
    graduation_thickness=0,        graduation_mark_thickness=0,
    graduation_unit_angle=0,
    graduation_fg_colour=0xFFFFFF, graduation_fg_alpha=0.0,
    },
}

--------------------------------------------------------------------------------
--                                                                 rgb_to_r_g_b
-- converts color in hexa to decimal
--
function rgb_to_r_g_b(colour, alpha)
    return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end

-------------------------------------------------------------------------------
--                                                            angle_to_position
-- convert degree to rad and rotate (0 degree is top/north)
--
function angle_to_position(start_angle, current_angle)
    local pos = current_angle + start_angle
    return ( ( pos * (2 * math.pi / 360) ) - (math.pi / 2) )
end

-------------------------------------------------------------------------------
--                                                              draw_clock_ring
-- displays clock
--
function draw_clock_ring(display, data, value)
    local max_value = data['max_value']
    local x, y = data['x'], data['y']
    local graph_radius = data['graph_radius']
    local graph_thickness, graph_unit_thickness = data['graph_thickness'], data['graph_unit_thickness']
    local graph_unit_angle = data['graph_unit_angle']
    local graph_bg_colour, graph_bg_alpha = data['graph_bg_colour'], data['graph_bg_alpha']
    local graph_fg_colour, graph_fg_alpha = data['graph_fg_colour'], data['graph_fg_alpha']

    -- background ring
    cairo_arc(display, x, y, graph_radius, 0, 2 * math.pi)
    cairo_set_source_rgba(display, rgb_to_r_g_b(graph_bg_colour, graph_bg_alpha))
    cairo_set_line_width(display, graph_thickness)
    cairo_stroke(display)

    -- arc of value
    local val = (value % max_value)
    local i = 1
    while i <= val do
        cairo_arc(display, x, y, graph_radius,(  ((graph_unit_angle * i) - graph_unit_thickness)*(2*math.pi/360)  )-(math.pi/2),((graph_unit_angle * i) * (2*math.pi/360))-(math.pi/2))
        cairo_set_source_rgba(display,rgb_to_r_g_b(graph_fg_colour,graph_fg_alpha))
        cairo_stroke(display)
        i = i + 1
    end
    local angle = (graph_unit_angle * i) - graph_unit_thickness

    -- graduations marks
    local graduation_radius = data['graduation_radius']
    local graduation_thickness, graduation_mark_thickness = data['graduation_thickness'], data['graduation_mark_thickness']
    local graduation_unit_angle = data['graduation_unit_angle']
    local graduation_fg_colour, graduation_fg_alpha = data['graduation_fg_colour'], data['graduation_fg_alpha']
    if graduation_radius > 0 and graduation_thickness > 0 and graduation_unit_angle > 0 then
        local nb_graduation = 360 / graduation_unit_angle
        local i = 1
        while i <= nb_graduation do
            cairo_set_line_width(display, graduation_thickness)
            cairo_arc(display, x, y, graduation_radius, (((graduation_unit_angle * i)-(graduation_mark_thickness/2))*(2*math.pi/360))-(math.pi/2),(((graduation_unit_angle * i)+(graduation_mark_thickness/2))*(2*math.pi/360))-(math.pi/2))
            cairo_set_source_rgba(display,rgb_to_r_g_b(graduation_fg_colour,graduation_fg_alpha))
            cairo_stroke(display)
            cairo_set_line_width(display, graph_thickness)
            i = i + 1
        end
    end

    -- text
    local txt_radius = data['txt_radius']
    local txt_weight, txt_size = data['txt_weight'], data['txt_size']
    local txt_fg_colour, txt_fg_alpha = data['txt_fg_colour'], data['txt_fg_alpha']
    local movex = txt_radius * (math.cos((angle * 2 * math.pi / 360)-(math.pi/2)))
    local movey = txt_radius * (math.sin((angle * 2 * math.pi / 360)-(math.pi/2)))
    cairo_select_font_face (display, "ubuntu", CAIRO_FONT_SLANT_NORMAL, txt_weight);
    cairo_set_font_size (display, txt_size);
    cairo_set_source_rgba (display, rgb_to_r_g_b(txt_fg_colour, txt_fg_alpha));
    cairo_move_to (display, x + movex - (txt_size / 2), y + movey + 3);
    cairo_show_text (display, value);
    cairo_stroke (display);
end

-------------------------------------------------------------------------------
--                                                               go_clock_rings
-- loads data and displays clock
--
function go_clock_rings(display)
    local function load_clock_rings(display, data)
        local str, value = '', 0
        str = string.format('${%s %s}',data['name'], data['arg'])
        str = conky_parse(str)
        value = tonumber(str)
        draw_clock_ring(display, data, value)
    end

    for i in pairs(clock_h) do
        load_clock_rings(display, clock_h[i])
    end
    for i in pairs(clock_m) do
        load_clock_rings(display, clock_m[i])
    end
    for i in pairs(clock_s) do
        load_clock_rings(display, clock_s[i])
    end
end

-------------------------------------------------------------------------------
--                                                                         MAIN
function conky_main()
    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 display = cairo_create(cs)

--[[    local updates = conky_parse('${updates}')
    update_num = tonumber(updates)

    if update_num > 5 then ]]
        go_clock_rings(display)
    --end

    cairo_surface_destroy(cs)
    cairo_destroy(display)
end

Edited an error in clock_conky.lua

Last edited by Sector11 (2012-10-10 00:36:08)


#! Conky = 13 Threads & the Conky Archives | Conky PitStop | OHCG'er
#! Forum Moderator   |   StartPage -  protect your privacy   |   BBQ Linux

Offline

#3199 2012-10-09 20:35:59

TeoBigusGeekus
#! Die Hard
From: /Greece/Kastoria
Registered: 2012-04-28
Posts: 675

Re: The New Monster Conky Thread

Comparison between screenfetch, archey and alsi.

Alsi in AUR for the fellow Archers.

I imagine it can't be difficult to port it to Crunchbang; just an app that searches the /proc folder...


EDIT: Hah! It's just a perl script:

#!/usr/bin/perl

#
# Alsi is a system information tool written in PERL. It has been inspired by Archey...
#

# Coded by Trizen
# http://trizen.go.ro

$c = $ARGV[0];
$z = "\e[0m";
for ($nr = 0; $nr <= $#ARGV; ++$nr) {
    push @argvs, $ARGV[$nr];
}
if ($c =~ /-h|--help/) {
    die "
Usage: $0 [...]

Colors:
\t-d --default
\t-r --red
\t-g --green
\t-b --black
\t-p --purple
\t-c --cyan
\t-w --white
\t
Options:
\t-s  :  take screenshot (using scrot)
\t-n  :  show the new arch logo

";
}
if ($c eq '' or $c eq '-n' and $ARGV[1] eq '' or $c eq '-s') {
    $c1 = "\e[0;34m";
    $c2 = $c1;
    $c2 =~ s/\[0/[1/;
}
else {
    @colors = "
\e[0;34m' -d --default
\e[0;31m' -r --red
\e[0;32m' -g --green
\e[0;33m' -y --yellow
\e[0;30m' -b --black
\e[0;35m' -p --purple
\e[0;36m' -c --cyan
\e[0;37m' -w --white
";
}

(%wm) = (
'awesome', 'Awesome', 'beryl', 'Beryl', 'blackbox', 'Blackbox',
'compiz', 'Compiz', 'dwm', 'DWM', 'enlightenment', 'Enlightenment',
'fluxbox', 'Fluxbox', 'fvwm', 'FVWM', 'i3', 'i3', 'weewm', 'WeeWM',
'sawfish', 'Sawfish', 'qlwm', 'qLWM', 'echinus', 'Echinus', 'w9wm', 'w9wm',
'hackedbox', 'Hackedbox', 'scrotwm', 'Scrotwm', 'twm', 'twm', 'vtwm', 'VtWM',
'9wm', '9wm', 'swm', 'swm', 'flwm', 'FlWM', 'jwm', 'JWM', 'icewm', 'IceWM',
'kwin', 'KWin', 'metacity', 'Metacity', 'musca', 'Musca', 'openbox', 'Openbox',
'pekwm', 'PekWM', 'ratpoison', 'ratpoison', 'scrotwm', 'ScrotWM',
'wmaker', 'WMaker','wmfs', 'Wmfs', 'wmii', 'wmii', 'xmonad', 'xmonad'
);

(%sh) = (
'zsh', 'Zsh', 'bash', 'Bash', 'dash', 'Dash', 'fish', 'Fish',
'ksh', 'Ksh', 'csh', 'Csh', 'jsh', 'Jsh', 'tcsh', 'Tcsh'
);
$psx = `ps -A`;
foreach $wm (keys %wm) {
    if ($psx =~ /([\W]+)$wm/) {
        $WM = $wm;
    }
}
foreach $Wm (values %wm) {
    if ($WM =~ /$Wm/i) {
        $WM = $Wm;
    }
}
if ($WM eq '') {
    $WM = 'Unknown';
}
foreach $sh (keys %sh) {
    if ($psx =~ /([\W]+)$sh/) {
        $SH = $sh;
    }
}
foreach $Sh (values %sh) {
    if ($Sh =~ /$SH/i) {
        $SH = $Sh;
    }
}
if ($SH eq '') {
    $SH = 'Unknown';
}
foreach $color (@colors) {
    foreach $arg (@argvs) {
        if ($color =~ /(.+)'(.*)$arg/) {
            $c1 = $1;
            $c2 = $c1;
            $c2 =~ s/\[0/[1/;
        }
    }
}
$ram = `free`;
if ($ram =~ /cache:([\ ]+)([\d]+)/) {
    $usedram = $2;
    $usedram = $usedram / 1024;
    $usedram =~ s/([\d]+)([\.]*)(.*)$/$1/;
}
else {
    $usedram = '';
}
if ($ram =~ /Mem:([\ ]+)([\d]+)/) {
    $totalram = $2;
    $totalram = $totalram / 1024;
    $totalram =~ s/([\d]+)([\.]*)(.*)$/$1/;
}
if ($usedram eq '') {
    if ($ram =~ /Mem:([\ ]+)([\d]+)([\ \t]*)([\d]+)/) {
        $usedram = $4;
        $usedram = $usedram / 1024;
        $usedram =~ s/([\d]+)([\.]*)(.*)$/$1/;
    }
}
$arch = `uname -m`;
if (-e '/etc/arch-release') {
    $distro = "Arch Linux $arch";
}
else {
    chomp($distro = `uname -o`);
    $distro .= " $arch";
}
if ($distro eq " $arch" and $arch =~ /(.+)/) {
    $distro = '';
    $distro = "Linux $arch";
}
if ($arch eq '' and $distro eq '') {
    $distro = "Unknown OS\n";
}
open CPU, '/proc/cpuinfo';
@cpu = <CPU>;
close CPU;
foreach $cpu (@cpu) {
    if ($cpu =~ /model name([\ \t]*): (.+)/) {
        $CPU = $2;
    }
    if ($cpu =~ /cpu MHz([\ \t]*): ([\d\.]+)/) {
        $freq = $2;
    }
}
if ($CPU eq '') {
    chomp($CPU = `uname -p`);
}
if (`uptime` =~ /up([\ \t]*)(.+)\, /) {
    $uptime = $2;
    if (not $uptime =~ /day/) {
        $uptime =~ s/,(.+)//;
    }
    else {
        $uptime =~ s/^([^\,]+),([\ \t]+)([^\,]+)(.+)/$1 & $3/;
    }
}
if ($distro =~ /Arch Linux/ or -e '/etc/frugalware-release') {
    $pkgs = `pacman -Q | wc -l`;
}
else {
    $pkgs = "Unknown\n";
}
if ($c1 eq '') {
    $c1 = "\e[0;34m";
    $c2 = $c1;
    $c2 =~ s/\[0/[1/;
}
@df = `df -TPh`;
foreach $df (@df) {
    if ($df =~ m[([\w]+)([\ \t]*)([\w\.]+)([\ \t]*)([\w\.]+)([\ \t]*)([\w\.]+)([\ \t]*)([\d]+)\% /(.*)] and not $1 =~ /tmpfs/) {
        $type = $1;
        $totalsize = $3;
        $used = $5;
        $free = $7;
        $usedprocent = " ($9%)";
        $mountpoint = "/$10";
    }
    $mountpoint =~ s[(.*)/(.+)$][$2];
    $mountpoint =~ s/(.+)/\u\L$1\E/g;
    if ($mountpoint eq '/') {
        $mountpoint = 'Root';
    }
    if ($mountpoint =~ /(.+)/) {
        if ($usedprocent eq ' (100%)') {
            $usedprocent = '';
        }
        push @partitions, " $c2 ${mountpoint}:$z $used / $totalsize$usedprocent ($type)";
    }
}
foreach $partition (@partitions) {
    next if $partition eq $lastpartition;
    push @p, $partition;
    $lastpartition = $partition;
}
$de = 'Desktop Environment';
if ($CPU =~ /([^\@]+)/) {
    $CPU = $1;
    $CPU =~ s/([\ \t]+)$//;
}
foreach $argv (@argvs) {
    if ($argv =~ /-n/) {
        $newlogo = 'TRUE';
        print "\n";
        print "$c1                  .o+                 ";
        print " $c2 OS:$z $distro";
        print "$c1                 `ooo/                ";
        print " $c2 Hostname:$z ";
        system 'uname -n';
        print "$c1                `+oooo:               ";
        print " $c2 Kernel:$z ";
        system 'uname -r';
        print "$c1               `+oooooo:              ";
        print " $c2 Uptime:$z $uptime\n";
        print "$c1               -+oooooo+:             ";
        if ($psx =~ /xfce4-session/) {
            print " $c2 ${de}:$z XFCE4\n";
        }
        elsif ($psx =~ /lxsession/) {
            print " $c2 ${de}:$z LXDE\n";
        }
        elsif ($psx =~ /gnome-session/) {
            print " $c2 ${de}:$z GNOME\n";
        }
        elsif ($psx =~ /ksmserver/) {
            print " $c2 ${de}:$z KDE\n";
        }
        else {
            print " $c2 Window Manager:$z $WM\n";
        }
        print "$c1             `/:-:++oooo+:            ";
        print " $c2 Packages:$z $pkgs";
        print "$c1            `/++++/+++++++:           ";
        print " $c2 RAM:$z $usedram MB / $totalram MB\n";
        print "$c1           `/++++++++++++++:          ";
        print " $c2 CPU:$z $CPU\n";
        print "$c1          `/+++o." . $c2 . 'ooooooo' . $c1 . 'oooo/`        ';
        print " $c2 CPU Freq:$z $freq MHz\n";
        print "$c2         " . $c1 . './.' . $c2 . 'ooosssso+osssssso' . $c1 . '+`       ';
        print " $c2 Shell:$z $SH\n";
        print "$c2        .oossssso-````/ossssss+`      ";
        print "$p[0]\n";
        print "$c2       -osssssso.      :ssssssso.     ";
        print "$p[1]\n";
        print "$c2      :osssssss/        osssso+++.    ";
        print "$p[2]\n";
        print "$c2     /ossssssss/        +ssssooo/-    ";
        print "$p[3]\n";
        print "$c2   `/ossssso+/:-        -:/+osssso+-  ";
        print "$p[4]\n";
        print "$c2  `+sso+:-`                 `.-/+oso: ";
        print "$p[5]\n";
        print "$c2 `++:.                           `-/+/";
        print "$p[6]\n";
        print "$c2 .`                                 `/$z";
        print "$p[7]\n\n";
    }
}
unless ($newlogo =~ /(.+)/) {
    print "\n                  $c1##$z                 ";
    print " $c2 OS:$z $distro";
    print "                 $c1#$c2##$c1#$z                ";
    print " $c2 Hostname:$z ";
    system 'uname -n';
    print "                $c1#$c2####$c1#$z               ";
    print " $c2 Kernel:$z ";
    system 'uname -r';
    print "               $c1#$c2######$c1#$z              ";
    print " $c2 Uptime:$z $uptime\n";
    print "              $c1#$c2########$c1#$z             ";
    if ($psx =~ /xfce4-session/) {
        print " $c2 ${de}:$z XFCE4\n";
    }
    elsif ($psx =~ /lxsession/) {
        print " $c2 ${de}:$z LXDE\n";
    }
    elsif ($psx =~ /gnome-session/) {
        print " $c2 ${de}:$z GNOME\n";
    }
    elsif ($psx =~ /ksmserver/) {
        print " $c2 ${de}:$z KDE\n";
    }
    else {
        print " $c2 Window Manager:$z $WM\n";
    }
    print "             $c1#$c2##########$c1#$z            ";
    print " $c2 Packages:$z $pkgs";
    print "            $c1#$c2############$c1#$z           ";
    print " $c2 RAM:$z $usedram MB / $totalram MB\n";
    print "           $c1#$c2##############$c1#$z          ";
    print " $c2 CPU:$z $CPU\n";
    print "          $c1#$c2################$c1#$z         ";
    print " $c2 CPU Freq:$z $freq MHz\n";
    print "         $c1#$c2##################$c1#$z        ";
    print " $c2 Shell:$z $SH\n";
    print "        $c1#$c2#######$c1######$c2#######$c1#$z       ";
    print "$p[0]\n";
    print "       $c1#$c2#######$c1#$z      $c1#$z$c2#######$c1#$z      ";
    print "$p[1]\n";
    print "      $c1#$c2########$c1#$z      $c1#$z$c2########$c1#$z     ";
    print "$p[2]\n";
    print "     $c1#$c2#########$c1#$z      $c1#$z$c2#########$c1#$z    ";
    print "$p[3]\n";
    print "    $c1#$c2######$c1###$z          $c1###$c2######$c1#$z   ";
    print "$p[4]\n";
    print "   $c1#$c2####$c1##$z                  $c1##$c2####$c1#$z  ";
    print "$p[5]\n";
    print "  $c1#$c2##$c1#$z                          $c1#$c2##$c1#$z ";
    print "$p[6]\n";
    print " $c1#$c2#$c1#$z                              $c1#$c2#$c1#$z";
    print "$p[7]\n\n";
}
foreach $argv (@argvs) {
    if ($argv =~ /s/) {
        exec 'scrot -cd 5';
    }
}

Shouldn't be hard for a perl using crunchbanger to change the logo; it should then work out of the box.

Last edited by TeoBigusGeekus (2012-10-09 20:45:17)


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

Help fund CrunchBang, donate to the project!

#3200 2012-10-09 20:50:41

VastOne
#! Ranger
From: #! Fringe Division
Registered: 2011-04-26
Posts: 10,163
Website

Re: The New Monster Conky Thread

Sector11 wrote:

Shamelessly borrowed, with modifications, from Voyager Linux while found on the ARCH forums.
Imagine that no shame anywhere.

Nice...

I have loaded the Clock and it all functions correctly, but I noticed the following when I test/ran it from terminal

Conky: llua_do_call: function conky_main execution failed: /home/vastone/clock_conky.lua:190: attempt to call global 'go_gauge_rings' (a nil value)

screenshot-10092012-035008pm.php

You seeing anything like that?


VSIDO | SolusOS

Words That Build Or Destroy

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.

Debian Logo