Are you a spammer

Please note, that the first 3 posts you make, will need to be approved by a forum Administrator or Moderator before they are publicly viewable.
Each application to join this forum is checked at the Stop Forum Spam website. If the email or IP address appears there when checked, you will not be allowed to join this forum.
If you get past this check and post spam on this forum, your posts will be immediately deleted and your account inactivated.You will then be banned and your IP will be submitted to your ISP, notifying them of your spamming. So your spam links will only be seen for an hour or two at most. In other words, don't waste your time and ours.

This forum is for the use and enjoyment of the members and visitors looking to learn about and share information regarding the topics listed. It is not a free-for-all advertising venue. Your time would be better spent pursuing legitimate avenues of promoting your websites.

Conky script

Help & support for Ultimate Edition 2.6


Conky script

Postby TheeMahn » Sat May 08, 2010 6:12 pm

I wrote a conky script err. bash script that creates a Conky script I thought I would share with you fellas. Nubcakes was here to learn. I was here to teach ;)

If I get the time I will come back & explain what the script does. Actually maybe not the code is commented. ;)

conky.png
Please view the right side of the right screen.


Here we go the script
:
Code: Select all
#!/bin/bash
#written via TheeMahn

#Get CPU model
PROC=`cat /proc/cpuinfo | grep 'model name' | sed -e 's/.*: //' | uniq`
echo $PROC

#Create conky skelaton
echo 'background yes
font Vibrocentric:size=10
xftfont Vibrocentric:size=10
use_xft yes
xftalpha 0.1
update_interval 1.0
total_run_times 0
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders no
minimum_size 206 5
maximum_width 206
default_color e6df7e
default_shade_color 000000
default_outline_color 000000
alignment top_right
gap_x 6
gap_y 22
no_buffers yes
cpu_avg_samples 2
override_utf8_locale no
uppercase no # set to yes if you want all text to be in uppercase
use_spacer no
' > ~/.conkyrc

#Count number of processor cores
CORES=1
CORES=`cat /proc/cpuinfo | grep "processor" | wc -l`
echo $CORES "Cpu core(s) Detected."
echo 'TEXT
${font Aerial:style=Bold:pixelsize=12}SYSTEM${font Vibrocentric:size=10} ${hr 1 }
Hostname: $alignr$nodename
Kernel: $alignr$kernel
Uptime: $alignr$uptime
Processes: ${alignr}$processes ($running_processes running)
Load: ${alignr}$loadavg
'$PROC'
CPU Usage: ${alignc} ${freq}MHz X '$CORES '
${cpu cpu0}% ${alignr}${cpubar cpu0 5,170}
${hr 1}
Cores:' >> ~/.conkyrc

#Create a cpubar for each core
COUNTER=0
         while [  $COUNTER != $CORES ]; do
      let COUNTER=COUNTER+1
      echo '${cpu cpu'$COUNTER'}% ${alignr}${cpubar cpu'$COUNTER' 5,170}' >> ~/.conkyrc
         done

#Output disk I/O bar top processes memory useage etc.
echo '${hr 1}
Disk I/O: ${diskio} ${alignr}
${diskiograph /dev/sda 25,200}
${hr 1}
RAM ${alignr}$mem / $memmax ($memperc%)
${membar 4}
${font Vibrocentric:pixelsize=49}${alignc}${time %H:%M}${font Vibrocentric:size=10}
Highest CPU $alignr CPU% MEM%
${hr 1}
${top name 1}$alignr${top cpu 1}${top mem 1}
${top name 2}$alignr${top cpu 2}${top mem 2}
${hr 1}
Highest MEM $alignr CPU% MEM%
${hr 1}
${top_mem name 1}$alignr${top_mem cpu 1}${top_mem mem 1}
${top_mem name 2}$alignr${top_mem cpu 2}${top_mem mem 2}
${hr 1}
${font Aerial:style=Bold:pixelsize=12}FILESYSTEM ${font Vibrocentric:size=10}${hr 1}
Root: ${alignr}${fs_free /} / ${fs_size /}
${fs_bar 4 /}' >> ~/.conkyrc

#Detect hard disks & create a bar for each mount point
echo "Internal / External storage detected:"
echo "/ - Root"
for i in $( ls /media/ );
     do
echo $i
 echo $i': ${alignr}${fs_free /media/'$i'} / ${fs_size /media/'$i'}
${fs_bar 4 /media/'$i'}' >> ~/.conkyrc
     done
echo '${hr 1}
${font Aerial:style=Bold:pixelsize=12}NETWORK ${font Vibrocentric:size=10}${hr 1}' >> ~/.conkyrc

#Detect "Active" network and propigate Network Xfer bar
ACTIVE=`ifconfig | grep -B 1 inet | head -1 | awk '{print $1}'`
echo "Active network adapter: "$ACTIVE
echo 'Down ${downspeed '$ACTIVE'} k/s ${alignr}Up ${upspeed '$ACTIVE'} k/s
${downspeedgraph '$ACTIVE' 25,107 cccccc e6df7e} ${alignr}${upspeedgraph '$ACTIVE' 25,107 cccccc e6df7e}
Total ${totaldown '$ACTIVE'} ${alignr}Total ${totalup '$ACTIVE'}' >> ~/.conkyrc


If you are running Ultimate Edition 2.6 conky is pre-installed for you. Ultimate Edition 2.5 or less in a terminal:
Code: Select all
sudo apt-get install conky-all


To start it after the script is executed in a terminal:
Code: Select all
conky


Any feedback is appreciated.

Enjoy,

TheeMahn
Attachments
test.sh
The script
(3 KiB) Downloaded 524 times
Home of Ultimate Edition. Got a question? Please review the F.A.Q. Browse the How to section.

Main O/S: Builder of O/S Guess.
Mainboard: ASUS Hero VI (AM4)
CPU: AMD 1700X water cooled (Deepcool Captain Genome Cooling tower)
Ram: 16 GB GSkill Trident RGB Series Dual Channel DDR4 3200
Video: MSI RX470 8GB Gaming card.
Hard Disks: MASSIVE on the network.(10 Gigabit, 48 port, multiple servers)
Monitors: Dual 4K 43" LG, 4K Samsung 28"
750 Watt modular PSU (Rosswell)
1100 Watt Amp & 4 X 600 Watt speakers

Servers in the basement.
User avatar
TheeMahn
Site Admin
 
Posts: 4201
Joined: Fri Oct 12, 2007 10:02 am
Location: U.S.A.
Age: 53
Operating System: Ultimate Edition Developer



Re: Conky script

Postby 2hot6ft2 » Sat May 08, 2010 6:25 pm

Thee, you're a trip. Someone was asking about that very conky yesterday. Now I'll have to find that post and send them here. I told them it was conky and gave them some links to get started with.
<BREW>
Found the post and gave a link to here.
Ah, just read the script that's your conky creation, sweet. ;)

Before running the script you should enable sensors as shown below this section so they can be detected.
**********
How to use the script:
Click on the test.sh link provided by TheeMahn in the post above and save it (home folder Desktop wherever you want)
Right click on it and select Properties then the Permissions tab and check the box by Execute to make the file executable then click Close.

Double click on it and Select Run. That's it. It just created a .conkyrc in your home folder. You can see it by using the Ctrl+h key combination in your home folder to reveal hidden files and folders.
**********

Installing sensors

Here's a short version:
Just open a Terminal (Applications -> Accessories -> Terminal) and type (or copy and paste):

Code: Select all
sudo apt-get install lm-sensors hddtemp


Next, run sensors-detect. Answer y to each one until finished.
Code: Select all
sudo sensors-detect


Making hdd temp sensor start uatomatically
Code: Select all
gksudo gedit /etc/default/hddtemp

Change this from false to true

RUN_DAEMON="true"


Save and close
Finally, restart to load all the sensors.
<BREW>
Last edited by 2hot6ft2 on Sun May 09, 2010 3:52 pm, edited 3 times in total.
Image
HP G60-125NR - AMD Turion X2 64 - nVidia GeForce 8200M G - 128 GB SSD Dual boot - Ultimate Edition, Win 10 Pro
HP G60-121WM - AMD Sempron SI-40 - nVidia GeForce 8200M G - 128 GB SSD - Dual boot - Ultimate Edition, Win 10 Pro
Custom build, Rosewill Challenger ATX Gaming Case, AMD Phenom II x4 955 C3 rev., MSI 870A-G54, 2x ATI HD4850 512MB /256bit GDDR3 & dual precision, GSkill 8GB 1600 RAM - Multi boot - Ultimate Edition, Win 10 Pro, Beta Testing
User avatar
2hot6ft2
Moderator
 
Posts: 533
Joined: Sun May 25, 2008 12:30 pm
Location: Alabama, USA
Operating System: Ultimate Edition 3.2 64 BIT



Re: Conky script

Postby JOHNNYG » Sat May 08, 2010 6:46 pm

<BREW> Excellent as always Thee ! Let me add a little "how to" To start conky as an application, right cilck applications (top task bar) "Edit Menus" click "system tools" or "accessories", click "New Item" Name=conky, command=conky, and close, now click applications, open the header you filed conky under and click, whoosk ! conky starts ! to stop conky, in terminal " killall conky " <BREW> :D ;)
Attachments
Screenshot.png
JOHNNYG
Image
Ultimate Eddiction<
Ultimate Edition STUDIO
Ultimate-E
Onyx 64
Pentium 4 processor
2x512 Kingston DDR memory
Maxtor Diamondmax 500 gig
Maxtor Maxline 80 gig, Split for testing only !
Maxtor Diamondmax 500 gig, Storage
Booting 8 OS's, No MS !
ATI 9600 series (RV350 AQ)graphics card
Sony DVD/CD Rewritable Drive DOUBLE LAYER DRU-820A/Sony DRU-800A CD DVD±RW Dual DVD Recorder
Team Leader at
http://www.ultimateeditionoz.com/
Image
Image
Image
User avatar
JOHNNYG
Site Admin
 
Posts: 1456
Joined: Mon Apr 13, 2009 12:02 am
Location: U.S.A. Illinois
Operating System: Ultimate Edition 3.2 32 BIT



Re: Conky script

Postby TheeMahn » Sat May 08, 2010 6:51 pm

2hot6ft2 wrote:Thee, you're a trip. Someone was asking about that very conky yesterday. Now I'll have to find that post and send them here. I told them it was conky and gave them some links to get started with.
<BREW>
Found the post and gave a link to here.
Ah, just read the script that's your conky creation, sweet. ;)



Hopefully works for everybody, its fairly smart for example, I do not have the same processor as you do. It "Attempts" to retrieve such info by grepping /proc/cpuinfo and returns the value to the .conkyrc file in the end users home directory.

I had a hard time figuring out how to retrieve the "Active" network connection I have 2 network adapters eth0 & eth1 which is my active network. I do not know if it will properly grab up wireless for example.

I openly now welcome you to the "Ultimate Edition Team" ;)

Thanks guy,
Home of Ultimate Edition. Got a question? Please review the F.A.Q. Browse the How to section.

Main O/S: Builder of O/S Guess.
Mainboard: ASUS Hero VI (AM4)
CPU: AMD 1700X water cooled (Deepcool Captain Genome Cooling tower)
Ram: 16 GB GSkill Trident RGB Series Dual Channel DDR4 3200
Video: MSI RX470 8GB Gaming card.
Hard Disks: MASSIVE on the network.(10 Gigabit, 48 port, multiple servers)
Monitors: Dual 4K 43" LG, 4K Samsung 28"
750 Watt modular PSU (Rosswell)
1100 Watt Amp & 4 X 600 Watt speakers

Servers in the basement.
User avatar
TheeMahn
Site Admin
 
Posts: 4201
Joined: Fri Oct 12, 2007 10:02 am
Location: U.S.A.
Age: 53
Operating System: Ultimate Edition Developer



Re: Conky script

Postby 2hot6ft2 » Sat May 08, 2010 6:58 pm

It works great. A little tall for my screen but I can adjust that. It's beautiful.

I'll add how to start it automatically every boot.
1. Create a file in your home folder named Start-Conky and add this to it

Code: Select all
    #!/bin/bash
    sleep 30
    conky &
    exit 0

Save and Close
then right click on it and select properties then the Permissions tab
Execute: (check the box to make it executable)
Go to
System > Preferences > Startup Applications
click on Add
Name: Conky
Command: (browse and select the Start-Conky file you created)
Comment: Whatever you want

Save then Close

That's it. It will start 30 seconds after boot. You can start it manually by double clicking on the Start-Conky file and selecting Run. It will start in 30 seconds.

The 30 second delay is so that everything is up and running before the script is invoked.
Last edited by 2hot6ft2 on Sat May 08, 2010 7:11 pm, edited 3 times in total.
Image
HP G60-125NR - AMD Turion X2 64 - nVidia GeForce 8200M G - 128 GB SSD Dual boot - Ultimate Edition, Win 10 Pro
HP G60-121WM - AMD Sempron SI-40 - nVidia GeForce 8200M G - 128 GB SSD - Dual boot - Ultimate Edition, Win 10 Pro
Custom build, Rosewill Challenger ATX Gaming Case, AMD Phenom II x4 955 C3 rev., MSI 870A-G54, 2x ATI HD4850 512MB /256bit GDDR3 & dual precision, GSkill 8GB 1600 RAM - Multi boot - Ultimate Edition, Win 10 Pro, Beta Testing
User avatar
2hot6ft2
Moderator
 
Posts: 533
Joined: Sun May 25, 2008 12:30 pm
Location: Alabama, USA
Operating System: Ultimate Edition 3.2 64 BIT



Re: Conky script

Postby 2hot6ft2 » Sat May 08, 2010 7:02 pm

TheeMahn wrote:Hopefully works for everybody, its fairly smart for example, I do not have the same processor as you do. It "Attempts" to retrieve such info by grepping /proc/cpuinfo and returns the value to the .conkyrc file in the end users home directory.

I had a hard time figuring out how to retrieve the "Active" network connection I have 2 network adapters eth0 & eth1 which is my active network. I do not know if it will properly grab up wireless for example.

I openly now welcome you to the "Ultimate Edition Team" ;)

Thanks guy,

Worked great picked up both cpu's and the ethernet. I'll have to figure out how to integrate it with my weather conky and shrink it a little but man that's too cool it did all that coding in a flash.
<BREW>
Image
HP G60-125NR - AMD Turion X2 64 - nVidia GeForce 8200M G - 128 GB SSD Dual boot - Ultimate Edition, Win 10 Pro
HP G60-121WM - AMD Sempron SI-40 - nVidia GeForce 8200M G - 128 GB SSD - Dual boot - Ultimate Edition, Win 10 Pro
Custom build, Rosewill Challenger ATX Gaming Case, AMD Phenom II x4 955 C3 rev., MSI 870A-G54, 2x ATI HD4850 512MB /256bit GDDR3 & dual precision, GSkill 8GB 1600 RAM - Multi boot - Ultimate Edition, Win 10 Pro, Beta Testing
User avatar
2hot6ft2
Moderator
 
Posts: 533
Joined: Sun May 25, 2008 12:30 pm
Location: Alabama, USA
Operating System: Ultimate Edition 3.2 64 BIT



Re: Conky script

Postby TheeMahn » Sat May 08, 2010 7:03 pm

