From 3802db3c96112527244271e9e19d7afd6eeb0980 Mon Sep 17 00:00:00 2001 From: John Mertz Date: Tue, 19 Apr 2022 00:24:18 -0400 Subject: [PATCH] Disable gtk2 notifications Dependency resolution has become a nightmare. Need to rewrite with a better supported library. --- thinkpad/blc.pl | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/thinkpad/blc.pl b/thinkpad/blc.pl index 07f912b..0514b47 100755 --- a/thinkpad/blc.pl +++ b/thinkpad/blc.pl @@ -353,22 +353,9 @@ if ($silent) { foreach (@output) { $concat .= $_; } - #use Desktop::Notify; - #my $notify = Desktop::Notify->new(); +=pod use Gtk2::Notify -init, "Backlight"; 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_urgency('NOTIFY_URGENCY_LOW'); @@ -388,6 +375,8 @@ if ($silent) { . ' --hint=int:value:' . (split('%',$concat))[0] . ' --expire-time=' . $duration . ' "' . $concat . "\""; +=cut + exit(); } else { print foreach @output;