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

now playing global hotkey

Tags: None
(comma "," separated)
wegface
Karma
0

now playing global hotkey

Fri Nov 25, 2005 1:34 pm
Hi all, any possibility to add a global hotkey function for copying/pasting the song name/ artist to any place...meaning that wouldnt even be needed to have anykind of plugins installed for spamming the songname to chat in apps like valknut.
Hope u understand me. lol
User avatar
marcel
Registered Member
Posts
595
Karma
0
OS

Re:now playing global hotkey

Fri Nov 25, 2005 3:23 pm
Take a look at the DCOP interface (see the Wiki), it does everything you want!
wegface
Karma
0

Re:now playing global hotkey

Fri Nov 25, 2005 8:18 pm
Ok i looked at the wiki. Obviously im not too smart. Anyone give me some kind of example?
Mika
Karma
0

Re:now playing global hotkey

Fri Nov 25, 2005 8:26 pm
Feeling stupid also;

I would love to get an example of a script which can do the thing what wegface wants. :)
User avatar
oggb4mp3
Registered Member
Posts
166
Karma
0

Re:now playing global hotkey

Sat Nov 26, 2005 4:36 am
[code:1]
#!/usr/bin/perl
#small perl script to display current track playing in amaroK

chomp ($ARTIST=`dcop amarok player artist`);
chomp ($TITLE=`dcop amarok player title`);
chomp ($ALBUM=`dcop amarok player album`);
chomp ($CTIME=`dcop amarok player currentTime`);
chomp ($TTIME=`dcop amarok player totalTime`);
chomp ($SCORE=`dcop amarok player score`);

print \"oggb4mp3 is listening to - \\\"$TITLE\\\" by $ARTIST ($ALBUM) [$SCORE]\\n\";
[/code:1]
User avatar
oggb4mp3
Registered Member
Posts
166
Karma
0

Re:now playing global hotkey

Sat Nov 26, 2005 4:37 am
or if you prefer bash

[code:1]
#!/bin/bash
#small bash script to display current track playing in amaroK

ARTIST=`dcop amarok player artist`;
TITLE=`dcop amarok player title`;
ALBUM=`dcop amarok player album`;
CTIME=`dcop amarok player currentTime`;
TTIME=`dcop amarok player totalTime`;
SCORE=`dcop amarok player score`;

echo \"oggb4mp3 is listening to - \\\"$TITLE\\\" by $ARTIST ($ALBUM) [$SCORE]\";
[/code:1]
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS

Re:now playing global hotkey

Mon Nov 28, 2005 8:14 pm
Could anyone give a hint how to copy that information to the clipboard? ^^


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
User avatar
oggb4mp3
Registered Member
Posts
166
Karma
0

Re:now playing global hotkey

Tue Nov 29, 2005 2:25 pm
uhm, highlight and ctrl-c or the unix middle button trick.
User avatar
Hans
Administrator
Posts
3304
Karma
24
OS

Re:now playing global hotkey

Fri Dec 02, 2005 8:51 pm
oggb4mp3 wrote:
uhm, highlight and ctrl-c or the unix middle button trick.


I meant something like a global key. [key] would copy the text to clipboard, and then you\'ll be able to paste it anywhere.


Problem solved? Please click on "Accept this answer" below the post with the best answer to mark your topic as solved.

10 things you might want to do in KDE | Open menu with Super key | Mouse shortcuts
wegface
Karma
0

Re:now playing global hotkey

Wed Dec 14, 2005 12:29 pm
yes this is exactly wot i wanted too.
User avatar
markey
KDE Developer
Posts
2286
Karma
3
OS

Re:now playing global hotkey

Wed Dec 14, 2005 12:35 pm
DCOP + KHotKeys


--
Mark Kretschmann - Amarok Developer


Bookmarks



Who is online

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