summary refs log tree commit diff
path: root/pkgs/yubikey-touch-detector
diff options
context:
space:
mode:
authorMel <mel@rnrd.eu>2025-06-06 00:53:57 +0200
committerMel <mel@rnrd.eu>2025-06-06 00:53:57 +0200
commit5948bab4ec817e5887fed9fa375da81207560794 (patch)
treef170ce380421cbffe0f1e2e30d82131c16b257e8 /pkgs/yubikey-touch-detector
parent1b6875c312bf5a0a2444b8c086a7d12d087511eb (diff)
downloadminerals-5948bab4ec817e5887fed9fa375da81207560794.tar.zst
minerals-5948bab4ec817e5887fed9fa375da81207560794.zip
Patch yubikey-touch-detector for better message and icon
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'pkgs/yubikey-touch-detector')
-rw-r--r--pkgs/yubikey-touch-detector/default.nix14
-rw-r--r--pkgs/yubikey-touch-detector/touch.svg18
-rw-r--r--pkgs/yubikey-touch-detector/yubikey-touch-detector.patch16
3 files changed, 48 insertions, 0 deletions
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 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   fill="#284c61"
+   width="24"
+   height="24"
+   viewBox="0 0 24 24"
+   version="1.1"
+   id="svg1"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg">
+  <defs
+     id="defs1" />
+  <path
+     d="M 8.2857129,9.417143 V 5.1428571 c 0,-1.5771428 1.2800001,-2.8571428 2.8571431,-2.8571428 1.577143,0 2.857143,1.28 2.857143,2.8571428 V 9.417143 C 15.382856,8.491429 16.285713,6.9257143 16.285713,5.1428571 16.285713,2.2971429 13.98857,0 11.142856,0 8.2971414,0 5.9999986,2.2971429 5.9999986,5.1428571 c 0,1.7828572 0.9028571,3.3485719 2.2857143,4.2742859 z M 19.531427,14.708571 14.342856,12.125714 C 14.14857,12.045714 13.942856,12 13.725713,12 H 12.857141 V 5.1428571 c 0,-0.9485714 -0.765714,-1.7142857 -1.714285,-1.7142857 -0.948572,0 -1.714286,0.7657143 -1.714286,1.7142857 V 17.417143 l -3.92,-0.822857 C 5.4171414,16.582857 5.3371414,16.56 5.2342843,16.56 c -0.3542857,0 -0.6742857,0.148571 -0.9028572,0.377143 L 3.42857,17.851429 9.074284,23.497143 C 9.382856,23.805714 9.817141,24 10.285713,24 h 7.76 c 0.857143,0 1.52,-0.628571 1.645714,-1.462857 l 0.857143,-6.022857 c 0.01143,-0.08 0.02286,-0.16 0.02286,-0.228572 0,-0.708571 -0.434286,-1.325714 -1.04,-1.577143 z"
+     clip-path="url(#b)"
+     id="path1"
+     style="fill:#222222;fill-opacity:1;stroke-width:1.14286" />
+</svg>
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) {