Try xclip. It saves a paste if you have your URL already in the clipboard.

URL="$(xclip -o)"
if [ "x$URL" = "x" ]; then
    echo "You must enter a url."
    exit 1
fi
...

On 05/08/14 15:37, Nils R wrote:
David Coppa schrieb am 08.05.2014 15:26:

On Thu, May 8, 2014 at 2:46 PM, Nils R <m...@hxgn.net> wrote:
Hi misc@,

i face a problem with zenity (from ports).  I use it to read a string via a
nice graphical popup (in my case, the url to a youtube video, which then gets
opened in fullscreen mplayer).

Gnome is installed on my machine, although i don't use it very often.  Anyway,
zenity has a few dependencies on gnome (see http://ports.su/x11/gnome/zenity),
and when i'm logged in to gnome, zenity starts within a second.

Now, i seldomly use gnome, but dwm instead (a simple tiling manager).  Also, i
start dwm directly with a 'xinit' from the terminal, while i use gdm for
gnome.

 From dwm, zenity takes ~7 seconds (!) to start.  The whole system is installed
on a ssd (samsung 830) for that matter.  Even worse, the startup time stays
like that, whenever i (re)start zenity, so everything the system had to load
seems to be gone immediately after the program exits.

Suggestion: ditch zenity and use yad (ports/x11/yad) instead...

my 2 cents,
David


Thanks, i just tried yad, but it needs ~7 sec to start as well (from the command
line), so no improvement :(

Nils

Reply via email to