seduction
 Language:
Welcome, Guest. Please login or register.
Did you miss your activation email?
2017/09/20, 14:47:01


Help

Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: Desktop-Foto  (Read 41919 times)

0 Members and 1 Guest are viewing this topic.

Offline unklarer

  • User
  • Posts: 307
Re: Desktop-Foto
« Reply #165 on: 2017/04/27, 16:10:28 »
^piper, you're faster than the police allowed.  ;D

The files I wanted in the mageia forum. Unfortunately, however, this was hacked because of irresponsible thoughtlessness 3 weeks ago.

The original
Modification of Secto11

My conkyrc
Code: [Select]
# 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 Settings
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints skip_taskbar,skip_pager,undecorated,below
own_window_colour 000000
own_window_class Conky
own_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 300

gap_x 10 #l|r
gap_y 40 #u|d

minimum_size 248 650  #1020
maximum_width 248

alignment tl

## ---------- End Window Settings
## ---------- Font Settings

## Force UTF8? requires XFT
override_utf8_locale yes

use_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=9
xftfont Fantasque Sans Mono:bold:size=9
#xftfont Monofur:bold:size=10
#xftfont DejaVu Sans Mono:bold:size=10
#xftfont Fira Mono:bold:size=10
xftalpha 1.0

## --------- End Font Settings
## --------- Color Settings
draw_shades yes
default_shade_color 000000
draw_outline no
default_outline_color 000000

default_color 008080 #Black
color0 008080 #unknown - but dark
color1 0DB3AA #light green in image #008080 #LightSlateGray
color2 FFD700 #Gold
color3 B0E0E6 #PowderBlue
color4 F4A460 #SandyBrown
color5 DEB887 #BurlyWood
color6 00BFFF #DeepSkyBlue
color7 5F9EA0 #CadetBlue
color8 FFA500 #Orange
color9 FF4500 #OrangeRed
## ---------- End Color Settings
## ---------- Begin Borders Section
draw_borders no
## Stippled borders?
stippled_borders 5
## border margins
border_inner_margin 0
border_outer_margin 0
## border width
border_width 2
## graph borders
draw_graph_borders yes ## no
## default_graph_size 15 40
## ---------- End Borders Secton
## ---------- Begin Miscellaneous Section
background yes
use_spacer none
no_buffers yes
imlib_cache_size 0
double_buffer yes
text_buffer_size 1280

update_interval 1
######### not supplied #################
# — Lua Load — #

lua_load ~/S11/parrot/parrot_rings.lua
lua_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}

For questions, ask   ;)

Offline piper

  • Global Moderator
  • User
  • *****
  • Posts: 1.140
Re: Desktop-Foto
« Reply #166 on: 2017/04/28, 01:02:03 »
Ah, good oh Secto11 ;)

Thank you very much unklarer
debian sid  |  apt-get into it

Offline unklarer

  • User
  • Posts: 307
Re: Desktop-Foto
« Reply #167 on: 2017/04/28, 12:06:56 »
You are welcome.   :)

Offline jaegermeister

  • User
  • Posts: 175
Re: Desktop-Foto
« Reply #168 on: 2017/06/07, 10:14:28 »
unklarer, very nice stuff!

btw, what is that webradio app seen in the lower right corner of Lamborghini screenshot?
THX
---------------------------------------
SI VIS PACEM PARA BELLVM
---------------------------------------

Offline unklarer

  • User
  • Posts: 307
Re: Desktop-Foto
« Reply #169 on: 2017/06/07, 14:26:28 »
Hi jaegermeister,

that is radiotray in conky.   :)
To show the cover, @loutch helped me with his scripts very professionally.

If you want, I can even search for all files together ...   8)

Offline jaegermeister

  • User
  • Posts: 175
Re: Desktop-Foto
« Reply #170 on: 2017/06/08, 00:58:34 »
Well, the effect is astounding!
Radiotray never looked so good!


I would be curious about the know-how :)
---------------------------------------
SI VIS PACEM PARA BELLVM
---------------------------------------

Offline unklarer

  • User
  • Posts: 307
