You are not logged in.

#1 2018-07-26 18:11:03

1337M0nst3r
Member
Registered: 2018-07-26
Posts: 2

How to get the current song played by MOC?

Hi, is my first time posting here so bear with me.
Straight to the subject: until today I used to display the current song played by VLC in the i3 status bar because the song was displayed on the window title so I could use wmctrl to list all windows get the one with VLC as title and just show it in the status bar through a custom i3status script.
But MOC(music on the terminal) doesn't display the current song played in the title nor is there anything in the man page which allows me to get the current song, this forum is my last resort, if you have any ideas on what I can do or if you are certain that is impossible please tell me.
Cheers smile


“Hard work betrays none, but dreams betray many. working hard alone doesn't assure you that you'll achieve your dreams. actually there are more cases where you don't. even so, working hard and achieving something is some consolation at least.”
― Hikigaya Hachiman

Offline

#2 2018-07-26 18:23:54

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: How to get the current song played by MOC?

'mocp -Q %title' (or %song) doesn't work?

man mocp wrote:

-Q FORMAT_STRING, --format FORMAT_STRING
              Print information about the file currently being played using a format
              string.  Replace string sequences with the actual information:

                       %state     State
                       %file      File
                       %title     Title
                       %artist    Artist
                       %song      SongTitle
                       %album     Album
                       %tt        TotalTime
                       %tl        TimeLeft
                       %ts        TotalSec
                       %ct        CurrentTime
                       %cs        CurrentSec
                       %b         Bitrate
                       %r         Rate

Last edited by 2ManyDogs (2018-07-26 18:26:13)

Offline

#3 2018-07-27 13:18:21

1337M0nst3r
Member
Registered: 2018-07-26
Posts: 2

Re: How to get the current song played by MOC?

I don't know how I missed that option in the man page. Thank you very much for helping me!


“Hard work betrays none, but dreams betray many. working hard alone doesn't assure you that you'll achieve your dreams. actually there are more cases where you don't. even so, working hard and achieving something is some consolation at least.”
― Hikigaya Hachiman

Offline

#4 2018-07-27 14:08:17

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,718
Website

Re: How to get the current song played by MOC?

Please remember to mark your thread as solved, by editing the first post and amending the topic title.

https://wiki.archlinux.org/index.php/Co … ow_to_post


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB