You are not logged in.

#151 2013-01-18 23:13:21

SahibBommelig
Member
From: Germany
Registered: 2010-05-28
Posts: 80

Re: Lyvi - command-line lyrics (and more!) viewer

Just type

lyvi

No need to background it.

"Cannot set locale!" is just a warning from libglyr, and means that there's no correct locale set. It will work without. Workaround to disable the warning:

LANG="C" lyvi

Offline

#152 2013-01-20 18:11:23

OK100
Member
From: [U==]
Registered: 2010-04-26
Posts: 455

Re: Lyvi - command-line lyrics (and more!) viewer

zeltak wrote:

so i found out the issue...i never noticed the lyvi and lyvi-git had different rc file names (why btw?):
~/.config/lyvi/lyvi.conf (~/.config/lyvi/rc for stable version)

I renamed the default config file to lyvi.conf to keep it consistent with other configuration files in ~/.config (most apps use <appname>.conf).

Offline

#153 2013-01-21 20:47:03

zeltak
Member
From: New England
Registered: 2010-08-07
Posts: 168

Re: Lyvi - command-line lyrics (and more!) viewer

Hya again

short question: im not sure its actually lyvi's fault but for some reason under tmux (in urxvt ofc) lyvi cant show the backdrops/covres. i can get transparency in tmux in all windows so i dont know if its a transparency issue, any clue?

best

Z

Offline

#154 2013-01-21 23:30:06

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: Lyvi - command-line lyrics (and more!) viewer

lyvi doesnt start for me. my mpd is on a remote machine:

Traceback (most recent call last):
  File "/usr/bin/lyvi", line 1292, in <module>
    curses.wrapper(main)
  File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/bin/lyvi", line 1191, in main
    if 'dbusloop' in player.run and player.run['dbusloop'] == True:
TypeError: argument of type 'NoneType' is not iterable

i set mpd to mpd_host = PASSWORD@192.168.1.100


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#155 2013-01-23 18:13:23

OK100
Member
From: [U==]
Registered: 2010-04-26
Posts: 455

Re: Lyvi - command-line lyrics (and more!) viewer

zeltak wrote:

Hya again

short question: im not sure its actually lyvi's fault but for some reason under tmux (in urxvt ofc) lyvi cant show the backdrops/covres. i can get transparency in tmux in all windows so i dont know if its a transparency issue, any clue?

best

Z

Background images in tmux are not supported because urxvt control sequences for setting background don't work in tmux.

Rasi wrote:

lyvi doesnt start for me. my mpd is on a remote machine:

Traceback (most recent call last):
  File "/usr/bin/lyvi", line 1292, in <module>
    curses.wrapper(main)
  File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/bin/lyvi", line 1191, in main
    if 'dbusloop' in player.run and player.run['dbusloop'] == True:
TypeError: argument of type 'NoneType' is not iterable

i set mpd to mpd_host = PASSWORD@192.168.1.100

Please try with latest commit.

Offline

#156 2013-01-30 17:25:39

gvaldez81
Member
Registered: 2013-01-17
Posts: 2

Re: Lyvi - command-line lyrics (and more!) viewer

Okas, let me try.

Regards

OK100 wrote:
zeltak wrote:

hya OK100

for some reason the artist backdrop stped working for me completly. the cover option still show covers. ive tried it even with a driffrent config etc and its not working. can you help me find out whats causing this? where should i start?
here is my current config file

http://paste.xinu.at/9m6C/


thx

Z

Can you please test if it works with "bg_local = False"?

gvaldez81 wrote:

Newbie here :$, everytime that I run lyvi I got this
Traceback (most recent call last):
  File "./lyvi", line 26, in <module>
    import plyr
ImportError: No module named plyr
I'm not familiar with python , i have an ubuntu 12.10 with Python 3.2
help me !

