Re: How To - Conky/Lua, Music and Cover Art - 2 Methods for 18 Apps
Yes, I got that part...
When you run it, it installs the other stuff.. all of it's dependencies... so if you have some missing, it will install them
CrunchBang Linux Forums » Tips, Tricks & Scripts » How To - Conky/Lua, Music and Cover Art - 2 Methods for 18 Apps
Yes, I got that part...
When you run it, it installs the other stuff.. all of it's dependencies... so if you have some missing, it will install them
Well, finally! I dun it!
Las yer I cudn't evn spell geemoosikbrowsr ... gmusikbrowser ... gmusicbrowser
Now Tux gotta conky of it! ![]()
Kudos to VastOne for doing ALL the hard work! Appreciate it a LOT!
I can't leave things alone though - I put the files here (VOM = VastOneMusic):
/home/sector11/VOM/bin
/home/sector11/VOM/conky
/home/sector11/VOM/conkygmbrc
/home/sector11/VOM/conkyGmusicbrowser.py
/home/sector11/VOM/conkyGmusicbrowser.template
/home/sector11/VOM/db-cover.sh
/home/sector11/VOM/images
/home/sector11/VOM/conkygmbrc
# .conkyrc - Edited from various examples across the 'net
# Used by VastOne on #! Debian Wheezy
# killall conky && conky -c ~/VOM/conkygmbrc
# Font Settings ##############################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Anonymous Pro:size=10
# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 0.9
# Force UTF8? requires XFT ###
override_utf8_locale yes
draw_shades no
draw_outline no
uppercase no
######################## End Font Settings ###################################
# Begin Window Settings ######################################################
alignment top_right
own_window yes
own_window_type normal #desktop
own_window_transparent yes
own_window_class Conky
## own_window_hints below,sticky,skip_taskbar,skip_pager
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
# 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
# Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 0
minimum_size 220 0 ## width, height
maximum_width 220 ## width - usually a good idea to equal minimum width.
gap_x 5 ## left &right
gap_y 15 ## up & down
####################### End Window Settings ##################################
# Border Settings ############################################################
border_outer_margin 0
border_inner_margin 10
draw_borders no
border_width 1
stippled_borders 10
####################### End Border Settings ##################################
# Color Settings #############################################################
default_shade_color grey
default_outline_color black
# Main Color Settings ########################################################
default_color white
color1 B9CDD4
color2 white
color3 white
color4 BAF58B
# 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
# Adds spaces around certain objects to stop them
# from moving other things around.
# only works with mono fonts
use_spacer right
# Arguments are left, right, and none (default)
# Size of the standard text buffer (default is 256 bytes).
# Will allow for more text display per variable.
text_buffer_size 2048
# Sets bars size even for bars that do not hace that function
# IE: execbar and execibar
default_bar_size 140 9
# 0 makes Conky run forever
total_run_times 0
update_interval 1
cpu_avg_samples 1
net_avg_samples 1
no_buffers yes
# Defaults to 4MiB
# Set to 0 to disable the image cache
# Increase this value if you use $image lots
imlib_cache_size 0
### 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.4}
## ${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 ~/Conky/LUA/draw_bg.lua
#lua_draw_hook_pre draw_bg 5 0 0 0 0 0x000000 0.5
##
####################################################### End LUA Settings ###
TEXT
${lua conky_draw_bg 15 0 0 0 0 0x000000 0.5}${execp ~/VOM/conkyGmusicbrowser.py --template=~/VOM/conkyGmusicbrowser.template}${voffset 225}That last ${voffset 225} eliminates the need for blank lines. Just thought of that while writing this post.
/home/sector11/VOM/conkyGmusicbrowser.template
${color 7CB2E5}[--datatype=TI --maxlength=32]${image ~/VOM/images/gmb.png -p 0,62 -s 32x32}
${color 7CB2E5}[--datatype=AR --maxlength=32]${image [--datatype=CA] -p 0,115 -s 220x220}
${color 7CB2E5}[--datatype=AL --maxlength=30]
${voffset 4}${#FFFFFF}[--datatype=PT] ${color light blue}${execibar 1 ~/VOM/conkyGmusicbrowser.py --datatype=PP} ${#FFFFFF}[--datatype=LE]
${voffset 3} - ${color FFFFFF}[--datatype=ST] ${color 7CB2E5}Volume ${color FFFFFF}[--datatype=VO]
- ${color 7CB2E5}BitRate ${color FFFFFF}[--datatype=BR]~/Conky/LUA/draw_bg.lua
--[[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:
lua_load ~/Conky/LUA/draw_bg.lua
TEXT
${lua conky_draw_bg 20 0 0 0 0 0x000000 0.4}
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
3 = 0 y_position
3 = 0 width
5 = 0 height
6 = 0x000000 color
7 = 0.4 alpha
]]
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 ""
endLast edited by Sector11 (2012-01-16 21:49:31)
^ WOW... Well done Homey!
Now you can start a collection!! Will be sending some your way..
Proud Bro!
Last edited by VastOne (2012-01-16 21:51:31)
^ WOW... Well done Homey!
Now you can start a collection!! Will be sending some your way..
Proud Bro!
Thank you ... your work though.
Have a NEW twist. Still has some problems - need a "coder" bash script guru but here goes.
From my earlier post change ONE line in the conky above TEXT:
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pagerto
own_window_hints undecorated,below,skip_taskbar,skip_pager-- just take 'sticky' out of there.
And from TEXT down
TEXT
${if_running gmusicbrowser}${lua conky_draw_bg 15 0 0 0 0 0x000000 0.5}${execp ~/VOM/conkyGmusicbrowser.py --template=~/VOM/conkyGmusicbrowser.template}${voffset 225}${else}${endif}-- all on one line.
Now use this bash script and it will start 'gmusicbrowser' and the 'conky' on desktop three.
#!/bin/sh
# switch to Desktop 3
# wmctrl starts at 0
wmctrl -s 2
gmusicbrowser -play &
(sleep 2s && conky -c ~/VOM/conkygmbrc) &
exit
fiThe Problem:
If you do not have a "stop start" type conky script to re-start all your regular conkys, when you close gmusicbrowser and the the conky disappears - it is still running. Re-start it and you see the LUA background getting darker and darker until it is a solid black.
So having a bash script like this:
#!/bin/sh
if [ "$(pidof conky)" ]; then
killall conky
conky -c ~/Conky/OB_Email &
conky -c ~/Conky/OB_V_Cal.conky &
conky -c ~/Conky/OB_366.conky &
exit
else
conky -c ~/Conky/OB_Email &
conky -c ~/Conky/OB_V_Cal.conky &
conky -c ~/Conky/OB_366.conky &
exit
fithat will kill all conkys and restart your "regular conkys" (I use right-click on tint2 clock) it would not be so practical at the moment.
Ran the script from OpenBox menu:![]()
then took this of Desk1 (look at the top of the conky on the right)![]()
I use the same principle for my reminder calendar that starts on Desktop-3 on boot up. (it's under gmusicbrowser). mobilediesel pointed me in the right direction.
Conky: Unable to load image '-p' is all im getting running mpd version
Have you verified every thing loaded? Specifically mpDris?
Does the song you are playing have an image file in it's folder?
Please post the output of the following while a song is playing in mpd
python conkyMpd.py --datatype=CA
python conkyMpd.py --datatype=TI
python conkyMpd.py --datatype=AL
python conkyMpd.py --datatype=ARHave you verified every thing loaded? Specifically mpDris?
Does the song you are playing have an image file in it's folder?
Please post the output of the following while a song is playing in mpd
python conkyMpd.py --datatype=CA python conkyMpd.py --datatype=TI python conkyMpd.py --datatype=AL python conkyMpd.py --datatype=AR
in order
blank
unknown
unknown
unknown
It looks as if mpdris is not loaded.
Can you verify that by running?
ps aux | grep mpDrisAnd verify that it is loading the path to your music files
Thanks
It looks as if mpdris is not loaded.
Can you verify that by running?
ps aux | grep mpDrisAnd verify that it is loading the path to your music files
Thanks
It's not loading keep getting "Fatal: Could not connect to MPD: [Errno 111] Connection refused"
You have no issues playing any tracks from mpd?
You have no issues playing any tracks from mpd?
had mpd set to ip adress instead of localhost so i could control it from phone when afk ..now it shows name of whats playing but no pics and is a big black bg
Try reloading mpDris again
Try reloading mpDris again
still showing same as my intial post
The fatal error message? or no image?
Is there an image file in the directory of the song playing?
The fatal error message? or no image?
Is there an image file in the directory of the song playing?
the no image one
yeah the cover for my GnR album
OK, what is the name of the image file? Just checking to verify something...
Is
ps aux | grep mpDrisshowing mpDris now loaded and the correct path to your music files?
OK, that is a compositing issue... Do you run a compositor? If not, we will need to tweak the conky settings to get the background correct
OK, that is a compositing issue... Do you run a compositor? If not, we will need to tweak the conky settings to get the background correct
nope just stright openbox dont like it to flashy {pun intended}
Gotcha.. I would check through this thread and the conky thread for the tweaks needed to get you corrected.
Once Sector11 sees this, he will most likely pop in and tell you exactly what you need.
I run Xfce and a compositor so I am not much help with OB... Quite a few folks have had this same issue and resolved here in this thread or the conky one...
Glad you got it going...
Gotcha.. I would check through this thread and the conky thread for the tweaks needed to get you corrected.
Once Sector11 sees this, he will most likely pop in and tell you exactly what you need.
I run Xfce and a compositor so I am not much help with OB... Quite a few folks have had this same issue and resolved here in this thread or the conky one...
Glad you got it going...
i could probbly figure it out just kinda burnt this is my 7 distro in 5 days..including a gentoo install.i think imma settle with #!
Cool.. Glad to have you, and there is a load of great folks here...
I am sure you will figure it out..
Cheers!
Cool.. Glad to have you, and there is a load of great folks here...
I am sure you will figure it out..
Cheers!
Solved just rewrote the .conkympdrc with the default settings in the conkyrc that ships with #!
thank's nice info:D
Now in Git version of GMB - add hover_layout_pos option
Using the following as a guide and some discussion with squentin on the IRC, I have tweaked some of my desktop widgets to reflect the changes
add hover_layout_pos option to control position of hover_layout popups
-each coordinate can be given using a sum of number of pixels or
proportion of the widget size (w), screen size (s), or popup size (p)
-the default reference point is the upper right of the widget, unless the
position is preceded with "abs:" in which case the reference point is 0,0
-if the position is only in w or s, a "smart alignment" of the popup is done:
the popup will be centered, or left aligned if on the left border (0w or 0s),
or right aligned if on the right border (1w or 1s)
examples :
".5w x w" : center bottom of widget, equivalent to ".5w-.5p x w-p"
"abs: .5s x 0" : center top of screen, equivalent to "abs: .5s-.5p x 0"
".5w x w-p-10" : 10 pixels above center bottom of widget
example of use :
Cover(hover_delay=1, hover_layout_pos=.5w x w, hover_layout=some_layout)
This code
[nowplaying_screenlet_vastone2]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= Artist(xalign=.5) Album(xalign=.5) Title(xalign=.5) HBTime _Cover(forceratio=1,hover_delay=1,hover_layout_pos=.5w x w,hover_layout=nowplaying_screenlet2_popup)
HBTime = Length(markup="$length",initsize="XX:XX",xalign=0) _TimeBar(direct_mode=1) PlayingTime(markup="%s",initsize="XX:XX",xalign=1)
[nowplaying_screenlet2_popup]
Window = transparent=1
HBmain= 12Prev 12Play 12Next 12VolumeIcon 12BMSettings
BMSettings = (icon=gtk-preferences,size=menu) MainMenuItem PSortItem SMLibrary LayoutItem QueueItem PFilterItem SeparatorMenuItem01 MenuItem14(command=OpenPref,label=_"Settings",icon="gtk-preferences") MenuItem05(command=Quit,label=_"Quit",icon="gtk-quit")
SMLibrary = (label=_"Library") MenuItem00(command="RunPerlCode(::ChooseAddPath(0,1))",label=_"Add Music",icon="gtk-add") MenuItem32(command="RunPerlCode(::IdleScan)",label=_"Rescan Collection",icon="gtk-refresh")
VolumeScroll = VolumeIconHas the timer at the top and the pop ups at the bottom
This one moves the time to the bottom and adjust the popup to go below the timebar
[nowplaying_screenlet2 VastOne Now]
Type=D
DefaultFont=8
Window = size=240x240,transparent=1
VBmain= Artist(xalign=.5) Album(xalign=.5) Title(xalign=.5) _Cover(forceratio=1,hover_delay=1,hover_layout_pos= .5w x w-p+60,hover_layout=nowplaying_screenlet2_popup) _HBTime
HBTime = Length(markup="$length",initsize="XX:XX",xalign=0) _TimeSlider(direct_mode=1) PlayingTime(markup="%s",initsize="XX:XX",xalign=1)
[nowplaying_screenlet2_popup]
Window = transparent=1
HBmain= 12Prev 12Play 12Next 12VolumeIcon 12BMSettings
BMSettings = (icon=gtk-preferences,size=menu) MainMenuItem PSortItem SMLibrary LayoutItem QueueItem PFilterItem SeparatorMenuItem01 MenuItem14(command=OpenPref,label=_"Settings",icon="gtk-preferences") MenuItem05(command=Quit,label=_"Quit",icon="gtk-quit")
SMLibrary = (label=_"Library") MenuItem00(command="RunPerlCode(::ChooseAddPath(0,1))",label=_"Add Music",icon="gtk-add") MenuItem32(command="RunPerlCode(::IdleScan)",label=_"Rescan Collection",icon="gtk-refresh")
VolumeScroll = VolumeIconSome notes from IRC
.5w x w-p-10 would move it up 10 pixels
.5w x w-p+35 would move it down 35 pixels
.5w x w+0 effectively disables the smart-align
Posts [ 326 to 350 of 358 ]
CrunchBang Linux Forums » Tips, Tricks & Scripts » How To - Conky/Lua, Music and Cover Art - 2 Methods for 18 Apps
Forums powered by PunBB. Hosted by Linode.
Copyright © CrunchBang Linux.
Proudly powered by Debian GNU/Linux.
Debian is a registered trademark of Software in the Public Interest, Inc.