#!/usr/bin/perl # (c) 2019 Christian Birchinger # This tiny piece of software is distributed under the terms of the GNU General Public License v2. use utf8; use Gtk3 -init; my $clip = Gtk3::Clipboard::get( Gtk3::Gdk::Atom::intern( 'CLIPBOARD', FALSE ) ); my $text = $clip->wait_for_text; my $window = Gtk3::Window->new ('toplevel'); $window->set_position( 'mouse' ); $window->set_decorated(0); $window->set_skip_taskbar_hint(1); $window->set_skip_pager_hint(1); $window->set_accept_focus(0); my $label = Gtk3::Label->new (); $label->set_markup("${text}"); $window->add ($label); $window->show_all; $window->signal_connect (destroy => sub { Gtk3->main_quit; }); $window->signal_connect('key-press-event' => sub { Gtk3->main_quit; }); $window->signal_connect('button-press-event' => sub { Gtk3->main_quit; }); $window->set_border_width(10); Gtk3::main;