diff --git a/xfce-xterm-launcher-update b/xfce-xterm-launcher-update index ffa3702..798f660 100755 --- a/xfce-xterm-launcher-update +++ b/xfce-xterm-launcher-update @@ -8,6 +8,7 @@ use Data::Dumper; use experimental qw(autoderef); my $launcher = $ARGV[0]; +my $verbose = 0; my $launcher_dir = "$ENV{HOME}/.config/xfce4/panel/launcher-$launcher"; @@ -32,7 +33,7 @@ for my $xterm_script (@xterm_scripts) { if ($desktop_files{$name}{content_fields}{Icon} ne $icon_file) { $desktop_files{$name}{content_fields}{Icon} = $icon_file; replace($desktop_files{$name}); - say STDERR "replaced desktop entry $desktop_files{$name}{filename} for $name"; + say STDERR "replaced desktop entry $desktop_files{$name}{filename} for $name" if $verbose; } } else { @@ -49,7 +50,7 @@ for my $xterm_script (@xterm_scripts) { current => 1 }; replace($desktop_files{$name}); - say STDERR "created new desktop entry $desktop_files{$name}{filename} for $name"; + say STDERR "created new desktop entry $desktop_files{$name}{filename} for $name" if $verbose; } } @@ -57,7 +58,7 @@ $desktop_files{XTerm}{current} = 1; # we always want that for my $name (sort keys %desktop_files) { unless ($desktop_files{$name}{current}) { - say STDERR "deleting obsolete desktop entry $desktop_files{$name}{filename} for $name"; + say STDERR "deleting obsolete desktop entry $desktop_files{$name}{filename} for $name" if $verbose; unlink($desktop_files{$name}{filename}); } }