You are not logged in.
https://forums.bunsenlabs.org/viewtopic … 01#p100701
the clock
conkyrc
conky.config = {
-- main conkyrc by Boris Krinkel <olgmen>
-- olgmen2@gmail.com
-- --- параметры окна ---
-- эти строки необходимы для нормальной работы лучше не изменять
own_window = true,
-- для вывода фона раскомментировать следующую строку, установить цвет, в данный момент красный и в строке own_window_transparent прописать no
--own_window_colour ff0000
own_window_class = 'Conky',
own_window_transparent = true,
own_window_type = 'normal',--override
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',--sticky,
own_window_argb_visual = true,
--own_window_argb_value 150
-- следующие параметры можно изменять
-- минимальный размер
minimum_width = 200, minimum_height = 200,
-- минимальная ширина
--maximum_width 230
alignment = 'top_right',-- tl, tm, tr, bl, bm, br, ml, mr
-- расстояние между кромкой экрана и окном
-- по горизонтали
gap_x = 30,
-- по вертикали
gap_y = 80,
-- --- графика окна ---
-- если желаете выводить conky на другом фоне напишите yes
--background no
-- окантовка окна, бордюр
draw_borders = false,
-- если бордюр yes
-- длина штрихов бордюра, если 0, то бордюр выводится сплошной линией
stippled_borders = 1,
-- толщина линий бордюра
border_width = 1,
-- бордюр вокруг выводимых графиков
draw_graph_borders = false,
-- включить тень?
draw_shades = false,
-- окантовка вокруг текста и выводимых объектов
draw_outline = false,
-- Добавить пробел? Только для встраиваемых объектов
use_spacer = 'right',
-- --- цвет ---
-- основной цвет по умолчанию
default_color = '#c0c0c0',
-- цвет тени
default_shade_color = 'black',
-- цвет окантовки
default_outline_color = '#ffffff',
-- дополнительные
color0 = '#FFFF00',
color1 = 'white',
color2 = 'yellow',
color3 = 'red',
-- --- шрифты ---
-- Используется ли Xft?
use_xft = true,
-- Шриф Xft когда Xft доступен, здесь можно ввести название и размер любого шрифта
font = 'Ubuntu:size=9',
-- яркость шрифта при использовании шрифтов Xft
xftalpha = 1,
-- выводить весь текст прописными буквами
uppercase = false,
-- использовать кодировку UTF8? ПРИМЕЧАНИЕ: требуется Xft
override_utf8_locale = true,
-- --- следующие данные необходимы для работы
-- обновление в секундах не имеет смысла ставить больше 2
-- при выводе времени в секундах необходимо значение 1 и менее
update_interval = 1,
-- время работы программы до её выключения
-- установите 0 для работы программы без остановки
total_run_times = 0,
-- двойная буфферизация (требуется для flicker, может не работать)
double_buffer = true,
-- вычитать буферизацию файловой системы из используемой памяти?
no_buffers = true,
-- количество cpu
cpu_avg_samples = 2,
-- number of net samples to average
net_avg_samples = 2,
imlib_cache_size = 0,
short_units = true,
pad_percents = 2,
text_buffer_size = 2048,
imlib_cache_size = 0,
-- — Lua Load — #
lua_load = '~/.conky/olgmen/conky_clock.lua',
lua_draw_hook_pre = 'conky_clock',
};
conky.text = '';
conky_clock.lua
-- Пример написания скрипта часов
-- Так как при выводе часов используются команды на языке cairo
-- необходимо указать программе об этом
require 'cairo'
-- создаем функцию для вывода изображения часов
function conky_clock ()
-- необходимые данные для вывода часов
clock_settings = {
{
-- x = 150, -- координаты часов по горизонтали
-- y = 150, -- координаты часов по вертикали
radius = 100, -- радиус часов
color = 0x708090, -- цвет ffffff
alpha = 1, -- насыщенность цвета
font_size = 16,
bold = true,
}
}
-- проверяем, существует окно конки или нет, если нет, выходим из программы
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)
-- вызываем функцию вывода часов на экран
for i, v in pairs(clock_settings) do
cr = cairo_create (cs)
display_clock (v)
cairo_destroy (cr)
end
end
-- функция перекодировки цвета
function rgb_to_r_g_b(colour,alpha)
return ((colour / 0x10000) % 0x100) / 255., ((colour / 0x100) % 0x100) / 255., (colour % 0x100) / 255., alpha
end
-- функция рисования часов
function display_clock (t)
-- производим проверку вводимых данных и задаем значения по умолчанию
if t.x == nil then t.x = conky_window.width/2 end
if t.y == nil then t.y = conky_window.height/2 end
if t.radius == nil then t.radius = 75 end
if t.color == nil then t.color = 0xffffff end
if t.alpha == nil then t.alpha = 1 end
if t.color_sec == nil then t.color_sec = 0xff0000 end
if t.alpha_sec == nil then t.alpha_sec = 1 end
if t.font_name == nil then t.font_name = "Ubuntu" end
if t.font_size == nil then t.font_size = 12 end
if t.italic == nil then t.italic = false end
if t.oblique == nil then t.oblique = false end
if t.bold == nil then t.bold = false end
-- шрифт
local slant = CAIRO_FONT_SLANT_NORMAL
local weight =CAIRO_FONT_WEIGHT_NORMAL
if t.italic then slant = CAIRO_FONT_SLANT_ITALIC end
if t.bold then weight = CAIRO_FONT_WEIGHT_BOLD end
cairo_select_font_face(cr, t.font_name, slant, weight)
cairo_set_font_size(cr, t.font_size)
te=cairo_text_extents_t:create()
cairo_text_extents (cr,t.text,te)
-- начнем с вывода циферблата
-- сначала зададим цвет
cairo_set_source_rgba(cr, rgb_to_r_g_b(t.color, t.alpha))
-- и толщину линии
cairo_set_line_width(cr, 2)
-- рисуем окружность
cairo_arc (cr, t.x, t.y, t.radius, 0, 2*math.pi)
-- ----------------------------------------------------------------------------------------
-- добавляем часовые деления
-- сбрасываем счетчик делений на 0
local i = 0
-- задаем расстояние между делениями
local winkel = math.rad(30)
-- выводим 12 делений
for i= 0, 11, 1 do
cairo_move_to(cr, t.x - math.sin(winkel*i)*t.radius, t.y - math.cos(winkel*i)*t.radius)
-- длину делений берем равной 0.1 от длины радиуса
cairo_line_to(cr, t.x - math.sin(winkel*i)*(t.radius*0.85), t.y - math.cos(winkel*i)*(t.radius*0.85))
-- выводим изображение
cairo_stroke (cr)
end
-- -------------------------------------------------------------------------------------------
-- добавляем цифры
-- запоминаем данные
cairo_save (cr)
-- переносим значения координат
cairo_translate(cr, t.x, t.y)
-- сбрасываем координаты цифр
mx, my = 0, 0
-- сбрасываем счетчик делений на 0
local i = 0
-- задаем расстояние между цифрами
local winkel = math.rad(30)
-- необходимо вывести цифра начиная с 1 и заканчивая 12
for i = 1, 12, 1 do
-- расчитываем координаты цифр
mov_x = math.sin(winkel*i)*(t.radius*0.73)
mov_y = math.cos(winkel*i)*(t.radius*0.73)
-- расчитываем ширину и высоту цифр
te=cairo_text_extents_t:create()
cairo_text_extents (cr,i,te)
-- вносим поправку на половину ширины и половину высоты цифр
mx = -te.width/2
my = -te.height/2-te.y_bearing
-- задаем координаты цифр
cairo_move_to(cr, mx + mov_x, my - mov_y)
-- выводим цифры
cairo_show_text(cr, i)
end
-- восстанавливаем данные
cairo_restore (cr)
-- ------------------------------------------------------------------------------------------
-- добавляем минутные деления
-- сбрасываем счетчик делений на 0
local i = 0
-- задаем расстояние между делениями
local winkel = math.rad(6)
-- выводим 12 делений
for i=0, 59, 1 do
cairo_move_to(cr, t.x - math.sin(winkel * i) * t.radius, t.y - math.cos(winkel * i) * t.radius)
-- длину делений берем равной 0.1 от длины радиуса
cairo_line_to(cr, t.x - math.sin(winkel * i) * (t.radius * 0.9), t.y - math.cos(winkel * i) * (t.radius*0.9))
end
-- выводим изображение
cairo_stroke (cr)
-- ----------------------------------------------------------------------------------
-- для вывода стрелок необходимо забрать данные о времени из ОС
local hours = os.date("%I")
local mins = os.date("%M")
local secs = os.date("%S")
-- назначаем максимальные значения
secs_arc = (2*math.pi/60)*secs
mins_arc = (2*math.pi/60)*mins
hours_arc = (2*math.pi/12)*hours + mins_arc/12
-- рисуем часовую стрелку
xh = t.x + 0.65*t.radius*math.sin(hours_arc)
yh = t.y - 0.65*t.radius*math.cos(hours_arc)
cairo_move_to(cr, t.x, t.y)
cairo_line_to(cr, xh, yh)
cairo_stroke(cr)
-- рисуем минутную стрелку
xm = t.x + 0.8*t.radius*math.sin(mins_arc)
ym = t.y - 0.8*t.radius*math.cos(mins_arc)
cairo_move_to(cr, t.x, t.y)
cairo_line_to(cr, xm, ym)
cairo_stroke(cr)
-- рисуем секундную стрелку
-- зададём цвет секундной стрелки
cairo_set_source_rgba(cr, rgb_to_r_g_b(t.color_sec, t.alpha_sec))
xs = t.x + 0.9*t.radius*math.sin(secs_arc)
ys = t.y - 0.9*t.radius*math.cos(secs_arc)
cairo_move_to(cr, t.x, t.y)
cairo_line_to(cr,xs,ys)
cairo_stroke (cr)
end
the conky with the accuweather
conkyrc
-- pkill -xf "conky -c /home/unklar/.conky/rumit/rumit_conky10" &
-- @unklar 2020-04-01
conky.config = {
background = true,
update_interval = 1,
cpu_avg_samples = 2,
net_avg_samples = 2,
temperature_unit = 'celsius',
double_buffer = true,
no_buffers = true,
text_buffer_size = 2048,
gap_x = 10,
gap_y = 100,
minimum_width = 240, minimum_height = 650,
maximum_width = 240,
own_window = true,
own_window_type = 'normal',
own_window_transparent = true,
own_window_hints = 'undecorated,skip_taskbar,skip_pager,below',--sticky,
border_inner_margin = 0,
border_outer_margin = 0,
alignment = 'bottom_right',--tl
draw_shades = false,
-- default_shade_color = '000000',
draw_outline = false,
-- default_outline_color = '000000',
draw_borders = false,
draw_graph_borders = true, --false,
override_utf8_locale = true,
use_xft = true,
font = 'CaviarDreams:size=8',
xftalpha = 0.5,
uppercase = false,
default_color = 'ffffff',
color1 = 'ed2323',
--- LUA ---
-- lua_load = '~/.conky/rumit/scripts/clock_rings.lua',
-- lua_draw_hook_pre = 'clock_rings',
-- lua_load = '~/.conky/rumit/scripts/lua/conky_white_big.lua',
-- lua_draw_hook_post = 'main',
lua_load = '~/.conky/rumit/scripts/draw_bg.lua',
lua_draw_hook_pre = 'draw_bg 15 0 0 0 0 0x000000 0.55',
--${alignc}updates ${if_match ${execi 600 aptitude search "~U" | wc -l | tail}==0}${execi 600 aptitude search "~U" | wc -l | tail}${color}${else}${color red}${blink ${execi 600 aptitude search "~U" | wc -l | tail}${color} updates}${color}${endif}
};
conky.text = [[
${texeci 500 bash $HOME/Accuweather_conky_script/accuweather -f}
${voffset -15}${goto 20}${color6}${font conkyweather:size=40}${texeci 600 sed -n '22p' $HOME/Accuweather_conky_script/curr_cond}${font monofur:size=25}${goto 150}${texeci 600 sed -n '2p' $HOME/Accuweather_conky_script/curr_cond}°
${voffset -13}${goto 16}${color5}${font monofur:size=9}CURRENTLY: ${color6}${alignc}${texeci 600 sed -n '4p' $HOME/Accuweather_conky_script/curr_cond}
${goto 16}${color5}WIND: ${color6}${alignc}${texeci 600 sed -n '5p' $HOME/Accuweather_conky_script/curr_cond} ${texeci 600 sed -n '6p' $HOME/Accuweather_conky_script/curr_cond}${goto 170}${voffset -10}${font ConkyWindNESW:size=30}${texeci 600 sed -n '27p' $HOME/Accuweather_conky_script/curr_cond}
${voffset -33}${goto 16}${color5}${font monofur:size=9}PRESSURE: ${color6}${alignc}${texeci 600 sed -n '8p' $HOME/Accuweather_conky_script/curr_cond}
${voffset 7}${goto 25}${texeci 600 sed -n '11p' $HOME/Accuweather_conky_script/daily_forecast}${goto 100}${texeci 600 sed -n '18p' $HOME/Accuweather_conky_script/daily_forecast}${goto 170}${texeci 600 sed -n '25p' $HOME/Accuweather_conky_script/daily_forecast}
${goto 30}${font conkyweather:size=20}${texeci 600 sed -n '107p' $HOME/Accuweather_conky_script/daily_forecast}${goto 100}${texeci 600 sed -n '108p' $HOME/Accuweather_conky_script/daily_forecast}${goto 170}${texeci 600 sed -n '109p' $HOME/Accuweather_conky_script/daily_forecast}
${voffset -15}${goto 45}${font monofur:size=9}${texeci 600 sed -n '12p' $HOME/Accuweather_conky_script/daily_forecast}${goto 120}${texeci 600 sed -n '19p' $HOME/Accuweather_conky_script/daily_forecast}${goto 190}${texeci 600 sed -n '26p' $HOME/Accuweather_conky_script/daily_forecast}
${goto 20}${color5}${font monofur:size=10}${texeci 600 sed -n '8p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z|cut -c1-3}${goto 100}${color6}${texeci 600 sed -n '15p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z|cut -c1-3}${goto 180}${texeci 600 sed -n '22p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z|cut -c1-3}
${color1}${swapbar 0,210}${color}
${font Fira Mono:bold:size=8}
${goto 16}Users logon: ${alignr 15}${user_names}
${goto 16}Boot: ${alignr 15}${execi 86400 who -b | cut -c23-}
${goto 16}Ram: ${alignr 15}${mem} | ${memmax}
${goto 16}System: ${alignr 15}${cpu cpu1} | ${cpu cpu2} | ${cpu cpu3} | ${cpu cpu4}
${goto 16}Radeon: ${alignr 15}${hwmon 2 temp 1}° | HDD ${execi 600 /usr/sbin/hddtemp -n /dev/sdb}°
${goto 16}Load: ${alignr 15}${loadavg}
${voffset -8}
${alignc} ${execi 86400 cat `ls -atr /etc/*-release | tail -1` | grep "PRETTY_NAME" | cut -d= -f2}
${alignc} ${kernel} ${machine}
${voffset -8}
${alignc}speed ↓ ${downspeedf enp2s0}
${alignc}speed ↑ ${upspeedf enp2s0}${font monofur:size=9}${color}
${voffset -8}
${goto 10} Exchange rate: ${alignr 15}£ ${execi 1200 curl gbp.rate.sx/1eur?TFq -s | cut -c1-7} € ${execi 1200 curl eur.rate.sx/1gbp?TFq -s | cut -c1-7}
${alignc}${font monofur:size=10}S H O R T C U T K E Y S
${color1}${swapbar 0,210}${color}
${goto 16}Alt + F2${alignr 15}Run Dialog
${goto 16}Alt + F3${alignr 15}Alt Menu
${goto 16}Super${alignr 15}Main Menu
${goto 16}Super + Tab${alignr 15}Client Menu
${goto 16}Super + t${alignr 15}Terminal
${goto 16}Super + w${alignr 15}Web Browser
${goto 16}Super + f${alignr 15}File Manager
${goto 16}Super + e${alignr 15}Editor
${goto 16}Super + m${alignr 15}Media Player
${goto 16}Super + v${alignr 15}Volume Control
${goto 16}Super + h${alignr 15}Task Manager
${goto 16}Super + l${alignr 15}Lock Screen
${goto 16}Super + x${alignr 15}Logout
${goto 16}PrtSc${alignr 15}Screenshot${font}
]];
draw_bg.lua
--[[
Background by londonali1010 (2009)
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.
To call this script in Conky, use (assuming you have saved this script to ~/scripts/):
lua_load ~/scripts/draw_bg.lua
lua_draw_hook_pre draw_bg
Changelog:
+ v1.0 -- Original release (07.10.2009)
]]
-- Change these settings to affect your background.
-- "corner_r" is the radius, in pixels, of the rounded corners. If you don't want rounded corners, use 0.
corner_r=15
-- Set the colour and transparency (alpha) of your background.
bg_colour=0x000000
bg_alpha=0.15
require 'cairo'
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()
if conky_window==nil then return end
local w=conky_window.width
local h=conky_window.height
local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, w, h)
cr=cairo_create(cs)
cairo_move_to(cr,corner_r,0)
cairo_line_to(cr,w-corner_r,0)
cairo_curve_to(cr,w,0,w,0,w,corner_r)
cairo_line_to(cr,w,h-corner_r)
cairo_curve_to(cr,w,h,w,h,w-corner_r,h)
cairo_line_to(cr,corner_r,h)
cairo_curve_to(cr,0,h,0,h,0,h-corner_r)
cairo_line_to(cr,0,corner_r)
cairo_curve_to(cr,0,0,0,0,corner_r,0)
cairo_close_path(cr)
cairo_set_source_rgba(cr,rgb_to_r_g_b(bg_colour,bg_alpha))
cairo_fill(cr)
end
Offline
Hello everyone , I am new here , this is my conky work :
Last edited by ivo-a22 (2020-05-16 22:35:12)
Offline
Hello everyone , I am new here , this is my conky work :
Very nice!
could you share the conky config and script files please?
Online
unklar wrote:Conky adapted to Lithium
2020-01-06-14-09-11_scrot.th.pngHappily used the conky,conf code that unklar provided ^
Changed it to my liking into a semi-transparent greyscale version.
https://thumbs2.imgbox.com/2b/54/ks6vUHhK_t.png
Would you happen to still have this? Particularly, the conky script at the botton on the left, looks dope mate.
Offline
Would you happen to still have this? Particularly, the conky script at the botton on the left, looks dope mate.
Here's the config for 'GiantTime' conky:
----------------
-- Giant-time --
----------------
conky.config = {
update_interval = 1,
total_run_times = 0,
net_avg_samples = 1,
cpu_avg_samples = 1,
imlib_cache_size = 0,
double_buffer = true,
no_buffers = true,
own_window = true,
own_window_type = 'desktop',
own_window_argb_visual = true,
own_window_argb_value = 0,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
own_window_class = 'Conky',
own_window_title = 'ConkyGiantTime',
border_inner_margin = 5,
border_width = 10,
use_xft = true,
font = 'candara:size=12',
override_utf8_locale = true,
text_buffer_size = 2048,
uppercase = false,
xftalpha = 0.9,
draw_shades = false,
short_units = true,
text_buffer_size = 800,
-- use_spacer = 'right',
alignment = 'bottom_left',
gap_x = 120,
gap_y = 80,
minimum_width = 300,
minimum_height = 0,
-- maximum_width = 360,
-- color1 = 'FFFFFF', -- white
color1 = 'BDB5A1', -- very lightgrey
-- color1 = '808080', -- lightgrey
-- color1 = '606060', -- grey
-- color1 = '404040', -- darkgrey
-- color1 = '202020', -- darkest grey
-- color1 = '101010', -- blackish
-- color1 = '000000', -- black
-- color1 = 'CDB17E', -- pale yellow
-- color2 = 'FFFFFF', -- white
-- color2 = 'BDB5A1', -- very lightgrey
-- color2 = '808080', -- lightgrey
-- color2 = '606060', -- grey
color2 = '404040', -- darkgrey
-- color2 = '202020', -- darkest grey
-- color2 = '101010', -- blackish
-- color2 = '000000', -- black
-- color2 = 'B13900', -- orange
-- color2 = 'AC1E1A', -- darkreddish
-- color2 = '2B3446', -- '045C60', -- '5A8A8A', -- darkblue
-- color2 = '6CA590', -- lightblue
-- color2 = 'F3A600', -- yellow
-- color2 = '3F2147', -- purple
-- color2 = '5294E2', -- '1F6F8A', -- blue
-- color3 = 'FFFFFF', -- white
-- color3 = 'BDB5A1', -- very lightgrey
-- color3 = '808080', -- lightgrey
-- color3 = '606060', -- grey
-- color3 = '404040', -- darkgrey
color3 = '202020', -- darkest grey
-- color3 = '101010', -- blackish
-- color3 = '000000', -- black
-- color3 = 'B13900', -- orange
-- color3 = 'AC1E1A', -- darkreddish
-- color3 = '2B3446', -- '045C60', -- '5A8A8A', -- darkblue
-- color3 = '6CA590', -- lightblue
-- color3 = 'F3A600', -- yellow
-- color3 = '3F2147', -- purple
-- color3 = '1F6F8A', -- blue
};
conky.text = [[
### Hour
${voffset -30}${font candara:size=194}${color1}${time %H}
### Minute
${voffset -150}\
${alignc}${offset 24}${color2}${time %M}
### Day & Date
${voffset -250}\
${font candara:size=20}${voffset -4}${color1}${time %A}
${time %d %B %G}${font}
### Audacious (if running)
${voffset 20}\
${if_running audacious}${color3}Now ${exec audtool --playback-status}: \
${alignr}${color1}${exec audtool --current-song-output-length} / ${exec audtool --current-song-length}
${voffset 4}"${exec audtool --current-song-tuple-data title}" \
${alignr}[${exec audtool --current-song-tuple-data artist}]${endif}${voffset -100}
]];
Online
ceeslans wrote:
A header saying "Click to proceed to image" or some such. Doesn't work without javascript of course.
The page source gave me a direct image link:
https://images2.imgbox.com/2b/54/ks6vUHhK_o.png
Nice conky.
Offline
bry2k200 wrote:Would you happen to still have this? Particularly, the conky script at the botton on the left, looks dope mate.
Here's the config for 'GiantTime' conky:
---------------- -- Giant-time -- ---------------- conky.config = { update_interval = 1, total_run_times = 0, net_avg_samples = 1, cpu_avg_samples = 1, imlib_cache_size = 0, double_buffer = true, no_buffers = true, own_window = true, own_window_type = 'desktop', own_window_argb_visual = true, own_window_argb_value = 0, own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager', own_window_class = 'Conky', own_window_title = 'ConkyGiantTime', border_inner_margin = 5, border_width = 10, use_xft = true, font = 'candara:size=12', override_utf8_locale = true, text_buffer_size = 2048, uppercase = false, xftalpha = 0.9, draw_shades = false, short_units = true, text_buffer_size = 800, -- use_spacer = 'right', alignment = 'bottom_left', gap_x = 120, gap_y = 80, minimum_width = 300, minimum_height = 0, -- maximum_width = 360, -- color1 = 'FFFFFF', -- white color1 = 'BDB5A1', -- very lightgrey -- color1 = '808080', -- lightgrey -- color1 = '606060', -- grey -- color1 = '404040', -- darkgrey -- color1 = '202020', -- darkest grey -- color1 = '101010', -- blackish -- color1 = '000000', -- black -- color1 = 'CDB17E', -- pale yellow -- color2 = 'FFFFFF', -- white -- color2 = 'BDB5A1', -- very lightgrey -- color2 = '808080', -- lightgrey -- color2 = '606060', -- grey color2 = '404040', -- darkgrey -- color2 = '202020', -- darkest grey -- color2 = '101010', -- blackish -- color2 = '000000', -- black -- color2 = 'B13900', -- orange -- color2 = 'AC1E1A', -- darkreddish -- color2 = '2B3446', -- '045C60', -- '5A8A8A', -- darkblue -- color2 = '6CA590', -- lightblue -- color2 = 'F3A600', -- yellow -- color2 = '3F2147', -- purple -- color2 = '5294E2', -- '1F6F8A', -- blue -- color3 = 'FFFFFF', -- white -- color3 = 'BDB5A1', -- very lightgrey -- color3 = '808080', -- lightgrey -- color3 = '606060', -- grey -- color3 = '404040', -- darkgrey color3 = '202020', -- darkest grey -- color3 = '101010', -- blackish -- color3 = '000000', -- black -- color3 = 'B13900', -- orange -- color3 = 'AC1E1A', -- darkreddish -- color3 = '2B3446', -- '045C60', -- '5A8A8A', -- darkblue -- color3 = '6CA590', -- lightblue -- color3 = 'F3A600', -- yellow -- color3 = '3F2147', -- purple -- color3 = '1F6F8A', -- blue }; conky.text = [[ ### Hour ${voffset -30}${font candara:size=194}${color1}${time %H} ### Minute ${voffset -150}\ ${alignc}${offset 24}${color2}${time %M} ### Day & Date ${voffset -250}\ ${font candara:size=20}${voffset -4}${color1}${time %A} ${time %d %B %G}${font} ### Audacious (if running) ${voffset 20}\ ${if_running audacious}${color3}Now ${exec audtool --playback-status}: \ ${alignr}${color1}${exec audtool --current-song-output-length} / ${exec audtool --current-song-length} ${voffset 4}"${exec audtool --current-song-tuple-data title}" \ ${alignr}[${exec audtool --current-song-tuple-data artist}]${endif}${voffset -100} ]];
Thanks a bunch!
Offline
Hello guys
sorry friends to put this back on the table but I miss my radiotray-ng script too much.
If any of you can look into it so that it will work again.
here the script
#!/bin/bash
#créé par loutch
#2018-12-27 modifier par TeoBigusGeekus et loutch pour radiotray-ng et conky 1.10
qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | grep artist |sed 's/^.*" \: "//' |sed 's/",.*$//' > artiste_titre.txt
qdbus com.github.radiotray_ng /com/github/radiotray_ng com.github.radiotray_ng.get_player_state | grep title |sed 's/^.*" \: "//' |sed 's/",.*$//' | cut -c1-11 >> artiste_titre.txt
titre=$(cat artiste_titre.txt)
lynx --source -useragent="Googlebot-Image/1.0" "www.google.fr/search?q=$titre\&tbm=isch" | perl -pe 's!.*?<img .*?src="([^"]*)".*!$1!' > lienMiniaturefile
sed -i 's/^.* http\:/http\:/' lienMiniaturefile
sed -i '/gstatic/!d' lienMiniaturefile
lienMiniature=$(cat lienMiniaturefile)
lynx -dump "$lienMiniature" > miniatureGoogleImage
convert miniatureGoogleImage pochette.png
many tanks
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
Go through the commands one by one and see if they still work:
- does artiste_titre.txt contain the text it should?
- does lynx finmd what it should find?
- etc.
Offline
Hello ohonot
does artiste_titre.txt contain the text it should?
Yes artist & title
does lynx finmd what it should find?
I think no because lienMiniaturefile is empty
edit
i change google to bing
lynx --source -useragent="Binglebot-Image/1.0" "www.bing.fr/search?q=$titre\&tbm=isch" | perl -pe 's!.*?<img .*?src="([^"]*)".*!$1!' > lienMiniaturefile
& i have this in lienMIniaturefile
0;ClTrCo={furl:!0};var ctcc=0,clc=_w.ClTrCo||{};_w.si_ct=function(n,t,i,r){var u,e,f,o,s,h,c;if(clc.SharedClickSuppressed)return!0;u="getAttribute";try{for(;n!==document.body;n=n.parentNode){if(!n||n===document||n[u]("data-noct"))break;if(e=(n.tagName==="A"||n[u]("data-clicks"))&&(n[u]("h")||n[u]("data-h"))||n[u]("_ct"),e){f=n[u]("_ctf");o=-1;i&&(i.type==="keydown"?o=-2:i.button!=null&&(o=i.button));f&&_w[f]||(f="si_T");f==="si_T"&&(s=encodeURIComponent(n[u]("href")),clc.furl&&!n[u]("data-private")?e+="&url="+s:clc.mfurl&&(e+="&abc="+s));r&&(e+="&source="+r);h="";clc.mc&&(h="&c="+ctcc++);c="&"+e+h;_w.si_sbwu(c)||_w[f]&&_w[f](c,n,i,o);break}if(t)break}}catch(l){_w.SharedLogHelper?SharedLogHelper.LogWarning("clickEX",null,l):(new Image).src=_G.lsUrl+'&Type=Event.ClientInst&DATA=[{"T":"CI.Warning","FID":"CI","Name":"JSWarning","Text":'+l.message+"}]"}return!0};_w.si_sbwu||(_w.si_sbwu=function(){return!1}),function(){_w._G&&(_G.si_ct_e="click")}();var wlc_d = 1500, wlc_t =63726941523;;var perf;(function(n){function f(n){return i.hasOwnProperty(n)?i[n]:n}function e(n){var t="S";return n==0?t="P":n==2&&(t="M"),t}function o(n){for(var c,i=[],t={},r,l=0;l<n.length;l++){var a=n[l],o=a.v,s=a.t,h=a.k;s===0&&(h=f(h),o=o.toString(36));s===3?i.push(h+":"+o):(r=t[s]=t[s]||[],r.push(h+":"+o))}for(c in t)t.hasOwnProperty(c)&&(r=t[c],i.push(e(+c)+':"'+r.join(",")+'"'));return i.push(u),i}for(var r=["redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","secureConnectionStart","connectEnd","requestStart","responseStart","responseEnd","domLoading","domInteractive","domContentLoadedEventStart","domContentLoadedEventEnd","domComplete","loadEventStart","loadEventEnd","unloadEventStart","unloadEventEnd","firstChunkEnd","secondChunkStart","htmlEnd","pageEnd","msFirstPaint"],u="v:1.1",i={},t=0;t<r.length;t++)i[r[t]]=t;n.compress=o})(perf||(perf={}));window.perf=window.perf||{},function(n){n.log=function(t,i){var f=n.compress(t),r;f.push('T:"CI.Perf",FID:"CI",Name:"PerfV2"');var e="/fd/ls/lsp.aspx?",o="sendBeacon",h="<E><T>Event.ClientInst<\/T><IG>"+_G.IG+"<\/IG><TS>"+i+"<\/TS><D><![CDATA[{"+f.join(",")+"}]\]><\/D><\/E>",s="<ClientInstRequest><Events>"+h+"<\/Events><STS>"+i+"<\/STS><\/ClientInstRequest>",u=!_w.navigator||!navigator[o];if(!u)try{navigator[o](e,s)}catch(c){u=!0}u&&(r=sj_gx(),r.open("POST",e,!0),r.setRequestHeader("Content-Type","text/xml"),r.send(s))}}(window.perf);var perf;(function(n){function a(){return c(Math.random()*1e4)}function o(){return y?c(f.now())+l:+new Date}function v(n,r,f){t.length===0&&i&&sb_st(u,1e3);t.push({k:n,v:r,t:f})}function p(n){return i||(r=n),!i}function w(n,t){t||(t=o());v(n,t,0)}function b(n,t){v(n,t,1)}function u(){var u,f;if(t.length){for(u=0;u<t.length;u++)f=t[u],f.t===0&&(f.v-=r);t.push({k:"id",v:e,t:3});n.log(t,o());t=[];i=!0}}function k(){r=o();e=a();i=!1;sj_evt.bind("onP1",u)}var s="performance",h=!!_w[s],f=_w[s],y=h&&!!f.now,c=Math.round,t=[],i=!1,l,r,e;h?l=r=f.timing.navigationStart:r=_w.si_ST?_w.si_ST:+new Date;e=a();n.setStartTime=p;n.mark=w;n.record=b;n.flush=u;n.reset=k;sj_be(window,"load",u,!1);sj_be(window,"beforeunload",u,!1)})(perf||(perf={}));_w.si_PP=function(n,t,i){var r,o,l,h,e,c;if(!_G.PPS){for(o=["FC","BC","SE","TC","H","BP",null];r=o.shift();)o.push('"'+r+'":'+(_G[r+"T"]?_G[r+"T"]-_G.ST:-1));var u=_w.perf,s="navigation",r,f=i||_w.performance&&_w.performance.timing;if(f&&u){if(l=f.navigationStart,u.setStartTime(l),l>=0)for(r in f)h=f[r],typeof h=="number"&&h>0&&r!=="navigationStart"&&r!==s&&u.mark(r,h);u.record("nav",s in f?f[s]:performance[s].type)}e="connection";c="";_w.navigator&&navigator[e]&&(c=',"net":"'+navigator[e].type+'"',navigator[e].downlinkMax&&(c+=',"dlMax":"'+navigator[e].downlinkMax+'"'));_G.PPImg=new Image;_G.PPImg.src=_G.lsUrl+'&Type=Event.CPT&DATA={"pp":{"S":"'+(t||"L")+'",'+o.join(",")+',"CT":'+(n-_G.ST)+',"IL":'+_d.images.length+"}"+(_G.C1?","+_G.C1:"")+c+"}"+(_G.P?"&P="+_G.P:"")+(_G.DA?"&DA="+_G.DA:"")+(_G.MN?"&MN="+_G.MN:"");_G.PPS=1;sb_st(function(){u&&u.flush();sj_evt.fire("onPP");sj_evt.fire(_w.p1)},1)}};_w.onbeforeunload=function(){si_PP(new Date,"A")};sj_evt.bind("ajax.requestSent",function(){window.perf&&perf.reset()});(function(n){var i,r,t;if(document.querySelector){i=[];r="ad";function u(){var w=sb_gt(),c=document.documentElement,e=document.body,u=-1,r=-1,l=c.clientHeight,a=["#b_results ."+_G.adc,".sb_adsWv2",".ads"],n,o,s,f,v,t;if(e){n=0;o=document.querySelector("#b_pole .b_adSlug");o&&(s=document.querySelector("#b_pole"),n=s.offsetHeight,r=s.offsetTop);var y=document.querySelector("#b_results #productAdCarousel"),h=document.querySelector("#b_results .pa_b_supertop"),p=document.querySelector("#b_results .bn_wide");for(h?(r=h.offsetTop,n=h.offsetHeight):p?n+=p.offsetHeight:y&&(n+=y.offsetHeight),f=0;f<a.length;f++)if(v=a[f],t=document.querySelector(v),t&&t.className.indexOf("b_adBottom")==-1&&t.offsetTop<l){u=t.offsetHeight+n;r===-1&&(r=t.offsetTop);break}o&&u==-1&&(u=n);i=[r,u,c.clientWidth,l,e.offsetWidth,e.offsetHeight,sb_gt()-w]}}n?(t=n.onbeforefire,n.onbeforefire=function(){t&&t();u();n.mark(r,i)}):(t=si_PP,si_PP=function(){u();var n='"'+r+'":['+i.join()+"]";_G.C1=_G.C1?_G.C1+","+n:n;t.apply(null,[].slice.apply(arguments))})}})(_w.pp);var sj_log=function(n,t,i){var r=new RegExp('"',"g");(new Image).src=_G.lsUrl+'&Type=Event.ClientInst&DATA=[{"T":"'+n+'","FID":"CI","Name":"'+t+'","Text":"'+escape(i.replace(r,""))+'"}]'};_w.AM=["live.com","virtualearth.net","windows.net","onenote","hexun.com","dict.bing.com.cn","msn.com","variflight.com","bing.net","msftoffers.com","chinacloudapp.cn","cbsnews.com","swx.cdn.skype.com","swc.cdn.skype.com","latest-swx.cdn.skype.com","a.config.skype.com","b.config.skype.com","platform.bing.com","microsofttranslator.com","bing.com","facebook.net",".delve.office.com",".uservoice.com","platform.twitter.com","cdn.syndication.twimg.com","spoprod-a.akamaihd.net","bingstatic.com","yahoo.co.jp","youtube.com","ytimg.com","rafd.bing.com","rafd.staging-bing-int.com","s.cn.bing.net"];_w.APD=[".delve.office.com",".uservoice.com","a.config.skype.com","abcnews.go.com","amazon.com","apps.powerapps.com","app.powerbi.com","app.powerbi.cn","app.powerbi.de","app.powerbigov.us","b.config.skype.com","bfb","bfb-int","bing.com","bing.net","bing-int.com","bingsandbox.com","bingweathermap.azureedge.net","bloomberg.com","cbsnews.com","cdn.syndication.twimg.com","channel9.msdn.com","chinacloudapp.cn","cnn.com","covid19healthbot.cdc.gov","covid19healthbot-dev.cdc.gov","ctmbing.azurefd.net","dailymotion.com","dict.bing.com.cn","downvids.com","downvids.net","edition.cnn.com","embed.vevo.com","euronews.com","facebook.com","fave.api.cnn.io","hexun.com","huffingtonpost.com","idsync.rlcdn.com","ign.com","imdb.com","latest-swx.cdn.skype.com","live.com","login.live-int.com","mashable.com","microsoft.com","microsoftonline.com","microsofttranslator.com","msecnd.net","msftoffers.com","msit.powerbi.com","msn.com","mtv.com","onenote","photosynth.net","platform.bing.com","platform.twitter.com","powerbi-df.analysis-df.windows.net","rafd.bing.com","rafd.staging-bing-int.com","rottentomatoes.com","s.cn.bing.net","skype.com","spoprod-a.akamaihd.net","substrate.office.com","swc.cdn.skype.com","swx.cdn.skype.com","variflight.com","video.disney.com","videoplayercdn.osi.office.net","vimeo.com","virtualearth.net","web.powerapps.com","widgets.ign.com","windows.net","wsj.com","yahoo.co.jp","youtube.com","ytimg.com","zdnet.com","chrome-extension://haldlgldplgnggkjaafhelgiaglafanh","player.twitch.tv","mixer.com"];_w.APC=["bm_","fb_","panelWrapper","df_topAlAs","df_playBut","df_vidTime","na_cai","ckt_","Light","Dark","taskbar","ssSIV","square_","tall_","item","sw_","sb_","sml","ftrd","sa_","id_","sc_","flt_","fc_","cca","tab-","emb","ctx","dc_","cipa","dict","btm","wtr","wpc","fin","sp-","carousel","vp_","vid","nav_","vt","va_","avc","cic","sports","lc_","bing","dmap_","pvc_","ans_","mcd","composite","mt_","irp","iap","tv","aggtv","irhc","vrh","det","tit","sub","col","card","hlsel","hlblk","ovl","ctpt","bubble","memodal","meoverlay","c_","spl-","microsoft","skp","saa","unlockButton","overlay","MapPushpinBase","pa_","skype_","ftrSbR","quizContainer","alrt_","st_","expan","word","rpt_","o_","e_","searchbar","row","Traffic","tl","gray","bep","wk_","crs_","w10","personal","fs3_","ezp_","hp","post","mc_","fb","lgb","el_","perf","stb","PP","bw","infobubble","l_","ms-","NavBar_","cmt_","bottom","Copyright","upsell","ab_","w_","hlig","eachStep","close_","cGifIcon","cThIcon","autosuggest","showtimesMovie","sel","dish","formatShowtimes","wp_","hasExpandText","forecast","as_","ecmp","cmp","comp","userChat","bot","bTyp","team","serp","preG","option","azBxInsert","ec_","cs_","spin","skype-conversation","conversation","fs_","grammarly","filterBar","withFilters","textanno","mv_lm","usagTpVsDosage","trans_button_group","algo_action_template","meg_item","ev_msg_wrapper","ol_","offer","embed","videoplayercdn","searchNearby","directionsPanel","dragOverlay","infobox","mss","noneG","usage","drImp","sf_","dfindOverModal","circuit","swc","CodeMirror","cm-s-default","msg msg-warning","LogoContainer","quadrantOverride","ac-","gc-","fsmd-","fsg-","fsmf-","msto_","rq","geoItm","bqaq_quotes","bqap_padding","loc","ent_cnt","r_mf","exp_","btOverlay","mnot_container","info_C","ev_talkbox_notification","ev_talkbox_wrapper_min","p_tr_","slide","bnc-","itr_poi","cg-","elmlr_","scrl","gam-","htv-","genel-","gs_","qo_","jss_","mapsresp","geochainContainer","scaleBar","ae-","CalendarSync","spl_","adbDef","layerFrame","esp-","elis-","elcan-","elec-","sharegeneralcard","edu_","br-","covt_dd","covt_dd_sel","msac_sel","msac_ddi","cov_tt_tr","cov_tt_tn","dr_"];_w.APN=["fb_ovrly_cnt","b_bfb"];0;(function(){function u(n,t){for(var i=0;i<t.length;i++)if(n.toUpperCase().indexOf(t[i].toUpperCase())>=0)return!0;return!1}function n(n,t,i){sj_log("CI.AdPrevention",n,i?t+":"+i.substr(0,o):t)}function f(t){return t.src&&(i.href=t.src,window.location.hostname.indexOf(i.hostname)<0&&!u(i.hostname,s))?(n("D",t.tagName,i.hostname),!1):!0}function e(t){switch(t.tagName){case"IFRAME":case"IMG":case"SCRIPT":case"LINK":return f(t);case"OBJECT":return t.type&&t.type.indexOf("flash")>=0?(n("D",t.tagName,t.outerHTML),!1):!0;case"CENTER":return n("D",t.tagName,t.outerHTML),!1;default:return!0}}function t(n){return function(t){return e(t)?n.apply(this,arguments):document.createElement(t.tagName)}}function r(n){Object.freeze&&Object.freeze(n)}var i=sj_ce("a"),o=100,s=_w.APD?_w.APD.slice():[];document.write=function(t){n("D","DW",t)};document.writeln=function(t){n("D","DWL",t)};window.alert=function(t){n("D","WA",t)};window.confirm=function(t){n("D","WC",t)};window.showModalDialog=function(t){n("D","WSMD",t)};window.showModelessDialog=function(t){n("D","WSMLD",t)};typeof Element!="undefined"&&Element.prototype&&(Element.prototype.appendChild=t(Element.prototype.appendChild),Element.prototype.insertBefore=t(Element.prototype.insertBefore),Element.prototype.replaceChild=t(Element.prototype.replaceChild),r(Element.prototype));document.appendChild=t(document.appendChild);document.insertBefore=t(document.insertBefore);document.replaceChild=t(document.replaceChild);typeof HTMLDocument!="undefined"&&HTMLDocument.prototype&&(HTMLDocument.prototype.appendChild=t(HTMLDocument.prototype.appendChild),HTMLDocument.prototype.insertBefore=t(HTMLDocument.prototype.insertBefore),HTMLDocument.prototype.replaceChild=t(HTMLDocument.prototype.replaceChild),r(HTMLDocument.prototype))})();var BM=BM||{},adrule="."+_G.adc+" > ul";BM.rules={".b_scopebar":[0,0,0],".b_logo":[-1,-1,0],".b_searchboxForm":[100,40,0],"#id_h":[-1,0,0],"#b_tween":[-1,-1,1],"#b_results":[100,-1,1],"#b_context":[710,-1,1],".b_footer":[0,-1,0],"#b_notificationContainer":[-1,-1,0],"#ajaxMaskLayer":[-1,-1,0],"#me_gutter":[-1,-1,1],"#me_featurelist":[-1,-1,1],".sh_dayul":[-1,-1,1],".main":[-1,-1,1],".bottom":[-1,-1,0],".sw_menu":[-1,-1,1],"#Body_EventDetail":[-1,-1,1],".sb_adsNv2 > ul":[-1,-1,1],"img,div[data-src],.rms_img":[-1,-1,0],iframe:[-1,-1,0]};BM.rules[adrule]=[-1,-1,1];var BM=BM||{};(function(n){function u(n,u){n in t||(t[n]=[]);!u.compute||n in r||(r[n]=u.compute);!u.unload||n in i||(i[n]=u.unload);u.load&&u.load()}function f(n,i){t[n].push({t:s(),i:i})}function e(n){return n in i&&i[n](),n in t?t[n]:void 0}function o(){for(var n in r)r[n]()}function s(){return window.performance&&performance.now?Math.round(performance.now()):new Date-window.si_ST}var t={},i={},r={};n.wireup=u;n.enqueue=f;n.dequeue=e;n.trigger=o})(BM);(function(n){function i(){var i=document.documentElement,r=document.body,u="innerWidth"in window?window.innerWidth:i.clientWidth,f="innerHeight"in window?window.innerHeight:i.clientHeight,e=window.pageXOffset||i.scrollLeft,o=window.pageYOffset||i.scrollTop,s=document.visibilityState||"default";n.enqueue(t,{x:e,y:o,w:u,h:f,dw:r.clientWidth,dh:r.clientHeight,v:s})}var t="V";n.wireup(t,{load:null,compute:i,unload:null})})(BM);(function(n){function i(){var e,o,u,s,f,r;if(document.querySelector&&document.querySelectorAll){e=[];o=n.rules;for(u in o)for(s=o[u],u+=!s[2]?"":" >*",f=document.querySelectorAll(u),r=0;r<f.length;r++){var i=f[r],h=0,c=0,l=i.offsetWidth,a=i.offsetHeight;do h+=i.offsetLeft,c+=i.offsetTop;while(i=i.offsetParent);e.push({_e:f[r],x:h,y:c,w:l,h:a})}n.enqueue(t,e)}}var t="L";n.wireup(t,{load:null,compute:i,unload:null})})(BM);(function(n){function f(){u(sj_be,r)}function r(i){return i&&n.enqueue(t,i),!0}function e(){u(sj_ue,r)}function u(n,t){for(var u,r=0;r<i.length;r++)u=i[r],n(u==="resize"?window:document,window.navigator.pointerEnabled?u.replace("mouse","pointer"):u,t,!1)}var t="EVT",i=["click","mousedown","mouseup","touchstart","touchend","mousemove","touchmove","scroll","keydown","resize"];n.wireup(t,{load:f,compute:null,unload:e})})(BM);FallBackToDefaultProfilePic = function (e) { var new_element = document.createElement('span'); new_element.setAttribute('id', 'id_p'); new_element.setAttribute('class', 'sw_spd id_avatar'); new_element.setAttribute('aria-label', "Default Profile Picture"); var p = e.parentNode; p.replaceChild(new_element, e); };var DynScopes;(function(n){function r(n,r){i||(t=n,f(r),sj_evt.bind("onP1",u),i=!0)}function u(){if(sj_cook&&sj_cook.set&&sj_cook.clear){var n="dsc";sj_cook.clear(n,"/");t&&sj_cook.set(n,"order",t,!1,"/")}}function f(n){var r=e(),i,o,s,t;if(r){if(n){var h=n.split(","),u=r.children,c=u.length,f=[];for(t=0;t<h.length;t++)i=h[t].split(":"),i&&i.length==2&&(o=parseInt(i[0]),s=parseInt(i[1]),o<c&&s<c&&(f[s]=u[o].innerHTML));for(t=0;t<f.length;t++)u[t].innerHTML=f[t]}r.className=""}}function e(){var n=_d.querySelectorAll(".b_scopebar > .b_scopehide");return n&&n.length>0?n[0]:null}var i=!1,t;n.init=r})(DynScopes||(DynScopes={}));
for me is google who made any matter
Last edited by loutch (2020-06-05 08:16:09)
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
^ a few things:
I think spaces and newlines in $titre have to be replaced with '+' (without quotes).
I don't use lynx, but this works:
curl -A "Googlebot-Image/1.0" "www.google.fr/search?q=${titre}&tbm=isch" > test.html
Open the resulting test.html in a browser, you see your cover.
This:
curl -A "Googlebot-Image/1.0" "www.google.fr/search?q=${titre}&tbm=isch" | perl -pe 's!.*?<img .*?src="([^"]*)".*!$1!'
returns the first image on the page - which, unfortunately, is a Google logo.
What you need is the first image inside the table with with the image results.
Offline
hello
tank's for helping
curl -A "Googlebot-Image/1.0" "www.google.fr/search?q=${titre}&tbm=isch" > test.html
don't work for me test.html is empty.
@+
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
what does $titre contain?
Offline
hello
nothing
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
Then it cannot work.
As I'm sure you realise.
So, before testing the image bot, fill titre with some artist/title combo. I also recommend replacing spaces with '+', e.g.:
titre="U2+Sunday+bloody+Sunday"
Offline
In the meantime, I have come to love this "LATTE dock".
But for my personal taste it is disadvantageous to hide the control bar and thus not have any time on the desktop.
So I had to build it into the Conky and I think the template of @Sector11 is perfect for that (in bunsen-red).
conkyrc
-- pkill -xf "conky -c /home/unklar/.conky/rumit/rumit_conky10" &
-- @unklar 2020-04-01; 2020-07-09
conky.config = {
background = true,
update_interval = 1,
cpu_avg_samples = 2,
net_avg_samples = 2,
temperature_unit = 'celsius',
double_buffer = true,
no_buffers = true,
text_buffer_size = 2048,
gap_x = 10,
gap_y = 10,
minimum_width = 240, minimum_height = 650,
maximum_width = 240,
own_window = true,
own_window_type = 'normal',
own_window_transparent = true,
own_window_hints = 'undecorated,skip_taskbar,skip_pager,below',--sticky,
--own_window_colour 000000
own_window_argb_visual = true,
--own_window_argb_value = 200,
own_window_class = 'Conky',
--own_window_title = 'Grey Clock',
border_inner_margin = 0,
border_outer_margin = 0,
alignment = 'top_right',--tl
draw_shades = true, --false, --<==
default_shade_color = '000000', --<==
draw_outline = false,
--default_outline_color = '000000',
draw_borders = false,
draw_graph_borders = true, --false,
override_utf8_locale = true,
use_xft = true,
font = 'Fira Mono:bold:size=12', --<==
xftalpha = 0.5,
uppercase = false,
default_color = 'ffffff',
color1 = 'ed2323', --bunsen-red
color2 = '008000', --green
color3 = '008b8b', --dark cyan
color4 = '008080', --teal
color5 = '20b2aa', --LightSeaGreen
--- LUA ---
--lua_load = '~/.conky/rumit/scripts/clock_rings.lua',
--lua_draw_hook_pre = 'clock_rings',
--lua_load = '~/.conky/rumit/scripts/lua/conky_white_big.lua',
--lua_draw_hook_post = 'main',
lua_load = '~/.conky/rumit/scripts/draw_bg.lua',
lua_draw_hook_pre = 'draw_bg 15 0 0 0 0 0x000000 0.45',
};
conky.text = [[
${texeci 500 bash $HOME/Accuweather_conky_script/accuweather -f}
${voffset -15}${goto 20}${font conkyweather:size=40}${texeci 600 sed -n '22p' $HOME/Accuweather_conky_script/curr_cond}${font monofur:size=25}${goto 150}${texeci 600 sed -n '2p' $HOME/Accuweather_conky_script/curr_cond}°
${voffset -13}${goto 16}${font monofur:size=9}CURRENTLY: ${color6}${alignc}${texeci 600 sed -n '4p' $HOME/Accuweather_conky_script/curr_cond}
${goto 16}WIND: ${alignc}${texeci 600 sed -n '5p' $HOME/Accuweather_conky_script/curr_cond} ${texeci 600 sed -n '6p' $HOME/Accuweather_conky_script/curr_cond}${goto 170}${voffset -10}${font ConkyWindNESW:size=30}${texeci 600 sed -n '27p' $HOME/Accuweather_conky_script/curr_cond}
${voffset -33}${goto 16}${font monofur:size=9}PRESSURE: ${color6}${alignc}${texeci 600 sed -n '8p' $HOME/Accuweather_conky_script/curr_cond}
${voffset 7}${goto 25}${texeci 600 sed -n '11p' $HOME/Accuweather_conky_script/daily_forecast}${goto 100}${texeci 600 sed -n '18p' $HOME/Accuweather_conky_script/daily_forecast}${goto 170}${texeci 600 sed -n '25p' $HOME/Accuweather_conky_script/daily_forecast}
${goto 30}${font conkyweather:size=20}${texeci 600 sed -n '107p' $HOME/Accuweather_conky_script/daily_forecast}${goto 100}${texeci 600 sed -n '108p' $HOME/Accuweather_conky_script/daily_forecast}${goto 170}${texeci 600 sed -n '109p' $HOME/Accuweather_conky_script/daily_forecast}
${voffset -15}${goto 45}${font monofur:size=9}${texeci 600 sed -n '12p' $HOME/Accuweather_conky_script/daily_forecast}${goto 120}${texeci 600 sed -n '19p' $HOME/Accuweather_conky_script/daily_forecast}${goto 190}${texeci 600 sed -n '26p' $HOME/Accuweather_conky_script/daily_forecast}
${goto 20}${font monofur:size=10}${texeci 600 sed -n '8p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z|cut -c1-3}${goto 100}${color6}${texeci 600 sed -n '15p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z|cut -c1-3}${goto 180}${texeci 600 sed -n '22p' $HOME/Accuweather_conky_script/daily_forecast|tr a-z A-Z|cut -c1-3}
${color1}${swapbar 0,210}${color}
${font Fira Mono:size=9}
${goto 16}Boot: ${alignr 15}${execi 86400 who -b | cut -c23-}
${goto 16}Ram: ${alignr 15}${mem} | ${memmax}
${goto 16}System: ${alignr 15}${cpu cpu1} | ${cpu cpu2} | ${cpu cpu3} | ${cpu cpu4}
${goto 16}Radeon: ${alignr 15}${hwmon 2 temp 1}° | HDD ${execi 600 /usr/sbin/hddtemp -n /dev/sdb}°
${goto 16}Load: ${alignr 15}${loadavg}
${voffset -8}
${alignc} ${execi 86400 cat `ls -atr /etc/*-release | tail -1` | grep "PRETTY_NAME" | cut -d= -f2}
${alignc}${color1}${font Fira Mono:size=8} ${kernel} ${machine}${font Fira Mono:size=9}${color}
${voffset -8}
${alignc}speed ↓ ${downspeedf enp2s0}
${alignc}speed ↑ ${upspeedf enp2s0}${font monofur:size=9}${color}
${voffset -8}
${goto 10} Exchange rate: ${alignr 15}£ ${execi 1200 curl gbp.rate.sx/1eur?TFq -s | cut -c1-7} € ${execi 1200 curl eur.rate.sx/1gbp?TFq -s | cut -c1-7}
${alignc}${font monofur:size=10}S H O R T C U T K E Y S
${color1}${swapbar 0,210}${color}
${goto 16}Alt + F2${alignr 15}Run Dialog
${goto 16}Alt + F3${alignr 15}Alt Menu
${goto 16}Super${alignr 15}Main Menu
${goto 16}PrtSc${alignr 15}Screenshot${font}
${goto 5}${color}${font Hack:pixelsize=9}${execi 3 audtool current-song-tuple-data artist}
${goto 5}${font Hack:pixelsize=11}${execi 3 audtool current-song-tuple-data title}${execi 3 audtool current-song-tuple-data title > ~/.conky/audacious/artiste_titre.txt}
${goto 5}${font Hack:pixelsize=9}${execi 3 audtool current-song-tuple-data album}${color}
#${goto 5}${execi 1 audtool current-song-output-length} ${execi 1 audtool current-song-length}${color}
${alignc}${font Hack:pixelsize=12}updates: ${if_match ${execi 600 aptitude search "~U" | wc -l | tail}==0}${execi 600 aptitude search "~U" | wc -l | tail}${color}${else}${color red}${blink ${execi 600 aptitude search "~U" | wc -l | tail} }${font}${color}${endif}
${goto 55}${font LED_mono:size=25}${color4}88:88:88${goto 55}${color1}${time %T}${color}${font}
]];
Last edited by unklar (2020-07-12 06:34:30)
Offline
Nice! and thanks for the conky conf file.
could you also provide the required lua scripts?
Online
^^For the attentive reader the Lua script draw_bg.lua is here.
Offline
Hi Eon
Sometimes, simple is beautiful.
And you nailed it!
__________________________________
BTW; RUN, your [Esc] key is escaping!
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline