From 73a197fcded49b8adc5cfc1ab5aa3d4651bd3b74 Mon Sep 17 00:00:00 2001 From: pagedown Date: Sun, 6 Feb 2022 19:12:57 +0800 Subject: [PATCH] Add kitty-launcher.desktop to handle URL scheme for Linux --- setup.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/setup.py b/setup.py index c6a79d7fd..efd8378f5 100755 --- a/setup.py +++ b/setup.py @@ -967,6 +967,23 @@ TryExec=kitty Exec=kitty Icon=kitty Categories=System;TerminalEmulator; +''' + ) + with open(os.path.join(deskdir, 'kitty-launcher.desktop'), 'w') as f: + f.write( + '''\ +[Desktop Entry] +Version=1.0 +Type=Application +Name=kitty URL Launcher +GenericName=Terminal emulator +Comment=Open URLs with kitty +TryExec=kitty +Exec=kitty +open %U +Icon=kitty +Categories=System;TerminalEmulator; +NoDisplay=true +MimeType=x-scheme-handler/kitty; ''' )