You need to install required python modules (python-glyr, python-dbus and python-imaging). Python-glyr is probably not packaged in ubuntu so you have to install it manually (see http://sahib.github.com/python-glyr/int … installing for instructions).

Offline

#157 2013-01-31 20:43:12

zeltak
Member
From: New England
Registered: 2010-08-07
Posts: 168

Re: Lyvi - command-line lyrics (and more!) viewer

hya OK100

how are you?

so while spending some time on the irc trying to fix a tmux issue one of the devs helped out and i asked him about lyvi and tmux.

he said its prety simple to get lyvi working in tmux though i ofc have no clue how. he was really nice and even told me you can contact him directly  (nicholas.marriott@gmail.com) for questions and he would be glad to help.

im pasting the conversation here if you dont mind, let me know if that gives any clue on to how make lyvi work in tmux smile

 zeltak | so i love using a small app called lyvi, which changes my urxvt terms background each time a song changes
 zeltak | the dev said though :
 zeltak | Background images in tmux are not supported because urxvt control sequences for setting background don't w
 zeltak | is that something that can be addressed in the future or is that forever not possible?
   NicM | you can do it by using the control sequence to pass through to the terminal
 zeltak | is there documentation on this that i can point the dev to?
   NicM | there is an escape sequence to send raw sequences directly to the terminal
   NicM | uhm i think we meant to add it to the man page but never did
   NicM | there is a mailing list post about it, let me find it
 zeltak | wow thx NicM
   NicM | ----------------------------
   NicM | revision 1.37
   NicM | date: 2011/03/07 23:46:27;  author: nicm;  state: Exp;  lines: +49 -24
   NicM | Support passing through escape sequences to the underlying terminal by
   NicM | using DCS with a "tmux;" prefix. Escape characters in the sequences must
   NicM | be doubled. For example:
   NicM | $ printf '\033Ptmux;\033\033]12;red\007\033\\'
   NicM | Will pass \033]12;red\007 to the terminal (and change the cursor colour
   NicM | in xterm). From Kevin Goodsell.
   NicM | =============================================================================
 zeltak | thx NicM ill point him to it, would be pretty epic if i can get it to work in tmux :)
   NicM | so if you wrap the control sequence in \033Ptmux;myescapesequence\033\\ then it will work
   NicM | remembering to double up any \033 in myescapesequence
 zeltak | amazing thx, ill keep you updated :) which os are you on if i may ask?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   NicM | you can tell you are inside tmux by looking for $TMUX in the environment
   NicM | openbsd
eputnam | ++
 zeltak | NicM: nice
 zeltak | well i dunno if your intrested but http://ok100.github.com/lyvi/
 zeltak | its pretty amazing
 zeltak | im sure it can run in bsd :)
 zeltak | and i supports loads of CLI players
   NicM | it would be very easy to change this program to work
 zeltak | thats great news, you just made my day :)
 zeltak | very excited :)
   NicM | although why he uses os.system to call printf rather than just, well, printfing
   NicM | os.system('printf "\e]20;%s;100x100+50+50:op=keep-aspect\a"' % file)
   NicM | something like
   NicM | if os.environ['TMUX']
 zeltak | hehe i have no coding skills at all so i have no clue :)
   NicM | print "\ePtmux;\e\e]20;%ss;100x100+50+50:op=keep-aspect\a\\" % file
   NicM | else:
   NicM | ...
   NicM | anyway sure if you tell him and he wants to do it but can't get it to work get him to email me
 zeltak | great thx alot, what emnail should i give him?
   NicM | oh python doesn't support \e so it'd have to be \033

thx alot

Z.

Last edited by zeltak (2013-02-01 01:25:27)

Offline

#158 2013-02-01 11:26:43

OK100
Member
From: [U==]
Registered: 2010-04-26
Posts: 455

Re: Lyvi - command-line lyrics (and more!) viewer

zeltak wrote:

hya OK100

how are you?

so while spending some time on the irc trying to fix a tmux issue one of the devs helped out and i asked him about lyvi and tmux.

he said its prety simple to get lyvi working in tmux though i ofc have no clue how. he was really nice and even told me you can contact him directly  (nicholas.marriott@gmail.com) for questions and he would be glad to help.

im pasting the conversation here if you dont mind, let me know if that gives any clue on to how make lyvi work in tmux smile

 zeltak | so i love using a small app called lyvi, which changes my urxvt terms background each time a song changes
 zeltak | the dev said though :
 zeltak | Background images in tmux are not supported because urxvt control sequences for setting background don't w
 zeltak | is that something that can be addressed in the future or is that forever not possible?
   NicM | you can do it by using the control sequence to pass through to the terminal
 zeltak | is there documentation on this that i can point the dev to?
   NicM | there is an escape sequence to send raw sequences directly to the terminal
   NicM | uhm i think we meant to add it to the man page but never did
   NicM | there is a mailing list post about it, let me find it
 zeltak | wow thx NicM
   NicM | ----------------------------
   NicM | revision 1.37
   NicM | date: 2011/03/07 23:46:27;  author: nicm;  state: Exp;  lines: +49 -24
   NicM | Support passing through escape sequences to the underlying terminal by
   NicM | using DCS with a "tmux;" prefix. Escape characters in the sequences must
   NicM | be doubled. For example:
   NicM | $ printf '\033Ptmux;\033\033]12;red\007\033\\'
   NicM | Will pass \033]12;red\007 to the terminal (and change the cursor colour
   NicM | in xterm). From Kevin Goodsell.
   NicM | =============================================================================
 zeltak | thx NicM ill point him to it, would be pretty epic if i can get it to work in tmux :)
   NicM | so if you wrap the control sequence in \033Ptmux;myescapesequence\033\\ then it will work
   NicM | remembering to double up any \033 in myescapesequence
 zeltak | amazing thx, ill keep you updated :) which os are you on if i may ask?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   NicM | you can tell you are inside tmux by looking for $TMUX in the environment
   NicM | openbsd
eputnam | ++
 zeltak | NicM: nice
 zeltak | well i dunno if your intrested but http://ok100.github.com/lyvi/
 zeltak | its pretty amazing
 zeltak | im sure it can run in bsd :)
 zeltak | and i supports loads of CLI players
   NicM | it would be very easy to change this program to work
 zeltak | thats great news, you just made my day :)
 zeltak | very excited :)
   NicM | although why he uses os.system to call printf rather than just, well, printfing
   NicM | os.system('printf "\e]20;%s;100x100+50+50:op=keep-aspect\a"' % file)
   NicM | something like
   NicM | if os.environ['TMUX']
 zeltak | hehe i have no coding skills at all so i have no clue :)
   NicM | print "\ePtmux;\e\e]20;%ss;100x100+50+50:op=keep-aspect\a\\" % file
   NicM | else:
   NicM | ...
   NicM | anyway sure if you tell him and he wants to do it but can't get it to work get him to email me
 zeltak | great thx alot, what emnail should i give him?
   NicM | oh python doesn't support \e so it'd have to be \033

thx alot

Z.

Hi,
Just pushed tmux support. Thanks zeltak.
By the way, your issue with wrong lyrics you posted a few posts back - you can re-download lyrics for current song with "r" key.

Last edited by OK100 (2013-02-01 11:26:59)

Offline

#159 2013-02-01 13:51:23

zeltak
Member
From: New England
Registered: 2010-08-07
Posts: 168

Re: Lyvi - command-line lyrics (and more!) viewer

Hya Ok100

Thx alot thats amazing !

i think though that i hit a bump on my plan that i dont think we can overcome in my quest for a all in one "CLI player" smile

lyvi works great in tmux now but i just realized all the tmux windows actually share one urxvt terminal resulting in this:

http://paste.xinu.at/qhB/

my plan (obviously i wasnt thinking all the way through on this ) was to recreate this in tmux:

http://paste.xinu.at/N73j/

where in the above image im using 3 sperate urxvt terms smile

i think thats a dead end right? do you think there is anyway to make a specific pane in tmux use a differnt urxvt background from the other pane? do you think it worth enquiring about this on #tmux?

