You are not logged in.
Pages: 1
I'm using i3 window manager and Conky which outputs some basic info to i3bar.
Part of i3 config regarding i3bar looks like this:
# i3bar
bar
{
status_command ~/.i3/conky
position top
colors
{
background #000000
statusline #FFFFFF
separator #666666
# (blue theme) border backgr. text
focused_workspace #8A97A2 #8A97A2 #FFFFFF
active_workspace #333333 #808080 #FFFFFF
inactive_workspace #324859 #324859 #808080
urgent_workspace #FFFFFF #8A97A2 #FFFFFF
}
}The script that i3bar uses looks like this:
#!/bin/sh
echo "{\"version\":1}"
echo "[[]"
conky -c ~/.conkyrcAnd finally, conkyrc looks like this:
background no
out_to_console yes
out_to_x no
update_interval 1
total_run_times 0
short_units yes
override_utf8_locale yes
double_buffer yes
TEXT
,[
{"full_text": "kernel ${kernel}", "color":"\#577C98"},
{"full_text": "CPU use ${cpu cpu1}%", "color":"\#C1D1DD"},
{"full_text": "CPU temp ${hwmon temp 1}°C", "color":"\#577C98"},
{"full_text": "CPU clock ${freq_g}GHz", "color":"\#C1D1DD"},
{"full_text": "RAM ${memperc}%", "color":"\#577C98"},
{"full_text": "root ${fs_used /}", "color":"\#C1D1DD"},
{"full_text": "home ${fs_used /home}", "color":"\#577C98"},
{"full_text": "uptime ${uptime}", "color":"\#C1D1DD"},
{"full_text": "${time %A}", "color":"\#577C98"},
{"full_text": "${time %Y}-${time %m}-${time %d}", "color":"\#C1D1DD"},
{"full_text": "${time %H}:${time %M}", "color":"\#577C98"}
]I would like to add simple "artist - track title" from DeaDBeeF to Conky. Any idea how to do this?
I've found this thread on #! forums, but it's much more complicated than what I'm after.
Thanks for help.
Last edited by Sublime2k (2014-07-21 16:17:02)
Offline
deadbeef has --nowplaying command line option,
# deadbeef --help
...
--nowplaying FMT Print formatted track name to stdout
FMT %-syntax: [a]rtist, [t]itle, al[b]um,
[l]ength, track[n]umber, [y]ear, [c]omment,
copy[r]ight, [e]lapsed
e.g.: --nowplaying "%a - %t" should print "artist - title"
for more info, see http://sourceforge.net/apps/mediawiki/deadbeef/index.php?title=Title_Formattingthat you can use with $exec{i,p,pi} variables in your .conkyrc, for example:
${exec deadbeef --nowplaying "%a - %t"}EDIT: quotation marks are required
Last edited by ooo (2014-07-21 15:15:23)
Offline
deadbeef has --nowplaying command line option,
# deadbeef --help ... --nowplaying FMT Print formatted track name to stdout FMT %-syntax: [a]rtist, [t]itle, al[b]um, [l]ength, track[n]umber, [y]ear, [c]omment, copy[r]ight, [e]lapsed e.g.: --nowplaying "%a - %t" should print "artist - title" for more info, see http://sourceforge.net/apps/mediawiki/deadbeef/index.php?title=Title_Formattingthat you can use with $exec{i,p,pi} variables in your .conkyrc, for example:
${exec deadbeef --nowplaying %a - %t}
Thanks, but it's working only partially correctly.
I added that line to conkyrc like this:
background no
out_to_console yes
out_to_x no
update_interval 1
total_run_times 0
short_units yes
override_utf8_locale yes
double_buffer yes
TEXT
,[
{"full_text": "playing: ${exec deadbeef --nowplaying %a - %t}", "color":"\#C1D1DD"},
{"full_text": "kernel ${kernel}", "color":"\#577C98"},
{"full_text": "CPU use ${cpu cpu1}%", "color":"\#C1D1DD"},
{"full_text": "CPU temp ${hwmon temp 1}°C", "color":"\#577C98"},
{"full_text": "CPU clock ${freq_g}GHz", "color":"\#C1D1DD"},
{"full_text": "RAM ${memperc}%", "color":"\#577C98"},
{"full_text": "root ${fs_used /}", "color":"\#C1D1DD"},
{"full_text": "home ${fs_used /home}", "color":"\#577C98"},
{"full_text": "uptime ${uptime}", "color":"\#C1D1DD"},
{"full_text": "${time %A}", "color":"\#577C98"},
{"full_text": "${time %Y}-${time %m}-${time %d}", "color":"\#C1D1DD"},
{"full_text": "${time %H}:${time %M}", "color":"\#577C98"}
]As soon as I save conkyrc, DeaDBeeF stops playback and kind of freezes up. I can't add anything to the playlist and it refuses to play anything. Also, there's a window that briefly flashes in DeaDBeeF, but it's so brief that I can't read what it says.
Edit: I figured it out. It was supposed to be exec deadbeef --nowplaying "%a - %t", quotation marks are important.
Anyway, it works now. I appreciate your help. ![]()
Last edited by Sublime2k (2014-07-21 14:10:59)
Offline
sorry about that. I was supposed to test the command to make sure the syntax is correct, but forgot :(
glad to hear you got it working still.
please add [SOLVED] on the title of the first post if that solution works for you :)
Last edited by ooo (2014-07-21 15:17:36)
Offline
Pages: 1