Commit e44adee

HPCesia <me@hpcesia.com>
2025-07-29 15:01:01
feat(app): add pot
1 parent db51fa1
Changed files (3)
home
home/linux/gui/plasma/options/shortcuts.nix
@@ -1,5 +1,14 @@
 {...}: {
-  programs.plasma.shortcuts = {
-    "services/org.wezfurlong.wezterm.desktop"._launch = "Meta+`";
+  programs.plasma = {
+    shortcuts = {
+      "services/org.wezfurlong.wezterm.desktop"._launch = "Meta+`";
+    };
+    hotkeys.commands = {
+      pot = {
+        comment = "Pot 划词翻译";
+        command = "curl \"127.0.0.1:60828/selection_translate\"";
+        key = "Meta+Alt+Q";
+      };
+    };
   };
 }
home/linux/gui/plasma/options/windowrules.nix
@@ -0,0 +1,12 @@
+{...}: {
+  programs.plasma.window-rules = [
+    {
+      description = "Pot";
+      match = {
+        window-class.value = "pot";
+        window-types = ["normal"];
+      };
+      apply.noborder.value = true;
+    }
+  ];
+}
home/linux/gui/misc.nix
@@ -31,6 +31,7 @@ in {
     cherrystudio
     obs-studio
     gimp3
+    pot
   ];
 
   # allow fontconfig to discover fonts and configurations installed through home.packages