I really don't know how interesting this would be for anyone but I'll throw it out there.
I wrote a simple script that alternates .conkyrc config files to reflect my backgrounds. I have several config files and really got tired of renaming and moving just to match my backgrounds (which I change periodically). Just use system monitor to shut down conky run the .conkycolor script with a template arg start conky and your done.
I'll take criticism or some pointers if you'd like
Code:#!/bin/bash # ------------------------------------------------------------- # Just a simple script to change the .conkyrc config # Keep the original .conkyrc config file in your Document # folder or wherever you decide to keep it (but not in your # ~/home dir). This script will create and delete the symbolic # link within your ~/home dir. Be sure to chmod +x this script. # # example : ./.conkycolor green # ------------------------------------------------------------- # if no line argument template is given if [ -z $1 ] then echo "------ no template defined ------" exit 0 # ---------------------------------------------------------------------- # give a line argument of your choice from the case select # that you set up. Create several templates and call them what # you want (other than .conkyrc). I made a few to test out for myself # such as a dark template to go with my light background, a test one # just to test diff configs and one with different font sizes (whatever). # ----------------------------------------------------------------------- elif [ -n $1 ] then # Remove old link rm /home/bobkat/.conkyrc # make arg as template template=$1 fi # ------------------------------------------------------------- # Now change the case settings to reflect your own templates. # ------------------------------------------------------------- case $template in "black") ln -s /home/bobkat/darkconky /home/bobkat/.conkyrc;; "normal") ln -s /home/bobkat/Documents/.conkyrc /home/bobkat/.conkyrc;; "green") ln -s /home/bobkat/greenconky /home/bobkat/.conkyrc;; "test") ln -s /home/bobkat/testconky /home/bobkat/.conkyrc;; "font") ln -s /home/bobkat/conkyfontchange /home/bobkat/.conkyrc;; *) echo "------ Sorry, that template is not listed ------";; esac
Well, `cal` would list the current month calendar and `cal -3` calls up a row of three months (previous month and the next two). You can only call up three columns of months at a time (hence the cut command). The cut -c =how many columns till - how many columns within the three months displayed. Did that help?
You threw it out here, I caught it.
Criticism: A really nice idea. I can't get technical because I can't write a script. But since I like to change my backgrounds too, I was limited to backgrounds that match the conky I have. I've seen examples of the "shade" command and it's just too hard on my old, I need glasses for everything but the computer, eyes.
Pointers: OK, here's a couple: West <-- --> East
Like I said, I can't write scripts (yet) so how could I possibly give you any pointers of value. (shhh: 3rd horse in the 2nd race)
What I can repeat is: A really nice idea!. I'll play with it.
Thanks
Bruce
Code:# UBUNTU-CONKY # A comprehensive conky script, configured for use on # Ubuntu / Debian Gnome, without the need for any external scripts. # # Based on conky-jc and the default .conkyrc. # INCLUDES: # - tail of /var/log/messages # - netstat connections to your computer # # -- Pengo (conky@pengo.us) # # Create own window instead of using desktop (required in nautilus) own_window yes own_window_type override own_window_transparent yes own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager # Use double buffering (reduces flicker, may not work for everyone) double_buffer yes # fiddle with window use_spacer yes use_xft no # Update interval in seconds update_interval 3.0 # Minimum size of text area # minimum_size 250 5 # Draw shades? draw_shades no # Text stuff draw_outline no # amplifies text if yes draw_borders no font arial uppercase no # set to yes if you want all text to be in uppercase # Stippled borders? stippled_borders 3 # border margins border_margin 9 # border width border_width 10 # Default colors and also border colors, grey90 == #e5e5e5 default_color grey own_window_colour brown own_window_transparent yes # Text alignment, other possible values are commented #alignment top_left alignment top_right #alignment bottom_left #alignment bottom_right # Gap between borders of screen and text gap_x 10 gap_y 10 # stuff after 'TEXT' will be formatted on screen TEXT $color ${color D0FE1F}SYSTEM ${hr 2}$color $nodename $sysname $kernel on $machine ${color D0FE1F}CPU ${hr 2}$color ${freq}MHz ${alignr}Load: ${loadavg} $cpubar ${cpugraph cpu1 25,140 000000 D0FE1F} ${alignr}${cpugraph cpu2 25,140 000000 D0FE1F} NAME PID CPU% MEM% ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4} ${color D0FE1F}DISK / MEMORY ${hr 2}$color Root: ${fs_free_perc /} % ${fs_bar 6 /}$color RAM: $memperc% ${membar 6}$color Swap: $swapperc% ${swapbar 6}$color ${color D0FE1F}BATTERY ${hr 2}$color ${battery_percent BAT1}% ${battery_bar BAT1}${execi 30 rm -f .conky_eth0; ifconfig -s | grep eth0 > /dev/null && ifconfig -a eth0 | grep 'inet addr:' > /dev/null && touch .conky_eth0}${execi 30 rm -f .conky_ath0; ifconfig -s | grep ath0 > /dev/null && ifconfig -a ath0 | grep 'inet addr:' > /dev/null && touch .conky_ath0} ${if_existing /home/drowland/.conky_eth0} ${color D0FE1F}NETWORK INFO (ETH0: ${addr eth0}) ${hr 2}$color Down: ${downspeed eth0} k/s ${alignr}Up: ${upspeed eth0} k/s ${color lightgray}${downspeedgraph eth0 25,140 000000 ff0000} ${alignr}${upspeedgraph eth0 25,140 000000 00ff00}$color Total: ${totaldown eth0} ${alignr}Total: ${totalup eth0} Inbound: ${tcp_portmon 1 32767 count} Outbound: ${tcp_portmon 32768 61000 count}${alignr}Total: ${tcp_portmon 1 65535 count} ${endif}${if_existing /home/drowland/.conky_ath0} ${color D0FE1F}NETWORK INFO (ATH0: ${addr ath0}) ${hr 2}$color SSID: ${wireless_essid ath0} ${alignr}Mode: ${wireless_mode ath0} Speed: ${wireless_bitrate ath0} ${alignr}Signal: ${wireless_link_qual ath0} ${wireless_link_qual_perc ath0} ${wireless_link_bar ath0} Down: $color${downspeed ath0} k/s ${alignr}Up: ${upspeed ath0} k/s ${downspeedgraph ath0 25,140 000000 ff0000} ${alignr}${upspeedgraph ath0 25,140 000000 00ff00}$color Total: ${totaldown ath0} ${alignr}Total: ${totalup ath0} Inbound: ${tcp_portmon 1 32767 count} Outbound: ${tcp_portmon 32768 61000 count}${alignr}Total: ${tcp_portmon 1 65535 count} ${endif}
Currently using WinXP with emergeDesktop shell on my laptop, and Vista on my gaming machine. Sorry guys!
すべてと、そして、すべてへのリナックスは自由を鳴らせました。
Linux to all, and to all, let freedom ring.
Yes... very much so
1. ${execi 60 cal -3 | cut -c00-22} = previous month
2. ${execi 60 cal} = current month
3. ${execi 60 cal -3 | cut -c46-64} = next month
But the columns are out of alignment, for the first two weeks. Where there are days with no digits to single digit numbers.
There must be a way to insert two spaces where there are no digits and a single space with the single digits 1 to 9.
Played with this.
I like to learn.
Bruce
I don't think so. What's "sshed"? It almost sounds like a "bad" word.
Yea, right! With my luck I'd kill something that would stop Ubuntu from working.
The only things wireless in this house are the TV, DVD Player, Stereo remote controls and a cell phone.
Bruce
Last edited by Bruce M.; January 9th, 2008 at 07:11 PM.
Bookmarks