This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Display OSD from command line

Tags: None
(comma "," separated)
nitro322
Registered Member
Posts
8
Karma
0

Display OSD from command line

Fri Aug 21, 2009 8:56 pm
Does anyone know of a way to display the OSD (current song info) from the command line or from a script? I used to use dcop to do this in the 1.x versions, but since Amarok switched to using dbus for 2.0 I haven't been able to find another way of doing this.

I use xbindkeys for various shortcuts and hotkeys. I've been able to switch over to dbus for most of the hotkeys I use for Amarok, such as Play, Stop, etc. However, I haven't been able to find a dbus method for displaying the OSD. Any tips would be appreciated.

Thanks.
nitro322
Registered Member
Posts
8
Karma
0

Re: Display OSD from command line

Sun Oct 04, 2009 6:56 am
I just upgraded to 2.2 and noticed that this functionality has now been implemented. Sweet! For anyone else that may have been missing this functionality, this will do the trick:

dbus-send --type=method_call --dest=org.kde.amarok /Player org.freedesktop.MediaPlayer.ShowOSD

One difference I've noticed compared to the old dcop implementation is that the dbus always displays the OSD whereas the dcop implementation acted as a toggle. Eg., if the OSD was already displayed, then calling it would hide rather than show the OSD. This could be handy if, for example, the OSD popped up during a track change and covers a spot on the screen that you're currently using.

Any chance this functionality could also be reimplemented? I'll probably file a bug/wish report later, but I'm curious if there's been any discussion on this so far.
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS

Re: Display OSD from command line

Tue Oct 06, 2009 10:46 am
nitro322 wrote:I just upgraded to 2.2 and noticed that this functionality has now been implemented. Sweet! For anyone else that may have been missing this functionality, this will do the trick:

dbus-send --type=method_call --dest=org.kde.amarok /Player org.freedesktop.MediaPlayer.ShowOSD

One difference I've noticed compared to the old dcop implementation is that the dbus always displays the OSD whereas the dcop implementation acted as a toggle. Eg., if the OSD was already displayed, then calling it would hide rather than show the OSD. This could be handy if, for example, the OSD popped up during a track change and covers a spot on the screen that you're currently using.

Any chance this functionality could also be reimplemented? I'll probably file a bug/wish report later, but I'm curious if there's been any discussion on this so far.


Well, we could either change the behavior of the existing function (risky, some scripts might depend on it), or add something like "ToggleOSD".

It's fairly low priority, but you could request it.


--
Mark Kretschmann - Amarok Developer


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot]