View previous topic :: View next topic |
Author |
Message |
Boshu n00b
Joined: 27 Dec 2007 Posts: 22
|
Posted: Sun Feb 24, 2013 10:27 pm Post subject: How to run an app with clipboard link as a parameter |
|
|
Hi!
I'm looking for a way to do the following.
After I copy a link using ctrl-c, how do I start an application in a terminal with the link stored in the clipboard as a parameter.
Example:
I copy in clipboard the text '/home/audio.mp3'. When I run 'audacious $clipboard' in terminal, audacious would open the file with the link stored in the clipboard(/home/audio.mp3).
All I need is the variable that passes the clipboard content as a parameter(if there is such a variable). In my example the variable is $clipboard but obviously it doesn't work.
Bye! _________________ Fujitsu Siemens Amilo La 1703 |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Mon Feb 25, 2013 12:09 am Post subject: |
|
|
Boshu ...
x11-misc/xclip ...
Code: | # echo $(xclip -o)
x11-misc/xclip |
Similarly as per your example:
Code: | # audacious $(xclip -o) |
The following works here (/bin/zsh)
Code: | $ alias xax='echo $(xclip -o)'
$ xax
hello
# change selection
$ xax
goodbye |
HTH & best ... khay |
|
Back to top |
|
|
|