if its not possible (probably) do you think we can somehow trick via coding the urxvt background so that it uses 2 images combined to set the background (with a fixed/user defined position), IE use some kind of imagemagic/other app to create on the fly a image merge thats 70% artist/30% ablum and use that as a background? just a thought smile

thx alot again

Best

Z

Last edited by zeltak (2013-02-01 13:54:34)

Offline

#160 2013-02-02 18:28:39

OK100
Member
From: [U==]
Registered: 2010-04-26
Posts: 455

Re: Lyvi - command-line lyrics (and more!) viewer

@zeltak: Good news wink Lyvi running in tmux:
taGJtZQ
Still needs some work but it should be on GitHub very soon tongue

Last edited by OK100 (2013-02-02 18:30:00)

Offline

#161 2013-02-02 20:08:02

zeltak
Member
From: New England
Registered: 2010-08-07
Posts: 168

Re: Lyvi - command-line lyrics (and more!) viewer

Wow

amazing..seriously cant wait to try it!

thx alot

Z

Offline

#162 2013-02-03 19:31:08

OK100
Member
From: [U==]
Registered: 2010-04-26
Posts: 455

Re: Lyvi - command-line lyrics (and more!) viewer

Enhanced tmux background support is on master wink
There are a few configuration options to set it up:

  • bg_type: Set to "both" if you want to see both images at once (in different panes)

  • bg_tmux: Set to True

  • bg_tmux_width, bg_tmux_height: Width and height of the tmux window in pixels (doesn't need to be exact)

  • bg_tmux_backdrops_pane: Pane to display backdrops image (numbered from 0)

  • bg_tmux_backdrops_pane_offset_x, bg_tmux_backdrops_pane_offset_y: You can use these options to fine-tune final placement of the image (e.g "bg_tmux_backdrops_pane_offset_x = -15" to move image 15px left)

  • bg_tmux_backdrops_underlying: Set to False if there's no lyvi instance running in the same pane.

bg_tmux_backdrops_* options are the same for cover, just replace "backdrops" with "cover".

Sample configuration file could be:

bg = True
bg_type = both
bg_color = 000000
bg_opacity = 0.1
bg_tmux = True
bg_tmux_width = 1024
bg_tmux_height = 600
bg_tmux_backdrops_pane = 1
bg_tmux_cover_pane = 2
bg_tmux_cover_underlying = False

Let me know if you need more help smile

Last edited by OK100 (2013-02-03 19:33:04)

Offline

#163 2013-02-04 14:44:54

zeltak
Member
From: New England
Registered: 2010-08-07
Posts: 168

Re: Lyvi - command-line lyrics (and more!) viewer

Hya Ok100

First of all wow, fantastic work! thx alot for this.

It works great but there are a few minor bugs/issue im reporting if thats ok.

1.the new combined image dosent strech over the full tmux window. it leaves empty edges on the side in tmux, see screen (marked in red):

http://paste.xinu.at/x9Pv/

2.i get now alot of errors in the lyrics window. i cant seem to copy it so heres a screen:

http://paste.xinu.at/Cv2s/

another example

http://paste.xinu.at/CZ5A/

this happnes aobut 80% of the time i launch tmux with lyvi

3.the second lyvi window now is now not used for covers (thats taken by the main lyvi window) but rather i want it to come up empty and then use the keycombo a to cycle through info only when needed. but now this window ias acting really wierd. 'h' and 'a' key combos dont work there and also it always comes up with lyrics even though in the alternative rc file i use i specify a hidden ui.

here is how i launch the second lyvi window:


tmux send-keys -t tmux_mpd:1.3 'lyvi --config-file /home/zeltak/.config/lyvi/rc_artist' C-m


and here is the alternate config file

http://paste.xinu.at/bg4eKK/

any clue?

4.small thing i just noiticed, lyrics scrolling continues when player is paused, is that a bug or on purpose?

thx again, ill keep on testing it and see if i can find any more bugs smile

best

Z

Last edited by zeltak (2013-02-04 16:51:35)

Offline

#164 2013-02-04 20:32:48

OK100
Member
From: [U==]
Registered: 2010-04-26
Posts: 455

Re: Lyvi - command-line lyrics (and more!) viewer

Hi,

1.the new combined image dosent strech over the full tmux window. it leaves empty edges on the side in tmux, see screen (marked in red):

http://paste.xinu.at/x9Pv/

You can set the background size with bg_tmux_width and bg_tmux_height options. Also set bg_color to the same color as your terminal bg.

2.i get now alot of errors in the lyrics window. i cant seem to copy it so heres a screen:

http://paste.xinu.at/Cv2s/

another example

http://paste.xinu.at/CZ5A/

this happnes aobut 80% of the time i launch tmux with lyvi

The first error (list index out of range) means that you have either bg_tmux_backdrops_pane or bg_tmux_cover_pane option set higher than the number of tmux panes. Can I see a screenshot of whole tmux window and lyvi rc file?
The second error (images do not match) is now fixed.

3.the second lyvi window now is now not used for covers (thats taken by the main lyvi window) but rather i want it to come up empty and then use the keycombo a to cycle through info only when needed. but now this window ias acting really wierd. 'h' and 'a' key combos dont work there and also it always comes up with lyrics even though in the alternative rc file i use i specify a hidden ui.

Actually, hidden_ui doesn't do anything if bg option is not True. However, you can just use one instance of lyvi for lyrics + backdrops and cover image in the other empty pane. Then you can use a and h keys in the lyvi pane while the cover pane will stay visible all time with full brightness.

4.small thing i just noiticed, lyrics scrolling continues when player is paused, is that a bug or on purpose?

This is because lyvi doesn't know if the player is paused. For some players it's not even possible.

Offline

#165 2013-02-04 22:00:02

zeltak
Member
From: New England
Registered: 2010-08-07
Posts: 168

Re: Lyvi - command-line lyrics (and more!) viewer

Hya again

here is the lyvi conf

http://paste.xinu.at/Fe1j/

and screenshot

http://paste.xinu.at/Ngbr/

still need to adjust the images with offset smile

thx

Z

Offline

#166 2013-02-08 19:17:27

OK100
Member
From: [U==]
Registered: 2010-04-26
Posts: 455

Re: Lyvi - command-line lyrics (and more!) viewer

zeltak wrote:

Hya again

here is the lyvi conf

http://paste.xinu.at/Fe1j/

and screenshot

http://paste.xinu.at/Ngbr/

still need to adjust the images with offset smile

thx

Z

Hi,
Window size is now autodetected with latest commit (requires xorg-xwininfo package).
Add this line to lyvi config:

# same as your tmux window title
bg_tmux_window_title = music

Also remove all *offset*, bg_tmux_width and bg_tmux_height options as they're not needed anymore.
Let me know if it makes any difference smile

Offline

#167 2013-02-10 23:49:46

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: Lyvi - command-line lyrics (and more!) viewer

the tmux stuff is frakking amazing smile


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#168 2013-02-11 15:19:24

rodyaj
Member
Registered: 2009-10-13
Posts: 54

Re: Lyvi - command-line lyrics (and more!) viewer

Does lyvi grab album art off the internet if it isn't available locally? I was under the impression it does, but I can't see any images.

I have lyvi-git 20130211-1 from AUR with this ~/.config/lyvi/lyvi.conf

bg_local = False
ui_hidden = False
bg = True
bg_type = both
bg_color = 000000
bg_opacity = 0.5

And I'm running urxvt with:

URxvt.background: #000000
URxvt.foreground: #acacab

I change songs with ncmpcpp. I've already tried deleting my .Xresources to use standard urxvt.

Last edited by rodyaj (2013-02-11 15:22:34)

Offline

#169 2013-02-11 17:10:21

OK100
Member
From: [U==]
Registered: 2010-04-26
Posts: 455

Re: Lyvi - command-line lyrics (and more!) viewer

rodyaj wrote:

Does lyvi grab album art off the internet if it isn't available locally? I was under the impression it does, but I can't see any images.

I have lyvi-git 20130211-1 from AUR with this ~/.config/lyvi/lyvi.conf

bg_local = False
ui_hidden = False
bg = True
bg_type = both
bg_color = 000000
bg_opacity = 0.5

And I'm running urxvt with:

URxvt.background: #000000
URxvt.foreground: #acacab

I change songs with ncmpcpp. I've already tried deleting my .Xresources to use standard urxvt.

Hi,
If you aren't running lyvi in tmux, change "bg_type" option to "cover" or "backdrops". Both images can show only in tmux.

Offline

#170 2013-02-11 18:10:54

rodyaj
Member
Registered: 2009-10-13
Posts: 54

Re: Lyvi - command-line lyrics (and more!) viewer

Thanks. That fixed things. This app is just what I needed.

Last edited by rodyaj (2013-02-11 18:16:35)

Offline

#171 2013-04-08 18:51:28

Sirsurthur
Member
Registered: 2009-02-02
Posts: 124

Re: Lyvi - command-line lyrics (and more!) viewer

Hello OK100,

Thanks for your great app ! Just got a bug while listening a new song. You can find the output here : http://pastebin.com/iN5vULN6

Thanks again and best regards,

Offline

#172 2013-04-15 12:09:19

archer@heart
Member
Registered: 2012-09-13
Posts: 4

Re: Lyvi - command-line lyrics (and more!) viewer

Firstly, thanks a lot for making lyvi! I love it smile
Looking at so many .lyric files in the song folder somehow bugs me...
Can you add an option to save all lyrics in one central directory, the way lyrics are stored in NCMPCPP maybe?
That way even multiple copies of same song can access same lyric file. Even the syntax of "Artist - Title" as the filename seems better to me.


i3 @ Dell Studio 1555
Follow your Arch!

Offline

#173 2013-04-18 08:25:34

OK100
Member
From: [U==]
Registered: 2010-04-26
Posts: 455

Re: Lyvi - command-line lyrics (and more!) viewer

Sirsurthur wrote:

Hello OK100,

Thanks for your great app ! Just got a bug while listening a new song. You can find the output here : http://pastebin.com/iN5vULN6

Thanks again and best regards,

I'm currently working on a new version of Lyvi which will have this bug fixed.

archer@heart wrote:

Firstly, thanks a lot for making lyvi! I love it smile
Looking at so many .lyric files in the song folder somehow bugs me...
Can you add an option to save all lyrics in one central directory, the way lyrics are stored in NCMPCPP maybe?
That way even multiple copies of same song can access same lyric file. Even the syntax of "Artist - Title" as the filename seems better to me.

Actually, lyric saving feature is a tad confusing. Lyvi never reads anything from saved .lyric files. Instead it uses a database at ~/.local/share/lyvi/metadata.db where it also saves backgrounds. By the way, do you use lyric files for anything else? I can add saving to one directory if you still need it.

Offline

#174 2013-04-19 09:46:16

archer@heart
Member
Registered: 2012-09-13
Posts: 4

Re: Lyvi - command-line lyrics (and more!) viewer

OK100 wrote:

Lyvi never reads anything from saved .lyric files. Instead it uses a database at ~/.local/share/lyvi/metadata.db where it also saves backgrounds. By the way, do you use lyric files for anything else? I can add saving to one directory if you still need it.

I recall that it was Lyvi who stored those local lyric files. Please add the feature to add the lyrics to one directory or to use lyrics from an existing directory.
NCMPCPP stores same lyrics in .txt format, so an ability to read from .txt files would help.


i3 @ Dell Studio 1555
Follow your Arch!

Offline

#175 2013-05-15 07:00:47

Idlusen
Member
From: France
Registered: 2013-05-15
Posts: 21

Re: Lyvi - command-line lyrics (and more!) viewer

Hi,

I modified Lyvi a tiny bit so that it can support foobar2000 (with control).

Since it is not a native player (although worth using in my opinion), and since my solution is a dirty hack, is it of any use giving it?

Offline

Board footer

Powered by FluxBB