Re: Desktop-Foto
« Reply #171 on: 2017/06/08, 22:06:40 »
The know-how.  :)
Your'e will need the following files:

the tweaked conkyrc of @ Sector11
Code: [Select]
# 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 yes

own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager,sticky
# own_window_colour #4d4d4d
own_window_class Radio Tray
own_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 override
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 150

minimum_size 400 0 ## width, height
#maximum_width 210  ## width, usually a good idea to equal minimum width

gap_x 10 ### left &right
gap_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, mr

alignment tr

####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont 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 yes

draw_shades no #### <<<<<<------------------To see it easier on light screens.
#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 #Gainsboro
color0 ffe595 #Teo Gold
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan #48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red  #A52A2A #DarkRed
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 10
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_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 none
use_spacer right

# 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

##############################################  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 fDrawImage
lua_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}

the lua script image.lua of @mrpeachy
Code: [Select]
require 'cairo'
home = os.getenv ('HOME')

--Fonction d'affichage
function 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

the script from @loutch pochette.sh
Code: [Select]
#!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 $lienMiniature

convert ~/miniatureGoogleImage ~/Music/radiotray/pochette.png

convert from the package imagemagick

The principle:
- conky asks at sourceforge the artist and the title of the radio station set in Radiotray. These up to 80 characters are written to a .txt file.
- the brilliant script of loutch reads these characters and leaves the aunt Google
search for. The first hit/cover/image is placed in your $ HOME.
Since these are different image sizes, the script "instructs"
convert it to suit the Conky, which is the "end product"
to your desktop fetch.

If there are different covers, it can happen (first hit).

Is to be forgotten.

Have fun and pay attention to the PATH!  ;)

---------------------------------------------------------------------------------------------------------------

Das Know-how.
Du benötigst folgende Dateien:

die gezwickte conkyrc von @ Sector11
das lua script image.lua von @mrpeachy
das Script von @loutch pochette.sh

convert aus dem Paket imagemagick

Das Prinzip:
-conky fragt bei sourceforge den Künstler und den Titel des eingestellten Radiosender in Radiotray. Diese bis zu 80 Zeichen werden in eine .txt-Datei geschrieben.
- das brillante Skript von loutch liest diese Zeichen und lässt Tante Google
suchen. Der erste Treffer / Cover / Bild wird in deinem $ HOME platziert.
Da es sich um unterschiedliche Bildgrößen handelt, "beauftragt" das Skript
convert es für Conky passend zu machen, der das "Endprodukt" auf deinem Desktop holt.

Wenn es unterschiedliche Cover gibt, kann es dazu kommen (erster Treffer).
Ist zu verschmerzen.

Habe Spaß und beachte die PFADE!  ;)

Offline unklarer

  • User
  • Posts: 307
Re: Desktop-Foto
« Reply #172 on: 2017/06/08, 22:17:00 »
Sorry, since it is about conky 1.9, is for the round corners still the lua script
draw-bg.lua is required  ???
Code: [Select]
--[[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 window

so:

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
 TEXT

Note
${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 setting

1 = 20             corner_radius
2 = 0             x_position l|r
3 = 0             y_position u|d
4 = 0             width
5 = 0             height
6 = 0x000000      color
7 = 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 = nil
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
function conky_draw_bg(r,x,y,w,h,color,alpha)
if conky_window == nil then return end
if cs == nil then cairo_surface_destroy(cs) end
if cr == nil then cairo_destroy(cr) end
local 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=w
h=h
if w=="0" then w=tonumber(conky_window.width) end
if h=="0" then h=tonumber(conky_window.height) end
cairo_set_source_rgba (cr,rgb_to_r_g_b(color,alpha))
--top left mid circle
local xtl=x+r
local ytl=y+r
--top right mid circle
local xtr=(x+r)+((w)-(2*r))
local ytr=y+r
--bottom right mid circle
local xbr=(x+r)+((w)-(2*r))
local ybr=(y+r)+((h)-(2*r))
--bottom right mid circle
local 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 end
local 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 then
caltab=loadstring("return" .. caltab)()
end
local cal_x=caltab.x
local cal_y=caltab.y
local tfont=caltab.tf        or "mono"
local tfontsize=caltab.tfs    or 12
local tc=caltab.tc            or 0xffffff
local ta=caltab.ta            or 1
local bfont=caltab.bf        or "mono"
local bfontsize=caltab.bfs    or 12
local bc=caltab.bc            or 0xffffff
local ba=caltab.ba            or 1
local hfont=caltab.hf        or "mono"
local hfontsize=caltab.hfs    or 12
local hc=caltab.hc            or 0xff0000
local ha=caltab.ha            or 1
local spacer=caltab.sp        or " "
local gaph=caltab.gh        or 20
local gapt=caltab.gt        or 15
local gapl=caltab.gv        or 15
local sday=caltab.sd        or 0
local 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 color
local bred,bgreen,bblue,balpha=rgb_to_r_g_b(bc,ba)
--highlight text color
local hred,hgreen,hblue,halpha=rgb_to_r_g_b(hc,ha)
--############################################################################
--calendar calcs
local 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-sday
local day_num = today
local remainder=day_num % 7
local start_day=day-(day_num % 7)
if start_day<0 then start_day=7+start_day end
local month=os.date("%m")
local mdays=monthdays[tonumber(month)]
local x=mdays+start_day
local dnum={}
local dnumh={}
if mdays+start_day<36 then
dlen=35
plen=29
else
dlen=42
plen=36
end
for 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
    end
end--for
cairo_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 titles
elseif 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)
    end
end
--draw calendar titles
for i=1,7 do
cairo_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 body
cairo_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 do
local 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)
    end
end
--highlight
cairo_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 do
local 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)
    end
end
--############################################################################
caltab=nil
dlen=nil
plen=nil
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
return ""
end
-- end main function #########################################################

-----------------------------------------------------------------

Sorry, da es sich um conky1.9 handelt, wird für die runden Ecken noch das lua-Script draw-bg.lua benötigt.

Offline jaegermeister

  • User
  • Posts: 175
Re: Desktop-Foto
« Reply #173 on: 2017/06/10, 11:23:05 »
Pretty much fantastic job!
I will try it on a calm afternoon :)


But in case I would run conky just for that (I usually am into gkrellm for monitoring) would u advise a wrapper script like:


run conky
run radiotray
at radiotray kill then kill conky


or have you thought about an "autohide" feature when radiotray is in pause or not running?
THX
---------------------------------------
SI VIS PACEM PARA BELLVM
---------------------------------------

Offline unklarer

  • User
  • Posts: 307
Re: Desktop-Foto
« Reply #174 on: 2017/06/10, 14:08:25 »
No.
Conky is started with the autostart of the system.
Radiotray i start the menu manually.
Then use the icon in the groin.

Everyone to his taste.   ;)

Offline unklarer

  • User
  • Posts: 307
Re: Desktop-Foto
« Reply #175 on: 2017/07/01, 17:12:32 »


Leider ist es mir bei dieser schönen Distribution bisher nicht gelungen audacious mit der conky_V1.10 darzustellen.  :-\
Mit conky_V1.9 funktioniert das prima.

Offline unklarer

  • User
  • Posts: 307
Re: Desktop-Foto
« Reply #176 on: 2017/07/01, 17:20:14 »
Von der desperado kann ich mich auch nicht trennen.  :)
Heute nach dem DU, sie läuft immer noch perfekt (mit systemd).

Offline piper

  • Global Moderator
  • User
  • *****
  • Posts: 1.140
Re: Desktop-Foto
« Reply #177 on: 2017/07/01, 19:51:07 »
unklarer, as always, great job ! :)
debian sid  |  apt-get into it

Offline unklarer

  • User
  • Posts: 307
Re: Desktop-Foto
« Reply #178 on: 2017/07/04, 09:48:43 »
piper, as always a good word. Thanks for that!   :)

Offline lexruee

  • User
  • Posts: 5
Re: Desktop-Foto
« Reply #179 on: 2017/08/13, 22:34:56 »
Das ist mein erster Post als Siducer :-). Hier ist ein Screenshot von meinem GNOME 3 Desktop: http://imgur.com/a/sAm0u
« Last Edit: 2017/08/13, 22:51:36 by lexruee »