LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 02-08-2018, 01:31 AM   #1
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Media Player Info script for your panel


Called without arguments, it returns the title (filled as intelligently as
possible, whether it's a network stream or a file without metadata) of the
currently playing song to stdout, clipped and ellipsized to a width of 60
chars, and a more verbose tooltip to stderr.

it can show an icon in addition to the text, send notifications on song change,
provide player controls and more.

continue reading...

I made this when tint2 introduced a plugin to display the output of an external command.
that was 2 years ago and i've been using it ever since.

Music is almost always playing on my system, and often I need a quick glance at who is playing without having to minimize or open windows. The panel/taskbar is the perfect place for that.

recently i overhauled the script thoroughly, and is absolutely stable on my system.
it is not depending on tint2.
it currently supports mpd, audacious and mocp audio players.
it can start & stop playback (with icons) and show the UI.

i think this could be useful for others, too.

the multiple player support is confusing, but only in theory (because in practice you will most likely settle on one).

I would love to get some testing on other systems (debian based, mostly; i'm using archlinux), and, more importantly, what you think about it:
  • does it have too many features? or too little?
  • does it have something unique for you, that you cannot reproduce with your media player's own features?
  • is something important missing?

https://github.com/ohnonot/media-player-info

Last edited by ondoho; 02-10-2018 at 04:03 PM.
 
Old 02-11-2018, 03:34 PM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872

Original Poster
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
there have been a few commits meanwhile; i added support for notification on song change, and album art display in the notification or in the panel output itself.
everything is configurable with command line options.
 
1 members found this post helpful.
Old 02-17-2018, 02:43 PM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872

Original Poster
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
the script can now also extract album art from local files.
i also fixed a glitch where enabling the -I option actually disabled the display of normal play/pause/stop icons, and improved mpd title recognition for e.g. soundcloud playlists.

somebody asked about openBSD support; it seems the BSDs don't ship with some fairly standard linux utilities. the missing pidof completely breaks the script.
anybody have an idea how i can reproduce this command:
pidof mediaplayer >/dev/null 2>&1
with utilities that are available both on bsd & linux? without using pipes or too much additional logic?
the script just needs to know whether the media player is running.

i have updated the list of dependencies and will see what i can do about it.

Last edited by ondoho; 02-18-2018 at 01:47 AM.
 
Old 02-19-2018, 08:04 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872

Original Poster
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
more bugfixing.
i already found one feature-creep-regression-sort-of bug!
i also started going throught he script with shellcheck, found a plain typo, and surely there'll be more commits for general code cleanup.

would still love some input on the openbsd thing.
 
Old 06-21-2018, 08:04 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872

Original Poster
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
I have moved all my repositories to https://framagit.org/ohnonot and https://notabug.org/ohnonot
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Raspberry Pi CM3 fuels touch panel and network media player LXer Syndicated Linux News 0 10-28-2017 01:19 AM
LXer: Hack Your Media Player - Neuros OSD Open Source Media Player LXer Syndicated Linux News 0 01-21-2008 05:40 AM
media player script mobilemonkey Linux - Software 7 06-09-2007 04:58 PM
Default Media Player Not Playing Windows Media Player Files kenlitting SUSE / openSUSE 2 11-29-2006 11:05 AM
Best media player (one without script controls) xspartanx117x Linux - Newbie 1 09-01-2005 09:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 07:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration