Disable gtk2 notifications

Dependency resolution has become a nightmare. Need to rewrite with a
better supported library.
This commit is contained in:
John Mertz 2022-04-19 00:24:18 -04:00 committed by John Mertz
parent 32e58ff147
commit c74d63c577
Signed by: jpm
GPG Key ID: E9C5EA2D867501AB
1 changed files with 3 additions and 14 deletions

View File

@ -353,22 +353,9 @@ if ($silent) {
foreach (@output) { foreach (@output) {
$concat .= $_; $concat .= $_;
} }
#use Desktop::Notify; =pod
#my $notify = Desktop::Notify->new();
use Gtk2::Notify -init, "Backlight"; use Gtk2::Notify -init, "Backlight";
my $notification = Gtk2::Notify::new('Backlight', $concat, '', "notification-display-brightness"); my $notification = Gtk2::Notify::new('Backlight', $concat, '', "notification-display-brightness");
#my $notification = $notify->create(
#'timeout' => $duration,
#'summary' => "Brightness",
#'body' => $concat,
#'hints' => {
##'urgency' => 'NOTIFY_URGENCY_LOW',
#'x-canonical-private-synchronous' => 'blc',
#'value' => (split('%',$concat))[0] || 0
#}
#);
#$notification->show;
#exit;
$notification->set_hint_string('x-canonical-private-synchronous','blc'); $notification->set_hint_string('x-canonical-private-synchronous','blc');
$notification->set_urgency('NOTIFY_URGENCY_LOW'); $notification->set_urgency('NOTIFY_URGENCY_LOW');
@ -388,6 +375,8 @@ if ($silent) {
. ' --hint=int:value:' . (split('%',$concat))[0] . ' --hint=int:value:' . (split('%',$concat))[0]
. ' --expire-time=' . $duration . ' --expire-time=' . $duration
. ' "' . $concat . "\""; . ' "' . $concat . "\"";
=cut
exit(); exit();
} else { } else {
print foreach @output; print foreach @output;