JOHNNYG wrote:<BREW> Excellent as always Thee ! Let me add a little "how to" To start conky as an application, right cilck applications (top task bar) "Edit Menus" click "system tools" or "accessories", click "New Item" Name=conky, command=conky, and close, now click applications, open the header you filed conky under and click, whoosk ! conky starts ! to stop conky, in terminal " killall conky " <BREW> :D ;)


Great point, let's take things to the next level... Autostartup on boot ;)
startup.png
Startup

conky.png
Click add, enter as follows


Damn, I see someone has beaten me to it ;)
Home of Ultimate Edition. Got a question? Please review the F.A.Q. Browse the How to section.

Main O/S: Builder of O/S Guess.
Mainboard: ASUS Hero VI (AM4)
CPU: AMD 1700X water cooled (Deepcool Captain Genome Cooling tower)
Ram: 16 GB GSkill Trident RGB Series Dual Channel DDR4 3200
Video: MSI RX470 8GB Gaming card.
Hard Disks: MASSIVE on the network.(10 Gigabit, 48 port, multiple servers)
Monitors: Dual 4K 43" LG, 4K Samsung 28"
750 Watt modular PSU (Rosswell)
1100 Watt Amp & 4 X 600 Watt speakers

Servers in the basement.
User avatar
TheeMahn
Site Admin
 
Posts: 4201
Joined: Fri Oct 12, 2007 10:02 am
Location: U.S.A.
Age: 53
Operating System: Ultimate Edition Developer



Re: Conky script

Postby 2hot6ft2 » Sat May 08, 2010 7:05 pm

:D ;)
Glad to be aboard Thee. Had to type fast to beat you though.
I did the text you did the graphics that's teamwork right.
<BREW>
Image
HP G60-125NR - AMD Turion X2 64 - nVidia GeForce 8200M G - 128 GB SSD Dual boot - Ultimate Edition, Win 10 Pro
HP G60-121WM - AMD Sempron SI-40 - nVidia GeForce 8200M G - 128 GB SSD - Dual boot - Ultimate Edition, Win 10 Pro
Custom build, Rosewill Challenger ATX Gaming Case, AMD Phenom II x4 955 C3 rev., MSI 870A-G54, 2x ATI HD4850 512MB /256bit GDDR3 & dual precision, GSkill 8GB 1600 RAM - Multi boot - Ultimate Edition, Win 10 Pro, Beta Testing
User avatar
2hot6ft2
Moderator
 
Posts: 533
Joined: Sun May 25, 2008 12:30 pm
Location: Alabama, USA
Operating System: Ultimate Edition 3.2 64 BIT



Re: Conky script

Postby TheeMahn » Sat May 08, 2010 8:16 pm

2hot6ft2 wrote::D ;)
Glad to be aboard Thee. Had to type fast to beat you though.
I did the text you did the graphics that's teamwork right.
<BREW>



One big happy family. I love it. Speaking of teamwork, we have a fairly large donation coming... I plan on paying months ahead on hosting & 3 expiring domains. The users are straight off the hook. Like I said one big happy family ;) I do not want to be the #1 used nix on the planet. My Ultimate goal is #3, we are 13. Many would think why not? I honestly do not want to say, I would be in trouble for slander ;) I will post I intend to change things up after 3 releases Ultimate Edition 2.7, 2.6 gamers and the PS/3 edition, something we have never done prior. We will move up that list in short order. Once I see #3 I will quit doing. To be honest if I really wanted to I could push for #1, but have my reasons I will not say why even in admin section.

Wow, did I let the cat out of the bag? No, I have not even posted about what is coming even in admin section. Just know big things are coming. I know what I am doing.

You may think 3 releases will take me a long time, you may be mistaken. Ultimate Edition 2.7 if I released today would receive a warm welcome, I prefer to get things as close to perfect as possible. Gamers 1 or 2 days work. PS/3 I can't actually say new stomping grounds for me. Once complete turns over to Bnjamin_Breeg and is no longer of my concern, he will use debs I created to build it as I now do.

Sorry for rambling on, I don't post as often as I would like to. I want users to know what is going on ;)
Home of Ultimate Edition. Got a question? Please review the F.A.Q. Browse the How to section.

Main O/S: Builder of O/S Guess.
Mainboard: ASUS Hero VI (AM4)
CPU: AMD 1700X water cooled (Deepcool Captain Genome Cooling tower)
Ram: 16 GB GSkill Trident RGB Series Dual Channel DDR4 3200
Video: MSI RX470 8GB Gaming card.
Hard Disks: MASSIVE on the network.(10 Gigabit, 48 port, multiple servers)
Monitors: Dual 4K 43" LG, 4K Samsung 28"
750 Watt modular PSU (Rosswell)
1100 Watt Amp & 4 X 600 Watt speakers

Servers in the basement.
User avatar
TheeMahn
Site Admin
 
Posts: 4201
Joined: Fri Oct 12, 2007 10:02 am
Location: U.S.A.
Age: 53
Operating System: Ultimate Edition Developer



Re: Conky script

Postby 2hot6ft2 » Sat May 08, 2010 9:29 pm

TheeMahn wrote:One big happy family. I love it. Speaking of teamwork, we have a fairly large donation coming... I plan on paying months ahead on hosting & 3 expiring domains. The users are straight off the hook. Like I said one big happy family ;) I do not want to be the #1 used nix on the planet. My Ultimate goal is #3, we are 13. Many would think why not? I honestly do not want to say, I would be in trouble for slander ;) I will post I intend to change things up after 3 releases Ultimate Edition 2.7, 2.6 gamers and the PS/3 edition, something we have never done prior. We will move up that list in short order. Once I see #3 I will quit doing. To be honest if I really wanted to I could push for #1, but have my reasons I will not say why even in admin section.

Wow, did I let the cat out of the bag? No, I have not even posted about what is coming even in admin section. Just know big things are coming. I know what I am doing.

You may think 3 releases will take me a long time, you may be mistaken. Ultimate Edition 2.7 if I released today would receive a warm welcome, I prefer to get things as close to perfect as possible. Gamers 1 or 2 days work. PS/3 I can't actually say new stomping grounds for me. Once complete turns over to Bnjamin_Breeg and is no longer of my concern, he will use debs I created to build it as I now do.

Sorry for rambling on, I don't post as often as I would like to. I want users to know what is going on ;)

Thanks for the insight. I still know how to put 2 and 2 together. I'm not a fan of that one you want to kick off the hill for my own reasons. I agree timing plays a big part in what you have in mind. You got it down. Gonna hate not seeing you around the board but you got to do what makes you happy and if that's behind the scenes the so be it. I think you made some good choices on people.

I just got a wild hair to look at the conkyrc you script creates and man that's clean. I appreciate you sharing that.
<BREW>
Last edited by 2hot6ft2 on Sun May 09, 2010 2:36 pm, edited 1 time in total.
Image
HP G60-125NR - AMD Turion X2 64 - nVidia GeForce 8200M G - 128 GB SSD Dual boot - Ultimate Edition, Win 10 Pro
HP G60-121WM - AMD Sempron SI-40 - nVidia GeForce 8200M G - 128 GB SSD - Dual boot - Ultimate Edition, Win 10 Pro
Custom build, Rosewill Challenger ATX Gaming Case, AMD Phenom II x4 955 C3 rev., MSI 870A-G54, 2x ATI HD4850 512MB /256bit GDDR3 & dual precision, GSkill 8GB 1600 RAM - Multi boot - Ultimate Edition, Win 10 Pro, Beta Testing
User avatar
2hot6ft2
Moderator
 
Posts: 533
Joined: Sun May 25, 2008 12:30 pm
Location: Alabama, USA
Operating System: Ultimate Edition 3.2 64 BIT

Next

Return to Ultimate Edition 2.6 (Including 2.6.5)

Who is online

Users browsing this forum: No registered users and 1 guest