Author: ninjaaron Language: text
Description: makes a conkyrc Timestamp: 2012-09-10 16:17:32 -0400
View raw paste Reply
  1. #!/bin/bash
  2. # Generates a Conky theme based on the settings from the active X color theme
  3.  
  4. theme=$(cat ~/.themes/theme)
  5. font="bitocrafull"
  6. source ~/.themes/"$theme"
  7.  
  8. test -z "$con_default_color" && con_default_color="$fg_color"
  9. test -z "$con_own_window_colour" && con_own_window_colour="$bg_color"
  10. test -z "$con_mpd_title" && con_mpd_title="$green"
  11. test -z "$con_mpd_artist" && con_mpd_artist="$blue"
  12. test -z "$con_mpd_elapsed" && con_mpd_elapsed="$red"
  13. test -z "$con_xftfont" && con_xftfont="$font"
  14. test -z "$con_hlwm_pad" && con_hlwm_pad=11
  15.  
  16. hash_rm () {
  17.   echo "$1" | cut -b2-7
  18. }
  19.  
  20. con_default_color=$(hash_rm $con_default_color)
  21. con_own_window_colour=$(hash_rm $con_own_window_colour)
  22.  
  23. echo "
  24. net_avg_samples 2
  25. no_buffers yes
  26. own_window yes
  27. own_window_class Conky
  28. update_interval 1.0
  29. short_units yes
  30. draw_shades no
  31. alignment top_right
  32. gap_x 0
  33. gap_y 0
  34. minimum_size 1360 0
  35. default_color $con_default_color
  36. use_xft yes
  37. xftfont $con_xftfont
  38. own_window_colour $con_own_window_colour
  39. " > ~/.conkyrc
  40.  
  41. echo '
  42. TEXT
  43.  ${time %a %d.%m.%Y}${if_mpd_playing}   \
  44. ${color '"$con_mpd_title"'}${mpd_title}$color | ${color '"$con_mpd_artist"'}$mpd_artist ${color}| ${color '"$con_mpd_elapsed"'}${mpd_elapsed}${color}\
  45. ${alignr}ram $mem | cpu $cpu% | temp ${exec sensors|grep temp1|cut -d'+' -f2|cut -b1-6} \
  46. | wifi ${wireless_link_qual_perc wlan0}% | speed ${downspeed wlan0}/${upspeed wlan0} \
  47. | batt ${battery_percent}% | \
  48. \
  49. ${else}${alignc}ram $mem | cpu $cpu% | temp ${exec sensors|grep temp1|cut -d'+' -f2|cut -b1-6} \
  50. | wifi ${wireless_link_qual_perc wlan0}% | speed ${downspeed wlan0}/${upspeed wlan0} \
  51. | batt ${battery_percent}%${alignr}${endif}\
  52. ${time %R} ${voffset -5}' >> ~/.conkyrc
  53.  
View raw paste Reply