UI::Di...autilus(3pm)
π UI::Di...autilus β the UI::Dialog::Backend::Nautilus page, bestie edition π
okay so real quick before we dive in: this is the manual page for UI::Di...autilus(3pm), aka the perl doc for UI::Dialog::Backend::Nautilus. it's a perl module, it lives in the User Contributed Perl Documentation corner of your system, and it's literally just a lil wrapper. let's GO π¦
β¨ NAME β¨
UI::Dialog::Backend::Nautilus β it's a wrapper around the data provided by the nautilus(1). that's it, that's the whole job π
β¨ SYNOPSIS β¨
use UI::Dialog::Backend::Nautilus;
my $nautilus = new UI::Dialog::Backend::Nautilus ();
my @paths = $nautilus->paths();
look at that. three lines. gorgeous. no notes π«Ά
β¨ ABSTRACT β¨
UI::Dialog::Backend::Nautilus is simply an OOPerl wrapper around the data provided by the nautilus(1) file manager's scripts feature. that's the vibe. it wraps. it provides. it does not overcomplicate. icon behavior honestly β¨
β¨ DESCRIPTION β¨
so nautilus(1) is a GNOME file manager, and it's got this "right-click" menu situation for user made scripts (those bad boys live in your ~/.gnome2/nautilus-scripts/ directory, iykyk π). this module? it's an OOPerl interface to the environment variables that nautilus hands to your scripts at runtime.
when you use any of the UI::Dialog meta classes (UI::Dialog, UI::Dialog::GNOME, etc.) you get access to this backend through the $d->nautilus method. like, literally take the synopsis example and swap $nautilus for $d->nautilus β provided you made $d with something like my $d = new UI::Dialog....
and here's a lil secret π€«: UI::Dialog and friends only load this module the first time you actually call the $d->nautilus method. and ngl, that may silently fail β but you can test it by checking ref() for success. no cap.
β¨ EXPORT β¨
None
nothing. zero. empty. we're not exporting anything today, bestie π
β¨ INHERITS β¨
None
also nothing. it stands alone. main character energy, fr fr π
β¨ CONSTRUCTOR β¨
π« new( @options )
EXAMPLE
my $nautilus = new UI::Dialog::Backend::Nautilus ();
DESCRIPTION
this is the Class Constructor method, bestie. it takes a list of key => value pairs and uses them as the defaults when interacting with the various widgets. that's the whole thing π
RETURNS
a blessed object reference of the UI::Dialog::Backend::Nautilus class. slay β¨
β¨ METHODS β¨
πΈ path( )
EXAMPLE
my $path = $nautilus->path();
DESCRIPTION
this method examines the NAUTILUS_SCRIPT_CURRENT_URI string, uri unescapes it, strips off any prefixing protocol indicators (file://), and then returns the modified string. clean. pristine. beautiful work π
RETURNS
a SCALAR.
πΈ paths( )
EXAMPLE
my @paths = $nautilus->paths();
DESCRIPTION
this one splits the NAUTILUS_SCRIPT_SELECTED_FILE_PATHS multiline string and hands you back the ARRAY of selections β in the exact order nautilus provided them. no reordering, we respect the source π«Ά
RETURNS
an ARRAY.
πΈ uri( )
EXAMPLE
my $uri = $nautilus->uri();
DESCRIPTION
this simply returns the NAUTILUS_SCRIPT_CURRENT_URI string. simply! returns! it! that's the whole method. lowkey the most chill one here π
RETURNS
a SCALAR.
πΈ uris( )
EXAMPLE
my @uris = $nautilus->uris();
DESCRIPTION
this method splits the NAUTILUS_SCRIPT_SELECTED_URIS multiline string and returns the ARRAY of selections in the order provided by nautilus. heads up though: this does not uri escape or unescape the string. it just... gives you what you gave it. raw. unfiltered. π
RETURNS
an ARRAY.
πΈ geometry( )
EXAMPLE
my ($h,$w,$x,$y) = $nautilus->geometry();
DESCRIPTION
this method splits the NAUTILUS_SCRIPT_WINDOW_GEOMETRY string and returns an ARRAY of the geometry details provided by nautilus. the array you get back contains the following, in this exact order:
- height
- width
- X-coordinate
- Y-coordinate
so $h is height, $w is width, $x is the X-coordinate, $y is the Y-coordinate. coordinate girlies, this one's for you πβ¨
RETURNS
an ARRAY.
πΈ uri_unescape( )
EXAMPLE
my $path = $nautilus->uri_unescape( "file:///path/to/somewhere" );
my @paths = $nautilus->uri_unescape( "file:///path/to/somewhere",
"file:///yet/another/path" );
DESCRIPTION
this is the method used to unescape the NAUTILUS_SCRIPT_CURRENT_URI inside the path() method. and okay, tea time π΅: this method is derived from the URI::Escape module, which is not included in the Perl core modules β yet it is vitally necessary for the path() method to function in a useful manor. (their spelling, not mine, and I love them for it π)
RETURNS
an ARRAY or a SCALAR, depending on the calling arguments. surprise! it adapts. versatile queen π
β¨ SEE ALSO β¨
π PERLDOC
UI::DialogUI::Dialog::Backend
π MAN FILES
β¨ BUGS β¨
please email the author with any bug reports. and include the name of the module in the subject line, bestie β that's how they'll know which one you're talking about π
β¨ AUTHOR β¨
Kevin C. Krinke, <kevin@krinke.ca> π
β¨ COPYRIGHT AND LICENSE β¨
Copyright (C) 2004-2016 Kevin C. Krinke <kevin@krinke.ca>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
okay and that's the whole page!! π this version is perl v5.28.0, dated 2018-10-27, and it's the UI::Di...autilus(3pm) page from User Contributed Perl Documentation. go forth and wrap your nautilus data, bestie β you're literally so good at this πβπ
π¦ where this page comes from
- ubuntu jammy: libui-dialog-perl 1.21-0.1 Β· LGPL-2.1-or-later
- ubuntu noble: libui-dialog-perl 1.21-0.1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms