Last edited by VastOne; October 6th, 2012 at 01:46 AM.
Well hello again Sector11. @vastone, I posted a similar post on #! that you can just ignore. I see that this is a prob with RB pulling the metadata. Can you tell me, do any of the scripts for the other media players listed among the '18' music apps still work, and if so, which one should I be using? I'm happy to use either of the methods i.e. python or Lua. Let me know!
Also thanks again Sector11 for pointing me in the right direction! You can't believe how much arclance helped me out. The guy is a genius just like you said!!!
Thanks again,
Jed
I would recommend any of the other 17 apps in that How To, and give the loudest shout to GMusicBrowser. You might want to check out the How To on GMB I have as well ... GMusicBrowser and Custom Layouts
kaivalagi, Sector11, arclance... It does not get much better than that!
Thanks a lot Vastone! What a great music player! Had never heard of it. Attached is my latest favorite look for my desktop! This was much "easier" than setting up conky, especially if your working with python or Lua scripts within the conky! Forget Ryhthmbox! I'm a definite convert to GMB!!! Should be the default in Ubuntu as far as I'm concerned...
Again, thanks a lot...
Jed
Last edited by Jedcurtis; October 7th, 2012 at 11:28 AM.
Why thank-you very much sir!!! Without you, arclance, vastone, vindsl etc. etc. etc., I'd be no-where! I've learned a lot and have all of you to thank. Proving once again, "an old dog, can learn new tricks".
I'm still playing around with "other" conky scripts I've downloaded and 'made-my-own' but I'm still mostly just a copy/paste guy!
You guys are the greatest. Speaking of "other", I've a copy of v9000 and it has a template called "s11template.lua" which doesn't take much of a giant leap to imagine it must be sector11's! In it, it calls up an "/images/cyan-1.png" file. Is that perhaps a directory one would need for that template to work? If so, is it available somewhere to download? No biggie, just wanted to see it in action!
Thanks,
Jed
OK how about a little hop.
shhhh ... copy paste is my friend - don't tell anyone! ... shhh
You can get the 1x1 pixel images here with an explanation of how/why I used them. That conky was a work in process.
Put the images where you want but in the lua template you have to call them up like so using YOUR direct path - no ~/path allowed:
Here's a shot of them in action:Code:image({x=205,y=5,w=1,h=260,file="/home/sector11/Conky/images/LightSlateGrey_1.png"})
And that template if you are interested:
Three fonts needed: Zekton, digitalk & Anonymous ProCode:--[[ The latest script is a lua only weather script. aka: v9000 http://crunchbanglinux.org/forums/topic/16100/weather-in-conky/ the file: http://dl.dropbox.com/u/19008369/v9000.tar.gz mrppeachys LUA Tutorial http://crunchbanglinux.org/forums/topic/17246/how-to-using-lua-scripts-in-conky/ sun_rise_24[n] sun_set_24[n] moon_rise_24[n] moon_set_24[n] now["time_24"] now["fc_hour1_time_24"] now["fc_hour2_time_24"] now["fc_hour3_time_24"] ]] _G.weather_script = function()--#### DO NOT EDIT THIS LINE ############## --these tables hold the coordinates for each repeat do not edit ######### top_left_x_coordinate={}--############################################### top_left_y_coordinate={}--############################################### --####################################################################### --SET DEFAULTS ########################################################## --set defaults do not localise these defaults if you use a seperate display script default_font="Anonymous Pro:bold"--font must be in quotes default_font_size=11 default_color=0xffffff--white default_alpha=1--fully opaque default_image_width=50 default_image_height=50 --END OF DEFAULTS ####################################################### --START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE out({c=0x00BFFF,a=1,x=10,y=15,txt=now["date"].." "..now["month_short"].." "..now["year"]..": Fetched @ "..now["time_24"]}) image({x=20,y=20,h=40,w=40,file=now["weather_icon"]}) -- Temp / FeelsLike & CONDITIONS TEXT out({c=0x48D1CC,a=1,f="digitalk",fs=50,x=80,y=60,txt=now["temp"]}) out({c=0x00BFFF,a=1,f="digitalk",fs=50,x=140,y=60,txt=now["feels_like"]}) out({c=0xA4FFA4,a=1,x=81,y=72,txt="Temp WC · HI"}) out({c=0x48D1CC,a=1,f="Zekton",fs=18,x=10,y=94,txt=now["conditions_short"]}) -- data titles -- data output datay=110 -- y=datay or datayy=15 -- y=datay+(datayy*1) use 1 or more out({c=0xFAFAEC,a=1,x=10,y=datay,txt="Wind Chill:"}) out({c=0x48D1CC,a=1,x=70,y=datay,txt=now["wind_chill"].."°"}) out({c=0xFAFAEC,a=1,x=100,y=datay,txt="Heat Index:"}) out({c=0xFF8C00,a=1,x=165,y=datay,txt=now["heat_index"].."°"}) out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*1),txt="Today's Hi·Lo:"}) out({c=0xFF8C00,a=1,x=100,y=datay+(datayy*1),txt=high_temp[1].."°"}) out({c=0x48D1CC,a=1,x=140,y=datay+(datayy*1),txt=low_temp[1].."°"}) out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*2),txt="Wind:"}) out({c=0x48D1CC,a=1,x=60,y=datay+(datayy*2),txt=now["wind_km"]}) out({c=0x48D1CC,a=1,x=110,y=datay+(datayy*2),txt=now["wind_nesw"]}) out({c=0xFAFAEC,a=1,x=140,y=datay+(datayy*2),txt="@"}) out({c=0x48D1CC,a=1,x=165,y=datay+(datayy*2),txt=now["wind_deg"]}) out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*3),txt="Hum:"}) out({c=0x48D1CC,a=1,x=60,y=datay+(datayy*3),txt=now["humidity"].."%"}) out({c=0xFAFAEC,a=1,x=110,y=datay+(datayy*3),txt="DP:"}) out({c=0x48D1CC,a=1,x=145,y=datay+(datayy*3),txt=now["dew_point"].."°"}) out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*4),txt="Bar:"}) out({c=0x48D1CC,a=1,x=60,y=datay+(datayy*4),txt=now["pressure_mb"]}) out({c=0xFAFAEC,a=1,x=110,y=datay+(datayy*4),txt="Vis:"}) out({c=0x48D1CC,a=1,x=145,y=datay+(datayy*4),txt=now["visibility"]}) out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*5),txt="Ceil:"}) out({c=0x48D1CC,a=1,x=60,y=datay+(datayy*5),txt=now["ceiling"]}) out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*6),txt="Precip:"}) out({c=0x48D1CC,a=1,x=60,y=datay+(datayy*6),txt=precipitation[1].."%"}) out({c=0xFAFAEC,a=1,x=110,y=datay+(datayy*6),txt="Cloud:"}) out({c=0x48D1CC,a=1,x=150,y=datay+(datayy*6),txt=cloud_cover[1].."%"}) out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*7),txt="UV:"}) out({c=0x48D1CC,a=1,x=60,y=datay+(datayy*7),txt=uv_index_num[1]}) out({c=0x48D1CC,a=1,x=110,y=datay+(datayy*7),txt=uv_index_txt[1]}) out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*8),txt="Sun:"}) out({c=0xFAFAEC,a=1,x=60,y=datay+(datayy*8),txt=sun_rise_24[1]}) out({c=0x48D1CC,a=1,x=120,y=datay+(datayy*8),txt=sun_set_24[1]}) out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*9),txt="Moon:"}) out({c=0xFAFAEC,a=1,x=60,y=datay+(datayy*9),txt=moon_rise_24[1]}) out({c=0x48D1CC,a=1,x=120,y=datay+(datayy*9),txt=moon_set_24[1]}) out({c=0xFAFAEC,a=1,x=10,y=datay+(datayy*10),txt="Phase:"}) out({c=0x48D1CC,a=1,x=60,y=datay+(datayy*10),txt=moon_phase[1]}) -- line image({x=205,y=5,w=1,h=260,file="/home/sector11/Conky/images/LightSlateGrey_1.png"}) -- 3 hour output out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=12,x=220,y=15,txt="Next 3"}) out({c=0x48D1CC,a=1,f="Anonymous Pro:bold",fs=12,x=220,y=30,txt="Hours"}) -- 1st hour out({c=0xA4FFA4,x=220,y=50,txt=now["fc_hour1_time_24"]..":00"}) image({w=30,h=30,x=223,y=55,file=now["fc_hour1_wicon"]}) -- image({w=30,h=30,x=223,y=55,file="/home/sector11/Conky/images/red_1.png"}) out({x=228,y=100,txt=now["fc_hour1_temp"] .."°"}) -- 2nd hour out({c=0xA4FFA4,x=220,y=datay+(datayy*1),txt=now["fc_hour2_time_24"]..":00"}) image({w=30,h=30,x=223,y=130,file=now["fc_hour2_wicon"]}) -- image({w=30,h=30,x=223,y=130,file="/home/sector11/Conky/images/red_1.png"}) out({x=228,y=180,txt=now["fc_hour2_temp"] .."°"}) -- 3rd hour out({c=0xA4FFA4,x=220,y=210,txt=now["fc_hour3_time_24"]..":00"}) image({w=30,h=30,x=223,y=215,file=now["fc_hour3_wicon"]}) -- image({w=30,h=30,x=223,y=215,file="/home/sector11/Conky/images/red_1.png"}) out({x=228,y=datay+(datayy*10),txt=now["fc_hour3_temp"] .."°"}) -- lines - to the right of the Next 3 Hours and today's forecast -- vertical from top image({x=385,y=5,w=1,h=130,file="/home/sector11/Conky/images/LightSlateGrey_1.png"}) -- hoizontal between top and bottom sections image({x=270,y=134,w=115,h=1,file="/home/sector11/Conky/images/LightSlateGrey_1.png"}) -- vertical to bottom image({x=270,y=135,w=1,h=130,file="/home/sector11/Conky/images/LightSlateGrey_1.png"}) --start or weather forecast table section --set start forecast day start_day=1 --set total forecast days you want to display number_of_days=10 topy=15 topyy=135 -- topy+(topyy*1) topx=285 topxx=120 --set coordinates for top lef corners for each repeat top_left_x_coordinate[1],top_left_y_coordinate[1] =topx ,topy top_left_x_coordinate[2],top_left_y_coordinate[2] =topx+(topxx*1) ,topy top_left_x_coordinate[3],top_left_y_coordinate[3] =topx+(topxx*2) ,topy top_left_x_coordinate[4],top_left_y_coordinate[4] =topx+(topxx*3) ,topy top_left_x_coordinate[5],top_left_y_coordinate[5] =topx+(topxx*4) ,topy top_left_x_coordinate[6],top_left_y_coordinate[6] =topx ,topy+(topyy*1) top_left_x_coordinate[7],top_left_y_coordinate[7] =topx+(topxx*1) ,topy+(topyy*1) top_left_x_coordinate[8],top_left_y_coordinate[8] =topx+(topxx*2) ,topy+(topyy*1) top_left_x_coordinate[9],top_left_y_coordinate[9] =topx+(topxx*3) ,topy+(topyy*1) top_left_x_coordinate[10],top_left_y_coordinate[10] =topx+(topxx*4) ,topy+(topyy*1) --######################################################################################## for i=start_day,number_of_days-(start_day-1) do --start of day repeat, do not edit ####### tlx=top_left_x_coordinate[i] --sets top left x position for each repeat ################## tly=top_left_y_coordinate[i] --sets top left y position for each repeat ################## --######################################################################################## out({c=0xA4FFA4,a=1,x=tlx,y=tly,txt=forecast_day_short[i].." "..forecast_date[i].." "..forecast_month_short[i]}) image({x=tlx,y=tly+5,h=30,w=30,file=weather_icon[i]}) out({c=0xFF8C00,a=1,x=tlx+35,y=tly+15,txt=high_temp[i].."°"}) out({c=0x48D1CC,a=1,x=tlx+35,y=tly+30,txt=low_temp[i].."°"}) out({c=0x48D1CC,a=1,x=tlx,y=tly+50,txt=conditions_short[i]}) out({c=0xFAFAEC,a=1,x=tlx,y=tly+65,txt="P: "..precipitation[i].."%"}) out({c=0xFAFAEC,a=1,x=tlx+50,y=tly+65,txt="UV: "..uv_index_num[i]}) out({c=0xFAFAEC,a=1,x=tlx,y=tly+80,txt="H: "..humidity[i].."%"}) out({c=0xFAFAEC,a=1,x=tlx+50,y=tly+80,txt=uv_index_txt[i]}) out({c=0xFAFAEC,a=1,x=tlx,y=tly+95,txt="S: "..sun_rise_24[i]}) out({c=0x48D1CC,a=1,x=tlx+60,y=tly+95,txt=sun_set_24[i]}) out({c=0xFAFAEC,a=1,x=tlx,y=tly+110,txt="M: "..moon_rise_24[i]}) out({c=0x48D1CC,a=1,x=tlx+60,y=tly+110,txt=moon_set_24[i]}) --######################################################################################## end--of forecast repeat section ########################################################## --######################################################################################## --END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE --- --####################################################################### end--of weather_display function do not edit this line ################## --#######################################################################
The conky:
NOTE: 1 blank line after TEXTCode:## To use #! in a conky use: ${exec echo '#!'} ## killall conky && conky -c ~/Conky/S11_v9_H.conky & ## ## The latest script is a lua only weather script. aka: v9000 ## http://crunchbanglinux.org/forums/topic/16100/weather-in-conky/ ## ## the file: ## http://dl.dropbox.com/u/19008369/weatheragain9000.lua.tar.gz ## ## mrppeachys LUA Tutorial ## http://crunchbanglinux.org/forums/topic/17246/how-to-using-lua-scripts-in-conky/ ## ## ### 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_hints below,skip_taskbar,skip_pager own_window_colour gray own_window_class Conky own_window_title Horizontal v9000 # 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 normal # own_window_argb_visual yes ### When ARGB visuals are enabled, this use this to modify the alpha value ### Use: own_window_type normal ### Use: own_window_transparent no ### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity. # own_window_argb_value 0 minimum_size 860 260 ##820 260 ## width, height maximum_width 860 ##820 ## width, usually a good idea to equal minimum width gap_x 0 ### left &right gap_y 10 ### up & down alignment top_middle #################################################### End Window Settings ### ### Font Settings ########################################################## # Use Xft (anti-aliased font and stuff) use_xft yes xftfont Anonymous Pro:size=9 # Alpha of Xft font. Must be a value at or between 1 and 0 ### xftalpha 1 # 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 gray 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 5 border_outer_margin 0 # border width border_width 0 # graph borders draw_graph_borders no #default_graph_size 15 40 ##################################################### End Borders Secton ### ### Miscellaneous Section ################################################## # Boolean value, if true, Conky will be forked to background when started. background yes # 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 # Maximum size of user text buffer, i.e. layout below TEXT line in config file # (default is 16384 bytes) # max_user_text 16384 # Desired output unit of all objects displaying a temperature. Parameters are # either "fahrenheit" or "celsius". The default unit is degree Celsius. # temperature_unit Fahrenheit ############################################## 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 20 0 0 0 0 0x000000 0.5 # lua_draw_hook_post draw-bg 125 0 0 0 0 0x000000 0.01 # # TEXT # ############### V9000 ######################################################## #starts the lua weather data gathering function, call once at top of conkyrc lua_load ~/v9000/v9000.lua lua_draw_hook_post weather lua_load ~/Conky/templates/h-10d-template.lua ####################################################### 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 1800 TEXT
OH MY!!!!!!!!!! Talking about conky here's something new: Sector11 with a one liner!!!!!
Shamelessly borrowed, with modifications, from Voyager Linux while found on the ARCH forums.Originally Posted by doggie
Imagine that no shame anywhere.
The Oneliner:
The Clock:Code:#=== 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}
NOTE: 6 blank lines at the end.Code:#=== 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}
clock_conky.lua
Code:--============================================================================== -- 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) go_gauge_rings(display) --end end
Bookmarks