LinuxGurl

Pages

Categories

Calendar

February 2010
S M T W T F S
« Dec    
 123456
78910111213
14151617181920
21222324252627
28  

Advertisements




Apply Today

Archives

Validated

  • Made With CSS
  • This is a valid RSS feed
  • Valid CSS level 2.1

Visitor Map

Visitor Map

‘Tis the Season

21st December 2009

‘Tis the season to relax and enjoy spending time with your family. If you feel the need, give gifts as well. I know that most everyone is feeling a pinch in their wallets, and its hard to be as giving as the commercials and shows tell us we should be. This is especially hard when you have a young child (or children) in your household. (We have a 3 year old.) There will not be much under our tree this year. Maybe one gift for our son. But we are blessed in so many other ways. We have a large family and we get to see them and enjoy the time we spend with them.*
The reason I brought all this up because reading information on NORAD’s website, as well as cnet’s article on it, bought tears of joy to my eyes. Whether or not you still believe in the spirit of Saint Nicolas (Santa Claus), if you have small children, or know those who do, try to get together and watch Santa fly over the world. You shan’t be disappointed. And to think, it all started with a wrong number in the 50’s…

01. This is no means a post to draw sympathy towards me or my family. I am merely stating the facts. There are a lot of people in worse situations than we are. If you have something like Goodwill, the Salvation Army, or any other charitable organization where you can donate money or material goods that you no longer need/use, please donate them. Even take an angel (or two) from an Angel Tree.
NORAD 2009 LOGO

Karmic Slide-Show Breakdown

01st November 2009

Yes, there has been a slide-show type wallpaper(s) for Linux for a while available over at gnome-look.org (Just search for animated under the wallpaper section). But now it comes as one of the options for Karmic (Ubuntu 9.10). The process is a simple one if you want to make your own. I will break down the method they used to create the cosmic slide-show that comes default with Karmic.
First, if you go to /usr/share/backgrounds you will see a folder named cosmos. Inside the folder, you will find an xml file and the 9 images that rotate every 30 minutes.
If you want to create your own, I suggest that you create your own folder within your $HOME/Pictures directory. (I do not condone copying files to your root directories when it is not necessary.
Select the images that you want to use, and decide how often you want them to rotate (you will need to know how many seconds that this is so grab a calculator to do the math). Below is the xml file that controls the cosmos wallpapers.

  1. <background>
  2.   <starttime>
  3.     <year>2009</year>
  4.     <month>08</month>
  5.     <day>04</day>
  6.     <hour>00</hour>
  7.     <minute>00</minute>
  8.     <second>00</second>
  9.   </starttime>
  10. <!– This animation will start at midnight. –>
  11.   <static>
  12.     <duration>1795.0</duration>
  13.     <file>/usr/share/backgrounds/cosmos/cloud.jpg</file>
  14.   </static>
  15.   <transition>
  16.     <duration>5.0</duration>
  17.     <from>/usr/share/backgrounds/cosmos/cloud.jpg</from>
  18.     <to>/usr/share/backgrounds/cosmos/comet.jpg</to>
  19.   </transition>
  20.   <static>
  21.     <duration>1795.0</duration>
  22.     <file>/usr/share/backgrounds/cosmos/comet.jpg</file>
  23.   </static>
  24.   <transition>
  25.     <duration>5.0</duration>
  26.     <from>/usr/share/backgrounds/cosmos/comet.jpg</from>
  27.     <to>/usr/share/backgrounds/cosmos/earth-horizon.jpg</to>
  28.   </transition>
  29.   <static>
  30.     <duration>1795.0</duration>
  31.     <file>/usr/share/backgrounds/cosmos/earth-horizon.jpg</file>
  32.   </static>
  33.   <transition>
  34.     <duration>5.0</duration>
  35.     <from>/usr/share/backgrounds/cosmos/earth-horizon.jpg</from>
  36.     <to>/usr/share/backgrounds/cosmos/blue-marble-west.jpg</to>
  37.   </transition>
  38.   <static>
  39.     <duration>1795.0</duration>
  40.     <file>/usr/share/backgrounds/cosmos/blue-marble-west.jpg</file>
  41.   </static>
  42.   <transition>
  43.     <duration>5.0</duration>
  44.     <from>/usr/share/backgrounds/cosmos/blue-marble-west.jpg</from>
  45.     <to>/usr/share/backgrounds/cosmos/galaxy-ngc3370.jpg</to>
  46.   </transition>
  47.   <static>
  48.     <duration>1795.0</duration>
  49.     <file>/usr/share/backgrounds/cosmos/galaxy-ngc3370.jpg</file>
  50.   </static>
  51.   <transition>
  52.     <duration>5.0</duration>
  53.     <from>/usr/share/backgrounds/cosmos/galaxy-ngc3370.jpg</from>
  54.     <to>/usr/share/backgrounds/cosmos/helix-nebula.jpg</to>
  55.   </transition>
  56.   <static>
  57.     <duration>1795.0</duration>
  58.     <file>/usr/share/backgrounds/cosmos/helix-nebula.jpg</file>
  59.   </static>
  60.   <transition>
  61.     <duration>5.0</duration>
  62.     <from>/usr/share/backgrounds/cosmos/helix-nebula.jpg</from>
  63.     <to>/usr/share/backgrounds/cosmos/jupiter.jpg</to>
  64.   </transition>
  65.   <static>
  66.     <duration>1795.0</duration>
  67.     <file>/usr/share/backgrounds/cosmos/jupiter.jpg</file>
  68.   </static>
  69.   <transition>
  70.     <duration>5.0</duration>
  71.     <from>/usr/share/backgrounds/cosmos/jupiter.jpg</from>
  72.     <to>/usr/share/backgrounds/cosmos/sombrero.jpg</to>
  73.   </transition>
  74.   <static>
  75.     <duration>1795.0</duration>
  76.     <file>/usr/share/backgrounds/cosmos/sombrero.jpg</file>
  77.   </static>
  78.   <transition>
  79.     <duration>5.0</duration>
  80.     <from>/usr/share/backgrounds/cosmos/sombrero.jpg</from>
  81.     <to>/usr/share/backgrounds/cosmos/whirlpool.jpg</to>
  82.   </transition>
  83.   <static>
  84.     <duration>1795.0</duration>
  85.     <file>/usr/share/backgrounds/cosmos/whirlpool.jpg</file>
  86.   </static>
  87.   <transition>
  88.     <duration>5.0</duration>
  89.     <from>/usr/share/backgrounds/cosmos/whirlpool.jpg</from>
  90.     <to>/usr/share/backgrounds/cosmos/cloud.jpg</to>
  91.   </transition>
  92. </background>

To make it your own, copy the xml file, replace the file names to the path of the pictures, and there you have it, or you can continue reading to where I have disected another “animated” slide-show wallpaper.


If you want to look at one that hasn’t been “installed” I suggest downloading the MacAnimated wallpaper pack from gnome-look (Use the first download link, it doesn’t try to sell you anything or really make you wait a long amount of time). After you have the tar.gz file downloaded, extract it (don’t install it) and you can see the xml file in all it’s un-installed glory. (All the install SHOULD do is copy the files over into usr/share/backgrounds.)
I decided to test out to see if I could get the slide-show to work using the MacAnimated wallpapers, WITHOUT having to copy/move the files into /usr/share/backgrounds.
First I edited the xml file to change the directory of where it should look for the files. Here is the original xml file:
  1. <!– Based on Fedora Animated. Put together by zeeleck –>
  2. <!– backgrounds created by El-Sato –>
  3. <background>
  4.   <starttime>
  5.     <hour>0</hour>
  6.     <minute>00</minute>
  7.     <second>01</second>
  8.   </starttime>
  9. <!– + 12 am –>
  10. <static>
  11. <duration>18000.0</duration>
  12. <file>/usr/share/backgrounds/MacAnimated/night.svg</file>
  13. </static>
  14. <!– +5 am –>
  15. <transition type="overlay">
  16.         <duration>10800.0</duration>
  17.         <from>/usr/share/backgrounds/MacAnimated/night.svg</from>
  18.         <to>/usr/share/backgrounds/MacAnimated/sunrise.svg</to>
  19. </transition>
  20. <!– +8 am –>
  21. <transition type="overlay">
  22.         <duration>7200.0</duration>
  23.         <from>/usr/share/backgrounds/MacAnimated/sunrise.svg</from>
  24.         <to>/usr/share/backgrounds/MacAnimated/day.svg</to>
  25. </transition>
  26. <!– +10 am –>
  27. <static>
  28.         <duration>25200.0</duration>
  29.         <file>/usr/share/backgrounds/MacAnimated/day.svg</file>
  30. </static>
  31. <!– +5 pm –>
  32. <transition type="overlay">
  33.         <duration>7200.0</duration>
  34.         <from>/usr/share/backgrounds/MacAnimated/day.svg</from>
  35.         <to>/usr/share/backgrounds/MacAnimated/sunset.svg</to>
  36. </transition>
  37. <!– +7pm –>
  38. <transition type="overlay">
  39.         <duration>7200.0</duration>
  40.         <from>/usr/share/backgrounds/MacAnimated/sunset.svg</from>
  41.         <to>/usr/share/backgrounds/MacAnimated/night.svg</to>
  42. </transition>
  43. <!– +9pm –>
  44. <static>
  45.         <duration>10800.0</duration>
  46.         <file>/usr/share/backgrounds/MacAnimated/night.svg</file>
  47. </static>
  48. </background>

to

  1. <!– Based on Fedora Animated. Put together by zeeleck –>
  2. <!– backgrounds created by El-Sato –>
  3. <background>
  4.   <starttime>
  5.     <hour>0</hour>
  6.     <minute>00</minute>
  7.     <second>01</second>
  8.   </starttime>
  9. <!– + 12 am –>
  10. <static>
  11. <duration>18000.0</duration>
  12. <file>/home/your username/Pictures/MacAnimated/night.svg</file>
  13. </static>
  14. <!– +5 am –>
  15. <transition type="overlay">
  16.         <duration>10800.0</duration>
  17.         <from>/home/your username/Pictures/MacAnimated/night.svg</from>
  18.         <to>/home/your username/Pictures/MacAnimated/sunrise.svg</to>
  19. </transition>
  20. <!– +8 am –>
  21. <transition type="overlay">
  22.         <duration>7200.0</duration>
  23.         <from>/home/your username/Pictures/MacAnimated/sunrise.svg</from>
  24.         <to>/home/your username/Pictures/MacAnimated/day.svg</to>
  25. </transition>
  26. <!– +10 am –>
  27. <static>
  28.         <duration>25200.0</duration>
  29.         <file>/home/your username/Pictures/MacAnimated/day.svg</file>
  30. </static>
  31. <!– +5 pm –>
  32. <transition type="overlay">
  33.         <duration>7200.0</duration>
  34.         <from>/home/your username/Pictures/MacAnimated/day.svg</from>
  35.         <to>/home/your username/Pictures/MacAnimated/sunset.svg</to>
  36. </transition>
  37. <!– +7pm –>
  38. <transition type="overlay">
  39.         <duration>7200.0</duration>
  40.         <from>/home/your username/Pictures/MacAnimated/sunset.svg</from>
  41.         <to>/home/your username/Pictures/MacAnimated/night.svg</to>
  42. </transition>
  43. <!– +9pm –>
  44. <static>
  45.         <duration>10800.0</duration>
  46.         <file>/home/your username/Pictures/MacAnimated/night.svg</file>
  47. </static>
  48. </background>

Just right click on your desktop, select change appareance, click Add (+), and be sure to click All Files on the bottom right and select your xml file. It will work, and your don’t have to “install” it to your system. Happy Wallpaper Animating/Slide-Show-ing!
(This was just a pre-made example that I broke apart. You can truly take any images you want, with any time frame you want to have them change at. Remember, reverse engineering something fairly simple can teach you some things. :))

