You are not logged in.

#1 2017-07-07 06:53:01

Temetka
Member
From: Sol System, Western Spiral Arm
Registered: 2015-10-14
Posts: 549

[SOLVED] Conky and audacious

I have a conky that uses this:

$color ${audacious_title}
 ${color #0077ff}${audacious_bar} $color

If I leave that code enabled, conky says "Can't destroy thread" or something. If I comment the code out, it works.

So the question is how to have conky recognize that audacious is / is not running and either show the song info, or display a custom message such as "Audacious is not running right now. Shall we play a song?"

Thanks.

Last edited by Temetka (2017-07-08 20:08:01)


The meaning of life is to just be alive. It is so plain and so obvious
    and so simple. And yet everybody rushes aroound in a great panic
             as if it were necessary to achieve something beyond themselves.
                                                                                                             - Alan Watts

Offline

#2 2017-07-07 07:06:14

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: [SOLVED] Conky and audacious

My initial approach would be to script it - conky calls the script, the script does the tests and the output goes to conky, and plays the music as necessary.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#3 2017-07-08 06:21:07

Temetka
Member
From: Sol System, Western Spiral Arm
Registered: 2015-10-14
Posts: 549

Re: [SOLVED] Conky and audacious

Well then. I uh, am not sure how to even go about doing that. Typically I take pieces from other people code and put them into a kind of frenken-conky.  Guess I'm off to google - I'm pretty sure I am not the only person whose tried to do this before.


The meaning of life is to just be alive. It is so plain and so obvious
    and so simple. And yet everybody rushes aroound in a great panic
             as if it were necessary to achieve something beyond themselves.
                                                                                                             - Alan Watts

Offline

#4 2017-07-08 19:11:26

ceeslans
Member
Registered: 2015-09-30
Posts: 196

Re: [SOLVED] Conky and audacious

scripting would be nice. but believe it can also be done with conky variables.
am not sure whether below is what you are looking for, but it may help to solve your quest.

here is the conkyrc (conky version 1.9):

update_interval 1
total_run_times 0
double_buffer yes
no_buffers yes
cpu_avg_samples 2
net_avg_samples 1

own_window yes
own_window_type desktop
own_window_argb_visual yes
own_window_argb_value 0
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager,below
own_window_class Scratch-Music
own_window_title Scratch-Music

draw_outline no
draw_borders no
draw_shades yes
draw_graph_borders no
border_width 0
border_inner_margin 0
imlib_cache_size 60
default_shade_color 606060

use_xft yes
xftfont Candara:size=11	
xftalpha 0.0
default_color black
text_buffer_size 1024
override_utf8_locale yes

uppercase no
short_units yes
#use_spacer right
pad_percents 0
top_name_width 4
out_to_ncurses no
out_to_console no

minimum_size 10 10
gap_x 0
gap_y 7
alignment tm

color1 white

TEXT
${if_running audacious}${font}${color} *   ${color1}Now ${exec audtool --playback-status}  ${color}"${exec audtool --current-song}"   \
${color1}Artist  ${color}${exec audtool --current-song-tuple-data artist}   \
${color1}Album  ${color}${exec audtool --current-song-tuple-data album}   \
${color1}Track no.  ${color}${exec audtool --current-song-tuple-data track-number}   \
${color1}Elapsed  ${color}${exec audtool --current-song-output-length} | ${exec audtool --current-song-length}   *${else}${color1}Audacious is not running right now. ${color}Shall we play a song? \

(mock-up)scrot or it didn't happen:

Scrot_cl_conky_audacious.jpg

Last edited by ceeslans (2017-07-08 19:41:12)

Offline

#5 2017-07-08 20:07:36

Temetka
Member
From: Sol System, Western Spiral Arm
Registered: 2015-10-14
Posts: 549

Re: [SOLVED] Conky and audacious

Works like a charm. Now I just need to edit the text to fit in my conky window.

2017-07-08-13-05-42_scrot.th.png


The meaning of life is to just be alive. It is so plain and so obvious
    and so simple. And yet everybody rushes aroound in a great panic
             as if it were necessary to achieve something beyond themselves.
                                                                                                             - Alan Watts

Offline

Board footer

Powered by FluxBB