0 Members and 1 Guest are viewing this topic.
# Parrot OS Conky tweaked by: mrneilypops# https://www.mrneilypops.io/parrot-os-conky-tweaked/## pkill -xf "conky -c /media/5/Conky/Parrot/S11_Parrot.OS.conky" &## works perfekt unklar April 2017## ---------- Begin Window Settingsown_window yesown_window_type normalown_window_transparent yesown_window_hints skip_taskbar,skip_pager,undecorated,belowown_window_colour 000000own_window_class Conkyown_window_title S11 Parrot OS Conky## ARGB can be used for real transparencyown_window_hints#own_window_argb_visual yes ## Options: yes or no## Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.#own_window_argb_value 80#minimum_size 300 0#maximum_width 300gap_x 10 #l|rgap_y 40 #u|dminimum_size 248 650 #1020maximum_width 248alignment tl## ---------- End Window Settings## ---------- Font Settings## Force UTF8? requires XFToverride_utf8_locale yesuse_xft yes ## Original conky does not include this line## Use Xft (anti-aliased font and stuff)#xftfont Future:size=9#xftfont Liberation Mono:bold:size=9xftfont Fantasque Sans Mono:bold:size=9#xftfont Monofur:bold:size=10#xftfont DejaVu Sans Mono:bold:size=10#xftfont Fira Mono:bold:size=10xftalpha 1.0## --------- End Font Settings## --------- Color Settingsdraw_shades yesdefault_shade_color 000000draw_outline nodefault_outline_color 000000default_color 008080 #Blackcolor0 008080 #unknown - but darkcolor1 0DB3AA #light green in image #008080 #LightSlateGraycolor2 FFD700 #Goldcolor3 B0E0E6 #PowderBluecolor4 F4A460 #SandyBrowncolor5 DEB887 #BurlyWoodcolor6 00BFFF #DeepSkyBluecolor7 5F9EA0 #CadetBluecolor8 FFA500 #Orangecolor9 FF4500 #OrangeRed## ---------- End Color Settings## ---------- Begin Borders Sectiondraw_borders no## Stippled borders?stippled_borders 5## border marginsborder_inner_margin 0border_outer_margin 0## border widthborder_width 2## graph bordersdraw_graph_borders yes ## no## default_graph_size 15 40## ---------- End Borders Secton## ---------- Begin Miscellaneous Sectionbackground yesuse_spacer noneno_buffers yesimlib_cache_size 0double_buffer yestext_buffer_size 1280update_interval 1######### not supplied ################## — Lua Load — #lua_load ~/S11/parrot/parrot_rings.lualua_draw_hook_pre main_rings########################################TEXT${image /home/unklarer/S11/parrot/parrot.png -p 0,0 -s 247x621}${voffset 5}${color1}${goto 20}OS ${alignr 17}GNU/${sysname}${goto 16}Distro ${alignr 17}${pre_exec lsb_release -is | tr "[:upper:]" "[:lower:]"} ${pre_exec lsb_release -rs | tr "[:upper:]" "[:lower:]"}${goto 16}Name ${alignr 17}${pre_exec lsb_release -cs | tr "[:upper:]" "[:lower:]"}${goto 16}Knl ${alignr 17}${kernel}${goto 20}Env ${alignr 17}${pre_exec env | grep DESKTOP_SESSION= |cut -c 17-}${goto 60}${voffset 55}CPU ${hwmon 2 temp 2}° ${goto 160}${color2}GPU ${hwmon 0 temp 1}°${voffset -55}${color1} ${voffset 193}${goto 15}RAM ${alignc}${memmax}${goto 15}Used RAM ${alignc}${memperc}% - ${mem}${goto 15}Free RAM ${alignc}${memfree}${goto 15}Procs/Threads ${alignc}${processes} - ${threads}${voffset 68}${goto 15}${if_up wlan0}wlan0${else}\${if_up wlan1}wlan1${else}\${if_up eth0}eth0${else}\${if_up enp2s0}eth1${endif}${endif}${endif}${endif}\${goto 93}up${goto 162}dn${voffset 6}${goto 20}UP:${goto 50}${voffset -10}${if_up wlan0}${upspeedgraph wlan0 30,180 008080 aa0000 0 -t -l}${endif}${if_up wlan1}${upspeedgraph wlan1 30,180 008080 aa0000 0 -t -l}${endif}${if_up eth0}${upspeedgraph eth0 30,180 008080 aa0000 0 -t -l}${endif}${if_up enp2s0}${upspeedgraph enp2s0 30,180 008080 aa0000 0 -t -l}${endif}${voffset 14}${goto 20}DL:${goto 50}${voffset -10}${if_up wlan0}${downspeedgraph wlan0 30,180 008080 00aa00 0 -t -l}${endif}${if_up wlan1}${downspeedgraph wlan1 30,180 008080 00aa00 0 -t -l}${endif}${if_up eth0}${downspeedgraph eth0 30,180 008080 00aa00 0 -t -l}${endif}${if_up enp2s0}${downspeedgraph enp2s0 30,180 008080 00aa00 0 -t -l}${endif}${voffset 55}${goto 51}/root${goto 158}/home#${voffset 55}${goto 30}${font Fantasque Sans Mono:bold:size=12}${color 00a0a0}dmesg${font}#${goto 2}${color 30ff50}${execi 1 dmesg -t | tail -20 | tac}
# pkill -xf "conky -c ~/Conky/VO_Radiotray.conky" &# works perfect Sector11 - 2012 (?)# lua cover by google of @loutch https://forums.bunsenlabs.org/viewtopic.php?id=3282# unklar Januar 2017### Begin Window Settings ################################################### Create own window instead of using desktop (required in nautilus)own_window yes# 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 yesown_window_type normal own_window_transparent yesown_window_hints undecorated,below,skip_taskbar,skip_pager,sticky# own_window_colour #4d4d4down_window_class Radio Trayown_window_title Radio Tray### 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 overrideown_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 150minimum_size 400 0 ## width, height#maximum_width 210 ## width, usually a good idea to equal minimum widthgap_x 10 ### left &rightgap_y 40 ### up & down## Alignment# top_left, top_right, top_middle - tl, tm, tr# middle_left, middle_middle, middle_right - bl, bm, br# bottom_left, bottom_right, bottom_middle - ml, mm, mralignment tr#################################################### End Window Settings ###### Font Settings ########################################################### Use Xft (anti-aliased font and stuff)use_xft yesxftfont birdman:size=9#xftfont WenQuanYi Micro Hei Mono:bold:size=8# Alpha of Xft font. Must be a value at or between 1 and 0 ###xftalpha 1# Force UTF8? requires XFT ###override_utf8_locale yesdraw_shades no #### <<<<<<------------------To see it easier on light screens.#default_shade_color blackdraw_outline no #### <<<<<<---------------- Amplifies text if yesdefault_outline_color blackUPPERcase no###################################################### End Font Settings ###### Color Settings #########################################################default_shade_color graydefault_outline_color blackdefault_color DCDCDC #Gainsborocolor0 ffe595 #Teo Goldcolor1 778899 #LightSlateGreycolor2 FF8C00 #Darkorangecolor3 7FFF00 #Chartreusecolor4 FFA07A #LightSalmoncolor5 FFDEAD #NavajoWhitecolor6 00BFFF #DeepSkyBluecolor7 00FFFF #Cyan #48D1CC #MediumTurquoisecolor8 FFFF00 #Yellowcolor9 FF0000 #Red #A52A2A #DarkRed##################################################### End Color Settings ###### Borders Section ########################################################draw_borders no# Stippled borders?stippled_borders 0# border marginsborder_inner_margin 10border_outer_margin 0# border widthborder_width 0# graph bordersdraw_graph_borders no##################################################### 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 noneuse_spacer right# Default and Minimum size is 256 - needs more for single commands that# "call" a lot of text IE: bash scriptstext_buffer_size 256# Subtract (file system) buffers from used memory?no_buffers yes# change GiB to G and MiB to Mshort_units yes# Like it says, ot pads the decimals on % values# doesn't seem to work since v1.7.1pad_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############################################## 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 ~/Music/image.lua#lua_draw_hook fDrawImagelua_load ~/Lua/draw-bg.lua#lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.1######################################################## End LUA Settings ####digiThe 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 # in seconds#${execpi 15 /media/DATEN/francescoPC/Conky/Music/nochNeuer.sh}\#${image /tmp/radioswisspop.jpg -p 100,70 -s 60x60}\TEXT${lua conky_draw_bg 10 0 0 0 0 0x000000 0.1}\${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray getCurrentMetaData| fold -s -w80 > ~/Music/radiotray/artiste_titre.txt}${texeci 20 bash $HOME/Music/radiotray/pochette.sh}\${lua fDrawImage $HOME/Music/radiotray/pochette.png 14 18 68 60}${goto 90}${color}${if_match "${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray net.sourceforge.radiotray.getCurrentRadio}" == "not playing"}Radio?${else}${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray net.sourceforge.radiotray.getCurrentRadio}${goto 90}Artist & Song ${goto 90}${color B0E0E6}${execi 10 qdbus net.sourceforge.radiotray /net/sourceforge/radiotray getCurrentMetaData| fold -s -w50}${color}${endif}
require 'cairo'home = os.getenv ('HOME')--Fonction d'affichagefunction conky_fDrawImage(path,x,y,w,h,arc) path = string.gsub(path, "~", home) path = string.gsub(path, "$HOME", home) local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height) local function fDrawImage(path,x,y,w,h,arc) x=x+(w/2) y=y+(h/2) local img = cairo_image_surface_create_from_png(path) local w_img, h_img = cairo_image_surface_get_width (img), cairo_image_surface_get_height (img) local cr = cairo_create (cs) cairo_translate (cr, x, y) if arc then cairo_rotate (cr, arc) end cairo_scale (cr, w/w_img, h/h_img) cairo_set_source_surface (cr, img, -w_img/2, -h_img/2) cairo_paint (cr) cairo_destroy(cr) cairo_surface_destroy (img) end fDrawImage(path,x,y,w,h,arc) cairo_surface_destroy(cs) return ""end
#!bin/bash titre=$(head -1 ~/Music/radiotray/artiste_titre.txt)lienMiniature=$(wget -U'Googlebot-Image/1.0' -qO - "www.google.fr/search?q=$titre\&tbm=isch" | perl -pe 's!.*?<img .*?src="([^"]*)".*!$1!')wget -qO miniatureGoogleImage $lienMiniatureconvert ~/miniatureGoogleImage ~/Music/radiotray/pochette.png
--[[Background originally by londonali1010 (2009) ability to set any size for background mrpeachy 2011 ability to set variables for bg in conkyrc dk75 the change is that if you set width and/or height to 0 then it assumes the width and/or height of the conky windowso:Above and After TEXT (requires a composite manager or it blinks!) lua_load ~/wea_conky/draw_bg.lua TEXT ${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}OR Both above TEXT (no composite manager required - no blinking!) lua_load ~/wea_conky/draw_bg.lua lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.2 TEXTNote${lua conky_draw_bg 20 0 0 0 0 0x000000 0.2} See below: 1 2 3 4 5 6 7${lua conky_draw_bg corner_radius x_position y_position width height color alpha}covers the whole window and will change if you change the minimum_size setting1 = 20 corner_radius2 = 0 x_position l|r3 = 0 y_position u|d4 = 0 width5 = 0 height6 = 0x000000 color7 = 0.4 alpha######### calendar function ##################################################then to use it, you activate the calendar function BELOW TEXT like this${lua luacal {settings}}#${lua luacal {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gh=,gt=,gv=,sd=}}# x=x position top left# y=y position top left# tf=title font, eg "mono" must be in quotes# tfs=title font size# tc=title color# ta=title alpha# bf=body font, eg "mono" must be in quotes# bfs=body font size# bc=body color# ba=body alpha# hf=highlight font, eg "mono" must be in quotes# hfs=highlight font size# hc=highlight color# ha=highlight alpha# sp=spacer, eg " " or sp="0"... 0,1 or 2 spaces can help with positioning of non-monospaced fonts##### GAPS ###### gt=gap from title to body# gh=gap horizontal between columns# gv=gap vertical between rows# sd=start day, 0=Sun, 1=Mon# hstyle = heading style, 0=just days, 1=date insert# tdf=title date font, eg "mono" must be in quotes# tdfs=title date font size# tdc=title date color# tda=title date alpha# test line-- ${lua luacal {x=20,y=100,tf="Monofur",tfs=24,tc=0xFFDEAD,ta=1,bf="Monofur",bfs=24,bc=0xFFDEAD,ba=1,hf="Monofur",hfs=24,hc=0x00BFFF,ha=1,sp="0",gh=60,gt=26,gv=20,sd=0,hstyle=1,tdf="Monofur",tdfs=24,tdc=0x00BFFF,tda=1}}]]require 'cairo'local cs, cr = nilfunction rgb_to_r_g_b(colour,alpha)return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alphaendfunction conky_draw_bg(r,x,y,w,h,color,alpha)if conky_window == nil then return endif cs == nil then cairo_surface_destroy(cs) endif cr == nil then cairo_destroy(cr) endlocal cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)local cr = cairo_create(cs)w=wh=hif w=="0" then w=tonumber(conky_window.width) endif h=="0" then h=tonumber(conky_window.height) endcairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))--top left mid circlelocal xtl=x+rlocal ytl=y+r--top right mid circlelocal xtr=(x+r)+((w)-(2*r))local ytr=y+r--bottom right mid circlelocal xbr=(x+r)+((w)-(2*r))local ybr=(y+r)+((h)-(2*r))--bottom right mid circlelocal xbl=(x+r)local ybl=(y+r)+((h)-(2*r))-----------------------------cairo_move_to (cr,xtl,ytl-r)cairo_line_to (cr,xtr,ytr-r)cairo_arc(cr,xtr,ytr,r,((2*math.pi/4)*3),((2*math.pi/4)*4))cairo_line_to (cr,xbr+r,ybr)cairo_arc(cr,xbr,ybr,r,((2*math.pi/4)*4),((2*math.pi/4)*1))cairo_line_to (cr,xbl,ybl+r)cairo_arc(cr,xbl,ybl,r,((2*math.pi/4)*1),((2*math.pi/4)*2))cairo_line_to (cr,xtl-r,ytl)cairo_arc(cr,xtl,ytl,r,((2*math.pi/4)*2),((2*math.pi/4)*3))cairo_close_path(cr)cairo_fill (cr)------------------------------------------------------------cairo_surface_destroy(cs)cairo_destroy(cr)return ""end-- ###### calendar function ##################################################function conky_luacal(caltab) -- {x=,y=,tf="",tfs=,tc=,ta=,bf="",bfs=,bc=,ba=,hf="",hfs=,hc=,ha=,sp="",gt=,gh=,gv=,sd=,hstyle=,tdf=,tdfs=,tdc=,tda=}if conky_window == nil then return endlocal cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)local cr = cairo_create(cs)--############################################################################if caltab.x==nil thencaltab=loadstring("return" .. caltab)()endlocal cal_x=caltab.xlocal cal_y=caltab.ylocal tfont=caltab.tf or "mono"local tfontsize=caltab.tfs or 12local tc=caltab.tc or 0xfffffflocal ta=caltab.ta or 1local bfont=caltab.bf or "mono"local bfontsize=caltab.bfs or 12local bc=caltab.bc or 0xfffffflocal ba=caltab.ba or 1local hfont=caltab.hf or "mono"local hfontsize=caltab.hfs or 12local hc=caltab.hc or 0xff0000local ha=caltab.ha or 1local spacer=caltab.sp or " "local gaph=caltab.gh or 20local gapt=caltab.gt or 15local gapl=caltab.gv or 15local sday=caltab.sd or 0local hstyle=caltab.hstyle or 0--convert colors--local font=string.gsub(font,"_"," ")local tred,tgreen,tblue,talpha=rgb_to_r_g_b(tc,ta)--main body text colorlocal bred,bgreen,bblue,balpha=rgb_to_r_g_b(bc,ba)--highlight text colorlocal hred,hgreen,hblue,halpha=rgb_to_r_g_b(hc,ha)--############################################################################--calendar calcslocal year=os.date("%G")local today=tonumber(os.date("%d"))local t1 = os.time( { year=year,month=03,day=01,hour=00,min=0,sec=0} );local t2 = os.time( { year=year,month=02,day=01,hour=00,min=0,sec=0} );local feb=(os.difftime(t1,t2))/(24*60*60)local monthdays={ 31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }local day=tonumber(os.date("%w"))+1-sdaylocal day_num = todaylocal remainder=day_num % 7local start_day=day-(day_num % 7)if start_day<0 then start_day=7+start_day endlocal month=os.date("%m")local mdays=monthdays[tonumber(month)]local x=mdays+start_daylocal dnum={}local dnumh={}if mdays+start_day<36 thendlen=35plen=29elsedlen=42plen=36endfor i=1,dlen do if i<=start_day then dnum[i]=" " else dn=i-start_day if dn=="nil" then dn=0 end if dn<=9 then dn=(spacer .. dn) end if i>x then dn="" end dnum[i]=dn dnumh[i]=dn if dn==(spacer .. today) or dn==today then dnum[i]="" end if dn==(spacer .. today) or dn==today then dnumh[i]=dn place=i else dnumh[i]=" " end endend--forcairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);cairo_set_font_size (cr, tfontsize);cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)local extents=cairo_text_extents_t:create()tolua.takeownership(extents)if hstyle==0 then if tonumber(sday)==0 then dys={"SU","MO","TU","WE","TH","FR","SA"} else dys={"MO","TU","WE","TH","FR","SA","SU"} end --draw calendar titleselseif hstyle==1 then if tonumber(sday)==0 then dys={"SU","MO"," "," "," ","FR","SA"} cairo_text_extents(cr,"MO",extents) local s=extents.x_advance+gaph local f=gaph*5 local tdfont=caltab.tdf or "mono" local tdfontsize=caltab.tdfs or 12 local tdc=caltab.tdc or 0xffffff local tda=caltab.tda or 1 cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, tdfontsize); local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda) cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha) local insert=os.date("%b %y") cairo_text_extents(cr,insert,extents) local w=extents.x_advance cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y) cairo_show_text (cr,insert) cairo_stroke (cr) else dys={"MO","TU"," "," "," ","SA","SU"} cairo_text_extents(cr,"TU",extents) local s=extents.x_advance+gaph local f=gaph*5 local tdfont=caltab.tdf or "mono" local tdfontsize=caltab.tdfs or 12 local tdc=caltab.tdc or 0xffffff local tda=caltab.tda or 1 cairo_select_font_face (cr, tdfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size (cr, tdfontsize); local tdred,tdgreen,tdblue,tdalpha=rgb_to_r_g_b(tdc,tda) cairo_set_source_rgba (cr,tdred,tdgreen,tdblue,tdalpha) local insert=os.date("%b %y") cairo_text_extents(cr,insert,extents) local w=extents.x_advance cairo_move_to (cr, cal_x+((s+f)/2)-(w/2), cal_y) cairo_show_text (cr,insert) cairo_stroke (cr) endend--draw calendar titlesfor i=1,7 docairo_select_font_face (cr, tfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);cairo_set_font_size (cr, tfontsize);cairo_set_source_rgba (cr,tred,tgreen,tblue,talpha)cairo_move_to (cr, cal_x+(gaph*(i-1)), cal_y)cairo_show_text (cr, dys[i])cairo_stroke (cr)end--draw calendar bodycairo_select_font_face (cr, bfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);cairo_set_font_size (cr, bfontsize);cairo_set_source_rgba (cr,bred,bgreen,bblue,balpha)for i=1,plen,7 dolocal fn=i for i=fn,fn+6 do cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7))) cairo_show_text (cr, dnum[i]) cairo_stroke (cr) endend--highlightcairo_select_font_face (cr, hfont, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);cairo_set_font_size (cr, hfontsize);cairo_set_source_rgba (cr,hred,hgreen,hblue,halpha)for i=1,plen,7 dolocal fn=i for i=fn,fn+6 do cairo_move_to (cr, cal_x+(gaph*(i-fn)),cal_y+gapt+(gapl*((fn-1)/7))) cairo_show_text (cr, dnumh[i]) cairo_stroke (cr) endend--############################################################################caltab=nildlen=nilplen=nilcairo_destroy(cr)cairo_surface_destroy(cs)cr=nilreturn ""end-- end main function #########################################################