UI-Dialog
view release on metacpan or search on metacpan
lib/UI/Dialog/Backend/Nautilus.pm view on Meta::CPAN
my $self = shift();
if ($self->_is_env()) {
#: Width, Height, X, Y
return($1,$2,$3,$4) if $ENV{'NAUTILUS_SCRIPT_WINDOW_GEOMETRY'} =~ /(\d+)x(\d+)\+(\d+)\+(\d+)/;
} else { return(0,0,0,0); }
}
sub _get_desktop_dir {
my $self = shift();
# Figure out the user's home directory
my @user = getpwuid($>);
my $home = undef;
if (@user > 7 && -d $user[7]) {
$home = $user[7];
}
# check for XDG paths to home directory
my $xdg_desktop_dir = $ENV{XDG_DESKTOP_DIR} || undef;
if (defined $xdg_desktop_dir && -d $xdg_desktop_dir) {
return $xdg_desktop_dir;
}
my $xdg_config_home = $ENV{XDG_CONFIG_HOME} || $home.'/.config';
( run in 0.275 second using v1.01-cache-2.11-cpan-8d75d55dd25 )