Conky, revisited

10th October 2009

conkyWith lots of googling and failed attempts, not quite right attempts, and then finnaly the product I was aiming at, I have my conky the way I have been wanting it for months. It consists of 11 different files with 1 calling them all together. (Yes, 12 different files, and my average CPU usage is low, and RAM usage is acceptable.)
(Click the image at left for the full size)
It consists of 5 different conky config files (probably could be less if I figured out how to use $voffset and $offset properly), 3 plain text files, the conky forecast config, 2 bash scripts, and one lua script.
The config files are as follows:

My “header” for my desktop

  1. #top header config
  2.  
  3. background yes
  4. use_xft yes
  5. xftfont Sans:size=9
  6. xftalpha 0.8
  7. update_interval 1.0
  8. total_run_times 0
  9. own_window yes
  10. own_window_type override
  11. own_window_transparent yes
  12. #own_window_colour black
  13. own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
  14. double_buffer yes
  15. minimum_size 1680 60
  16. maximum_width 1680
  17. draw_shades no
  18. draw_outline no
  19. draw_borders no
  20. draw_graph_borders no
  21. border_margin 2
  22. border_width 1
  23. default_color white
  24. default_shade_color black
  25. default_outline_color black
  26. alignment top_middle
  27. gap_x 0
  28. gap_y 0
  29. no_buffers yes
  30. uppercase no
  31. cpu_avg_samples 2
  32. net_avg_samples 2
  33. override_utf8_locale yes
  34. use_spacer none
  35. show_graph_scale no
  36. show_graph_range no
  37. text_buffer_size 2048
  38.  
  39. color3 FFFFFF
  40. color4 CCCCCC
  41.  
  42. lua_load ~/.conky/scripts/draw_bg.lua
  43. lua_draw_hook_pre draw_bg
  44.  
  45. ##
  46. # stuff after ‘TEXT’ will be formatted on screen
  47. ##
  48.  
  49. TEXT
  50. ${color3}${alignc}${font Webdings:bold:size=26}Y${voffset -10}${font Domestic Manners:size=30}SuzyQ
  51. ${color4}${voffset -50}${stippled_hr}

System and Network Config

  1. # system
  2.  
  3. background yes
  4. use_xft yes
  5. xftfont Sans:size=9
  6. xftalpha 0.8
  7. update_interval 1.0
  8. total_run_times 0
  9. own_window yes
  10. own_window_type override
  11. own_window_transparent yes
  12. #own_window_colour black
  13. own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
  14. double_buffer yes
  15. minimum_size 280 555
  16. maximum_width 280
  17. draw_shades no
  18. draw_outline no
  19. draw_borders no
  20. draw_graph_borders no
  21. border_margin 2
  22. border_width 1
  23. default_color white
  24. default_shade_color black
  25. default_outline_color black
  26. alignment top_right
  27. gap_x 10
  28. gap_y 75
  29. no_buffers yes
  30. uppercase no
  31. cpu_avg_samples 2
  32. net_avg_samples 2
  33. override_utf8_locale yes
  34. use_spacer none
  35. show_graph_scale no
  36. show_graph_range no
  37. text_buffer_size 2048
  38. #imlib_cache_size 10
  39. color1 FFFFFF
  40. #color3 191547
  41. color2 CCCCCC
  42. #color4 0b3d58
  43. #color1 000000
  44. #color2 0B3E59
  45. #color3 2D5F7A
  46. #color4 43708A
  47. color3 FFFFFF
  48. color4 CCCCCC
  49.  
  50. ##
  51. # stuff after ‘TEXT’ will be formatted on screen
  52. ##
  53.  
  54. lua_load ~/.conky/scripts/draw_bg.lua
  55. lua_draw_hook_pre draw_bg
  56.  
  57. TEXT
  58. ${font Sans:bold:size=10}${color2}SYSTEM${hr 2}${font}
  59. ${color1}${font StyleBats:size=10}i${font} Kernel:${alignr}${kernel}
  60. ${font StyleBats:size=10}A${font} CPU1:${alignr}${cpu cpu1}%
  61. ${color2}${cpubar cpu1}${color1}
  62. ${font StyleBats:size=10}A${font} CPU2:${alignr}${cpu cpu2}%
  63. ${color2}${cpubar cpu2}${color1}
  64. ${font StyleBats:size=10}g${font} RAM:${alignc}${mem}/${memmax}${alignr}${memperc}%
  65. ${color2}${membar}
  66. ${color1}${font StyleBats:size=12}j${font} SWAP:${alignc}${swap}/${swapmax}${alignr}${swapperc}%
  67. ${color2}${swapbar}
  68. ${color1}${font Pie charts for maps:size=10}7${font} Root:${alignc}${fs_free /}/${fs_size /}${alignr}${fs_free_perc /}%
  69. ${color2}${fs_bar /}
  70. ${color1}${font Pie charts for maps:size=10}7${font} Home:${alignc}${fs_free /home}/${fs_size /home}${alignr}${fs_free_perc /home}%
  71. ${color2}${fs_bar /home}
  72. ${color1}${font Pie charts for maps:size=10}7${font} Win7:${alignc}${if_mounted /media/disk}${fs_free /media/disk}/${fs_size /media/disk}${alignr}${fs_free_perc /media/disk}%
  73. ${color2}${fs_bar /media/disk}${else}${alignc} Not Mounted${endif}
  74. ${color1}${font Pie charts for maps:size=10}7${font} Other:${alignc}${if_mounted /media/disk-1}${fs_free /media/disk-1}/${fs_size /media/disk-1}${alignr}${fs_free_perc /media/disk-1}%
  75. ${color2}${fs_bar /media/disk-1}${else}${alignc} Not Mounted${endif}
  76. ${color1}${font Pie charts for maps:size=10}7${font} Storage:${alignc}${if_mounted /bigdrive}${fs_free /bigdrive}/${fs_size /bigdrive}${alignr}${fs_free_perc /bigdrive}%
  77. ${color2}${fs_bar /bigdrive}${else}${alignc} Not Mounted${endif}
  78. ${color1}${font StyleBats:size=10}k${font} Processes:${alignr}${processes} (${running_processes} running)
  79. Load:${alignr}${loadavg}
  80. NAME${alignr} PID    CPU  MEM
  81. ${top name 1} ${alignr}${top pid 1} ${top cpu 1} ${top mem 1}
  82. ${top name 2} ${alignr}${top pid 2} ${top cpu 2} ${top mem 2}
  83. ${top name 3} ${alignr}${top pid 3} ${top cpu 3} ${top mem 3}
  84. ${top name 4} ${alignr}${top pid 4} ${top cpu 4} ${top mem 4}
  85. ${top name 5} ${alignr}${top pid 5} ${top cpu 5} ${top mem 5}
  86. ${font Sans:bold:size=10}${color2}NETWORK${hr 2}${font}
  87. ${if_existing /proc/net/route eth0}${color1}${font PizzaDude Bullets:size=10}b${font} Local IP:${alignr}${addr eth0}
  88. ${font PizzaDude Bullets:size=10}a${font} Public IP:${alignr}${execi 3600 $HOME/.conky/scripts/myip.sh}
  89. ${font PizzaDude Bullets:size=10}T${font} Total Download:${alignr}${totaldown eth0}
  90. ${font PizzaDude Bullets:size=10}N${font} Total Upload:${alignr}${totalup eth0}
  91. ${font PizzaDude Bullets:size=10}U${font} Down Speed:${alignr}${downspeed eth0}
  92. ${font PizzaDude Bullets:size=10}O${font} Up Speed:${alignr}${upspeed eth0}${else}${font PizzaDude Bullets:size=10}4${font} Network Unavailable ${endif}

Weather Config (remember to get your own weather XOAP location)

  1. # weather
  2.  
  3. background yes
  4. use_xft yes
  5. xftfont Sans:size=9
  6. xftalpha 0.8
  7. update_interval 1.0
  8. total_run_times 0
  9. own_window yes
  10. own_window_type override
  11. own_window_transparent yes
  12. own_window_colour black
  13. own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
  14. double_buffer yes
  15. minimum_size 280 235
  16. maximum_width 280
  17. draw_shades no
  18. draw_outline no
  19. draw_borders no
  20. draw_graph_borders no
  21. border_margin 2
  22. border_width 1
  23. default_color white
  24. default_shade_color black
  25. default_outline_color black
  26. alignment top_right
  27. gap_x 300
  28. gap_y 75
  29. no_buffers yes
  30. uppercase no
  31. cpu_avg_samples 2
  32. net_avg_samples 2
  33. override_utf8_locale yes
  34. use_spacer none
  35. show_graph_scale no
  36. show_graph_range no
  37. text_buffer_size 2048
  38. #imlib_cache_size 10
  39. color1 FFFFFF
  40. color2 CCCCCC
  41.  
  42. lua_load ~/.conky/scripts/draw_bg.lua
  43. lua_draw_hook_pre draw_bg
  44.  
  45.  
  46. ##
  47. # stuff after ‘TEXT’ will be formatted on screen
  48. ##
  49.  
  50. TEXT
  51. ${font Sans:bold:size=10}${color2}WEATHER${hr 2}
  52. ${color1}${voffset -8}${alignr 56}${font ConkyWeather:style=Bold:size=40}${execi 5 conkyForecast –location=USAR0124 –datatype=WF}
  53. ${voffset -52}${font Weather:size=40}y ${offset -15}${font Sans:size=20}${execi 5 conkyForecast –location=USAR0124 –datatype=HT –imperial}
  54. ${font}${alignr}${offset 0}${voffset -15}${execi 5 conkyForecast –location=USAR0124 –datatype=CT}
  55. Temperature:${alignr}${execi 5 conkyForecast –location=USAR0124 –datatype=HT –imperial} (Feels Like ${execi 5 conkyForecast –location=USAR0124 –datatype=LT –imperial})
  56. Humidity:${alignr}${execi 5 conkyForecast –location=USAR0124 –datatype=HM}
  57. Dew Point:${alignr}${execi 5 conkyForecast –location=USAR0124 –datatype=DP –imperial}
  58. Visibility:${alignr}${execi 5 conkyForecast –location=USAR0124 –datatype=VI –imperial}
  59. Wind:${alignr}${execi 5 conkyForecast –location=USAR0124 –datatype=WD –imperial} (${execi 5 conkyForecast –location=USAR0124 –datatype=WS –imperial})
  60. UV-Index:${alignr}${execi 5 conkyForecast –location=USAR0124 –datatype=UI} (${execi 5 conkyForecast –location=USAR0124 –datatype=UT})
  61. Barometer:${alignr}${execi 5 conkyForecast –location=USAR0124 –datatype=BR –imperial} (${execi 5 conkyForecast –location=USAR0124 –datatype=BD})
  62. Daylight:${alignr}${execi 5 conkyForecast –location=USAR0124 –datatype=SR}-${execi 5 conkyForecast –location=USAR0124 –datatype=SS}
  63. Moon Phase:${alignr}${execi 5 conkyForecast –location=USAR0124 –datatype=MP}

