Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 951  / 1 Year ago, fri, december 23, 2022, 3:02:46

Hey guys so I've been trying to adapt the REGULUS conky theme by Khiky-Merveilles (u/Khiky73) for my High Res display (it's originally meant for a HD display) and also to make it work with Madh93's Spotify Scripts for Conky as by default REGULUS uses MPD to handle music stats. I have manage to make it work after hours of work (this is my first time working with Conky in such depth). Now when I launch launch Spofity the song title and artists's name shows up at the bottom right corner of the desktop along with the cover art of the song. And when I close spotify it disappears.


The problem I am hainvig is that the spotify stats don't show up when conky starts at system startup. When I launch spoity only the ": " symbols show up but nothing else. For some reason the external scripts aren't being executied in the execi object. But once I remove the ${if_running spotify} from my script it starts working correctly, then once I add ${if_running spotify} back in the script and resart conky it works comepltely fine as intended. I really have no clue what's going on. It would makes sense of the text to not show because the external scripts need to be executed for the text (song's title and artist's name) but then why does the cover image and spotify icon is not being displayed either, even though they not connected to the scripts.


Image indicating the issue


Does anyone know what might be causing this weird behaviour?


conky.config = {
--==============================================================================
-- 2021/10/2
-- this is for conky version 1.10 or Newer
--
-- RegSpot - Conky theme (Based on REGULUS theme)

-- authors : Khiky-Merveilles & Madh93 & Argus_Khan
-- license : Distributed under the terms of GNU GPL version 3 or later
-- notes : Created on 2048x1152 resolution.

--==============================================================================

-- Size and Position settings --
alignment = 'top_right',
gap_x = 0,
gap_y = 0,
minimum_height = 1152,
minimum_width = 900,

-- Text settings --
use_xft = true,
font = 'Roboto:light:size=9',

-- Color Settings --
default_color = 'white',
default_outline_color = 'white',
default_shade_color = 'white',
color1 = '212021',
color2 = 'FF3A70',
color3 = '0165FE',

-- Window Settings --
background = false,
border_width = 1,
draw_borders = false,
draw_graph_borders = false,
draw_outline = false,
draw_shades = false,
own_window = true,
own_window_colour = '000000',
own_window_class = 'Conky',
own_window_argb_visual = false,
own_window_type = 'desktop',
own_window_transparent = true,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
stippled_borders = 0,

-- Others --
cpu_avg_samples = 2,
net_avg_samples = 2,
double_buffer = true,
out_to_console = false,
out_to_stderr = false,
extra_newline = false,
update_interval = 1,
uppercase = false,
use_spacer = 'none',
show_graph_scale = false,
show_graph_range = false,
lua_load = '~/.config/conky/Regulus/rings-v1.2.1.lua',
lua_draw_hook_pre = 'ring_stats',
}

conky.text = [[
${offset 470}${voffset 0}${color}${font Bebas Neue:size=138}${time %H}${font Bebas Neue:size=0}
${offset 470}${voffset 0}${color}${font Bebas Neue:size=138}${time %M}${font Bebas Neue:size=0}
${offset 470}${voffset 30}${color}${font Bebas Neue:size=20}${time %^A}
${offset 470}${voffset 0}${color}${font Bebas Neue:size=20}${time %d / %B / %Y}${font Bebas Neue:size=0}

# --- Weather scripts --- #
${execi 50 ~/.config/conky/Regulus/scripts/weather.sh}
${execi 50 ~/.config/conky/Regulus/scripts/weather-icon.sh white3 $(cat ~/.cache/weather.json | jq -r '.weather[0].icon')}
${offset 775}${voffset -170}${color}${font Bebas Neue:size=38}${execi 50 cat ~/.cache/weather.json | jq '.main.temp' | awk '{print int($1+0.5)}'}°C${font Bebas Neue:size=0}
${offset 700}${voffset 12}${color}${font Helvetica Neue:size=12}.............
${offset 700}${voffset 0}${color2}${font Helvetica Neue:bold:size=10}${execi 50 cat ~/.cache/weather.json | jq -r '.name'}
${offset 700}${voffset 0}${color}${font Helvetica Neue:size=12}${execi 50 cat ~/.cache/weather.json | jq -r '.weather[0].description' | sed "s|<.|U&|g"}${font HelveticaNeue:size=1}
${offset 700}${voffset 3}${color}${font Helvetica Neue:size=10}Wind speed : ${execi 50 (cat ~/.cache/weather.json | jq '.wind.speed')}km/h
${offset 700}${voffset 0}${color}${font Helvetica Neue:size=10}Humidity : ${execi 50 (cat ~/.cache/weather.json | jq '.main.humidity')}%

# --- Network scripts --- #
${offset 700}${voffset 40}${font Material:size=10}${font Helvetica Neue:bold:size=9}: ${execi 5 ~/.config/conky/Regulus/scripts/ssid}
${offset 700}${voffset 5}${font Helvetica Neue:size=10}Downspeed : ${downspeed wlp5s0}
${offset 700}${voffset 0}${color 1EF75E}${downspeedgraph wlp5s0 35,150 1EF75E 1EF75E}
${offset 700}${voffset 0}${color}${font Helvetica Neue:size=10}Upspeed : ${upspeed wlp5s0}
${offset 700}${voffset 0}${color FF3A70}${upspeedgraph wlp5s0 35,150 FF3A70 FF3A70}

# --- Music scripts --- #

${execi 1 cd ./scripts/spotify/ ; ./cover.sh ; cd .. ; cd ..}
${color}${alignr 13}${offset -260}${voffset 300}${font Helvetica Neue:bold:size=18}${if_running spotify}${execi 1 sh ./scripts/spotify/status.sh} :${else} ${endif}
${color2}${alignr 13}${offset -220}${voffset 5}${font Bebas Neue:size=45}${if_running spotify}${execi 1 sh ./scripts/spotify/artist.sh}${else} ${endif}${font Google Sans:bold:size=2}
${color}${alignr 13}${offset -220}${voffset 5}${font Material:size=24}${if_running spotify} ${font Helvetica Neue:size=20}${execi 1 sh ./scripts/spotify/title.sh}${else} ${endif}${font Google Sans:bold:size=2}


# --- Drawing backgrounds and Icons --- #
${image ~/.config/conky/Regulus/Box1.png -s 190x190 -p 680,20}
${image ~/.config/conky/Regulus/Box.png -s 190x190 -p 680,230}
${image ~/.config/conky/Regulus/Box.png -s 190x190 -p 680,440}

${image ~/.cache/weather-icon.png -p 690,250 -s 65x65 -f 100}

# --- Drwaing Current Playing Music HUD --- #
${image ./icons/spotify-512.png -p 635,965 -s 30x30}
${image ./current/current.jpg -p 690,940 -s 185x185 -f 5}

${if_running rhythmbox}${image ./icons/headphones-3-512.png -p 635,965 -s 30x30}${else} ${endif}
${if_running rhythmbox}${image ./icons/headphones-3-512.png -p 690,940 -s 185x185 -f 1}${else} ${endif}

]]


How the theme looks like when it's working correctly:


How the theme looks when working properly


P.S. I was trying to make is so that this theme also works with Rhythmbox but I don't know how to use nested if else statements in Conky. So I've been unable to make it work. Also due to the fact that there is no way to print text vertically to an absolute position.


More From » themes

 Answers
3

I managed to fix the issue, as it turned out the mistake I made was that I used relative pathing when calling the external scripts for spotify and draw calls for the images, mistakenly assuming the current working directory was the one where the main conky startup script is stored but that was not the case. The conky start up script was being executed from ~ instead of ~/.config/conky/regulus/ so it made the relative paths invalid.


[#1141] Friday, December 23, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mugustered

Total Points: 193
Total Questions: 123
Total Answers: 108

Location: Bermuda
Member since Wed, Mar 22, 2023
1 Year ago
mugustered questions
Sat, Nov 19, 22, 07:03, 1 Year ago
Sun, May 29, 22, 11:53, 2 Years ago
Sun, Mar 5, 23, 02:51, 1 Year ago
;