From 9509c15ac3308f179b1d55eb8ebf1ddd4d39e4c1 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Fri, 19 Sep 2025 22:41:40 +0800 Subject: [PATCH] fix: telegram - for niri to recognize the app ID(WIP) --- hardening/nixpaks/firefox.nix | 2 +- hardening/nixpaks/qq.nix | 2 +- hardening/nixpaks/telegram-desktop.nix | 13 +++++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/hardening/nixpaks/firefox.nix b/hardening/nixpaks/firefox.nix index df0a3ea7..2d68b7de 100644 --- a/hardening/nixpaks/firefox.nix +++ b/hardening/nixpaks/firefox.nix @@ -99,10 +99,10 @@ buildEnv { genericName = "Firefox Boxed"; comment = "Firefox Browser"; exec = "${exePath} %U"; + terminal = false; icon = "firefox"; startupNotify = true; startupWMClass = "firefox"; - terminal = false; type = "Application"; categories = [ "Network" diff --git a/hardening/nixpaks/qq.nix b/hardening/nixpaks/qq.nix index feaa1dde..d186bfd7 100644 --- a/hardening/nixpaks/qq.nix +++ b/hardening/nixpaks/qq.nix @@ -74,9 +74,9 @@ buildEnv { genericName = "QQ Boxed"; comment = "Tencent QQ, also known as QQ, is an instant messaging software service and web portal developed by the Chinese technology company Tencent."; exec = "${exePath} %U"; - startupNotify = true; terminal = false; icon = "${qq}/share/icons/hicolor/512x512/apps/qq.png"; + startupNotify = true; startupWMClass = "QQ"; type = "Application"; categories = [ diff --git a/hardening/nixpaks/telegram-desktop.nix b/hardening/nixpaks/telegram-desktop.nix index 52d3041a..1f9445d5 100644 --- a/hardening/nixpaks/telegram-desktop.nix +++ b/hardening/nixpaks/telegram-desktop.nix @@ -62,6 +62,8 @@ buildEnv { tryExec = "${exePath}"; exec = "${exePath} -- %u"; icon = appId; + startupNotify = true; + startupWMClass = appId; terminal = false; type = "Application"; categories = [ @@ -83,8 +85,19 @@ buildEnv { "sms" "tdesktop" ]; + actions = { + quit = { + name = "Quit Telegram"; + exec = "${exePath} -quit"; + icon = "application-exit"; + }; + }; extraConfig = { X-Flatpak = appId; + DBusActivatable = "true"; + SingleMainWindow = "true"; + X-GNOME-UsesNotifications = "true"; + X-GNOME-SingleWindow = "true"; }; }) ];