From 5948bab4ec817e5887fed9fa375da81207560794 Mon Sep 17 00:00:00 2001 From: Mel Date: Fri, 6 Jun 2025 00:53:57 +0200 Subject: Patch yubikey-touch-detector for better message and icon Signed-off-by: Mel --- pkgs/default.nix | 2 ++ pkgs/yubikey-touch-detector/default.nix | 14 ++++++++++++++ pkgs/yubikey-touch-detector/touch.svg | 18 ++++++++++++++++++ .../yubikey-touch-detector.patch | 16 ++++++++++++++++ 4 files changed, 50 insertions(+) create mode 100644 pkgs/yubikey-touch-detector/default.nix create mode 100644 pkgs/yubikey-touch-detector/touch.svg create mode 100644 pkgs/yubikey-touch-detector/yubikey-touch-detector.patch (limited to 'pkgs') diff --git a/pkgs/default.nix b/pkgs/default.nix index 642ebc9..ddaf684 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -16,4 +16,6 @@ youcompleteme = pkgs.callPackage ./youcompleteme.nix { }; wine = pkgs.callPackage ./wine.nix { }; + + yubikey-touch-detector = pkgs.callPackage ./yubikey-touch-detector { }; } diff --git a/pkgs/yubikey-touch-detector/default.nix b/pkgs/yubikey-touch-detector/default.nix new file mode 100644 index 0000000..a1642ec --- /dev/null +++ b/pkgs/yubikey-touch-detector/default.nix @@ -0,0 +1,14 @@ +{ yubikey-touch-detector, ... }: + +yubikey-touch-detector.overrideAttrs (attrs: { + patches = [ ./yubikey-touch-detector.patch ]; + + postInstall = + (attrs.postInstall or "") + + '' + rm $out/share/icons/hicolor/128x128/apps/yubikey-touch-detector.png + + install -Dm444 -T ${./touch.svg} \ + $out/share/icons/hicolor/scalable/apps/yubikey-touch-symbolic.svg + ''; +}) diff --git a/pkgs/yubikey-touch-detector/touch.svg b/pkgs/yubikey-touch-detector/touch.svg new file mode 100644 index 0000000..739730d --- /dev/null +++ b/pkgs/yubikey-touch-detector/touch.svg @@ -0,0 +1,18 @@ + + + + + diff --git a/pkgs/yubikey-touch-detector/yubikey-touch-detector.patch b/pkgs/yubikey-touch-detector/yubikey-touch-detector.patch new file mode 100644 index 0000000..084874a --- /dev/null +++ b/pkgs/yubikey-touch-detector/yubikey-touch-detector.patch @@ -0,0 +1,16 @@ +--- a/notifier/libnotify.go ++++ b/notifier/libnotify.go +@@ -32,9 +32,10 @@ func SetupLibnotifyNotifier(notifiers *sync.Map) { + } + + notification := notify.Notification{ +- AppName: "yubikey-touch-detector", +- AppIcon: "yubikey-touch-detector", +- Summary: "YubiKey is waiting for a touch", ++ AppName: "YubiKey", ++ AppIcon: "yubikey-touch-symbolic", ++ Summary: "Waiting for touch", ++ Body: "Confirm presence by touching your YubiKey.", + } + + reset := func(msg *notify.NotificationClosedSignal) { -- cgit 1.4.1