I just call some plain text files here. Nothing fancy, unless you count fortune and cowsay/think

  1. # *.txt files and such
  2.  
  3. background yes
  4. use_xft yes
  5. xftfont Sans:size=9
  6. xftalpha 0.8
  7. update_interval 1.0
  8. total_run_times 0
  9. own_window yes
  10. own_window_type override
  11. own_window_transparent yes
  12. #own_window_colour black
  13. own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
  14. double_buffer yes
  15. minimum_size 280 670
  16. maximum_width 280
  17. draw_shades no
  18. draw_outline no
  19. draw_borders no
  20. draw_graph_borders no
  21. border_margin 2
  22. border_width 1
  23. default_color white
  24. default_shade_color black
  25. default_outline_color black
  26. alignment top_right
  27. gap_x 590
  28. gap_y 75
  29. no_buffers yes
  30. uppercase no
  31. cpu_avg_samples 2
  32. net_avg_samples 2
  33. override_utf8_locale yes
  34. use_spacer none
  35. show_graph_scale no
  36. show_graph_range no
  37. text_buffer_size 2048
  38.  
  39. color1 FFFFFF
  40. color2 CCCCCC
  41.  
  42. lua_load ~/.conky/scripts/draw_bg.lua
  43. lua_draw_hook_pre draw_bg
  44.  
  45. ##
  46. # stuff after ‘TEXT’ will be formatted on screen
  47. ##
  48.  
  49. TEXT
  50. ${font Sans:bold:size=10}${color2}MOO${hr 2}
  51. ${color1}${font mono:size=9}${execi 120 fortune -s | fold -w25 | cowthink -W 25 -b -n -f three-eyes.cow}
  52. ${font Sans:bold:size=10}${color2}LOVE${hr 2}
  53. ${color1}${font mono:size=9}${execi 30 cat $HOME/.conky/txt/.tux.txt}
  54. ${font Sans:bold:size=10}${color2}TO DO${hr 2}
  55. ${font}${color1}${execi 30 cat $HOME/.conky/txt/.TODO.txt}
  56. ${font Sans:bold:size=10}${color2}SHORTCUTS${hr 2}
  57. ${font}${color1}${execi 30 cat $HOME/.conky/txt/.shortcuts}

My own barcode message. I do not include what it really says, you’ll have to scan the screen with a barcode scanner to find out. I was inspired by Google. :)

  1. # barcode
  2.  
  3. background yes
  4. use_xft yes
  5. xftfont Sans:size=9
  6. xftalpha 0.8
  7. update_interval 1.0
  8. total_run_times 0
  9. own_window yes
  10. own_window_type override
  11. own_window_transparent yes
  12. #own_window_colour black
  13. own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
  14. double_buffer yes
  15. minimum_size 280 35
  16. maximum_width 280
  17. draw_shades no
  18. draw_outline no
  19. draw_borders no
  20. draw_graph_borders no
  21. border_margin 2
  22. border_width 1
  23. default_color white
  24. default_shade_color black
  25. default_outline_color black
  26. alignment bottom_left
  27. gap_x 10
  28. gap_y 25
  29. no_buffers yes
  30. uppercase no
  31. cpu_avg_samples 2
  32. net_avg_samples 2
  33. override_utf8_locale yes
  34. use_spacer none
  35. show_graph_scale no
  36. show_graph_range no
  37. text_buffer_size 2048
  38. #imlib_cache_size 10
  39. #color1 000000
  40. color1 999999
  41.  
  42. lua_load ~/.conky/scripts/draw_bg.lua
  43. lua_draw_hook_pre draw_bg
  44.  
  45. ##
  46. # stuff after ‘TEXT’ will be formatted on screen
  47. ##
  48.  
  49. TEXT
  50. ${color1}${font Free 3 of 9 Extended:size=30}*[scan it yourself if you really want to find out what it says]*

Standard conky Forecast config file. Make sure to fill in your own ID and Key

  1. # config settings for conkyForecast.py
  2. CACHE_FOLDERPATH = /tmp/
  3. CONNECTION_TIMEOUT = 5
  4. EXPIRY_MINUTES = 30
  5. TIME_FORMAT = %H:%M
  6. DATE_FORMAT = %Y-%m-%d
  7. LOCALE = en
  8. XOAP_PARTNER_ID = xxxxxxxxxx
  9. XOAP_LICENCE_KEY = yyyyyyyyyyyyyyyy

SSC script orginally found here: http://conky.linux-hardcore.com/?page_id=503

  1. #!/bin/sh
  2. # click to start, click to stop
  3.  
  4. if pidof conky | grep [0-9] > /dev/null
  5. then
  6. exec killall conky
  7. else
  8.  
  9. sleep 30  # sleep not required for xfce on startup – 30 or more for others
  10. conky -c ~/.conky/configs/.conky_header &
  11. conky -c ~/.conky/configs/.conky_txt &
  12. conky -c ~/.conky/configs/.conky_weather &
  13. conky -c ~/.conky/configs/.conky_system &
  14. conky -c ~/.conky/configs/.conky_barcode &
  15.  
  16.  
  17. exit
  18. fi

External IP Script

  1. #!/bin/sh
  2. wget -q -O – checkip.dyndns.org|sed -e ’s/.*Current IP Address: //’ -e ’s/<.*$//’

Lua Script for background, found here: http://conky.linux-hardcore.com/?page_id=3002

  1. –[[
  2. Background by londonali1010 (2009)
  3.  
  4. 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.
  5.  
  6. To call this script in Conky, use (assuming you have saved this script to ~/scripts/):
  7.         lua_load ~/scripts/draw_bg.lua
  8.         lua_draw_hook_pre draw_bg
  9.  
  10. Changelog:
  11. + v1.0 -- Original release (07.10.2009)
  12. ]]
  13.  
  14. – Change these settings to affect your background.
  15. – "corner_r" is the radius, in pixels, of the rounded corners. If you don’t want rounded corners, use 0.
  16.  
  17. corner_r=15
  18.  
  19. – Set the colour and transparency (alpha) of your background.
  20.  
  21. bg_colour=0×000000
  22. bg_alpha=0.5
  23.  
  24. require ‘cairo’
  25. function rgb_to_r_g_b(colour,alpha)
  26.         return ((colour / 0×10000) % 0×100) / 255., ((colour / 0×100) % 0×100) / 255., (colour % 0×100) / 255., alpha
  27. end
  28.  
  29. function conky_draw_bg()
  30.         if conky_window==nil then return end
  31.         local w=conky_window.width
  32.         local h=conky_window.height
  33.         local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, w, h)
  34.         cr=cairo_create(cs)
  35.        
  36.         cairo_move_to(cr,corner_r,0)
  37.         cairo_line_to(cr,w-corner_r,0)
  38.         cairo_curve_to(cr,w,0,w,0,w,corner_r)
  39.         cairo_line_to(cr,w,h-corner_r)
  40.         cairo_curve_to(cr,w,h,w,h,w-corner_r,h)
  41.         cairo_line_to(cr,corner_r,h)
  42.         cairo_curve_to(cr,0,h,0,h,0,h-corner_r)
  43.         cairo_line_to(cr,0,corner_r)
  44.         cairo_curve_to(cr,0,0,0,0,corner_r,0)
  45.         cairo_close_path(cr)
  46.        
  47.         cairo_set_source_rgba(cr,rgb_to_r_g_b(bg_colour,bg_alpha))
  48.         cairo_fill(cr)
  49. end

feel free to ask any questions. If I do not know the answer to it, I will try to point you in the right direction.

A Random Funny Geeky Thing

04th September 2009

originally found here: http://thedailywtf.com/Articles/Microsoft-Vissa,-Hey-Thats-Ours,–More-Support-Stories.aspx

A few years ago, a common free email provider who we’ll call “Yooha” had an outage on one of their load balanced email servers. Since it was only a problem on accounts tied to that server (and because I was in the middle of a fairly time sensitive transaction), I thought I’d send them a note about it in case they hadn’t heard about the problem yet. Here is the text of my email:

----- Original Message ----
From: Jonathan Cortis
To: customersupport@y----.com;
Sent: Saturday, July 22, 2006 7:01:20 PM
Subject: f606.mail.y----.com

Server f606.mail.y----.com is down and not responding to
pings or requests. My wife's email account is always
directed to that server, so she cannot check her mail.
For reference, her username is redacted.

You might want to take that server out of the rotation.

Thank you,
Jonathan

I was quite surprised by their grateful response:

Wow, Jonathan.

Thanks for assessing a very complicated situation, and
immediately coming up with a complete solution.

In fact, we have so little idea of what's going on
over here, perhaps you can come on over and single-
handedly solve it for us.  

We'll get right on your commands, just as soon as we
finish our donuts.

Oh, and after our week off, too.  And, then there's the
matter of finding out which extension cord that is
plugged into...

customersupport@y----.com
818-555-1234

I wrote this script out of my need for a quick method of adding virtual domains. I hope you find this to be of great use.

create a file named addomain

  1. sudo vim /usr/bin/adddomain

Place this in your file:

  1. #!/bin/bash
  2. #Edit the following e-mail address:
  3. email="your@email.address"
  4. ipaddress=`ifconfig eth0 | grep inet | awk ‘{print $2}’ | sed ’s/addr://’ | grep .`
  5. domain=$1
  6. file="/etc/apache2/sites-available/$domain"
  7. if [ -z $domain ]; then
  8.         echo "You did not specify a domain"
  9.         echo "Usage:"
  10.         echo "          adddomain domain.tdl"
  11.         echo ""
  12. else
  13.         ping=`ping -c 1 $domain|grep "$ipaddress"`
  14.         if [ -z $ping ]; then
  15.                 echo "$domain is not hosted on this server, or you have not set up its A record"
  16.         else
  17.                 touch /etc/apache2/sites-available/$domain;
  18.                 echo "# Place any notes or comments you have here
  19. # It will make any customisation easier to understand in the weeks to come
  20. # domain: $domain
  21. # public: /var/virtualwww/$domain
  22.  
  23. <VirtualHost *:80>
  24.  
  25.  # Admin email, Server Name (domain name) and any aliases
  26.  ServerAdmin $email
  27.  ServerName  $domain
  28.  ServerAlias www.$domain
  29.  
  30.  
  31.  # Index file and Document Root (where the public files are located)
  32.  DirectoryIndex index.php
  33.  DocumentRoot /var/virtualwww/$domain
  34.  
  35.  
  36.  # Custom log file locations
  37.  LogLevel warn
  38.  ErrorLog  /var/log/apache2/$domain/error.log
  39.  CustomLog /var/log/apache2/$domain/access.log combined
  40.  
  41. </VirtualHost>" > $file;
  42.                 mkdir /var/log/apache2/$domain;
  43.                 mkdir /var/virtualwww/$domain;
  44.                 ln -s /var/www/.htaccess /var/virtualwww/$domain/.htaccess;
  45.                 mkdir /var/virtualwww/$domain/cgi-bin;
  46.                 echo "created $domain";
  47.                 echo "please restart apache2";
  48.                 a2ensite $domain;
  49.         fi
  50. fi

Next, change the permissions of adddomain:

  1. sudo chmod 500 /bin/bash/adddomain

Once all that is done, create a new folder to house your virtual domains:

  1. sudo mkdir /var/virtualwww

Next, change the adddomain file so it properly points to your .htaccess file (if you have one), and you’re done. To use this script:

  1. adddomain domain.tdl

The server will do a lookup on that domain/subdomain, and if it shows that the server you are on does not have an IP on it that matches the (sub)domains IP, it won’t let you add that site.

Older Posts »