diff --git a/docs/binary.rst b/docs/binary.rst index 4b60736fe..b88ead069 100644 --- a/docs/binary.rst +++ b/docs/binary.rst @@ -41,7 +41,7 @@ Desktop integration on Linux -------------------------------- If you want the kitty icon to appear in the taskbar and an entry for it to be -present in the menus, you will need to install the :file:`kitty.desktop` file. +present in the menus, you will need to install the :file:`kitty-terminal.desktop` file. The details of the following procedure may need to be adjusted for your particular desktop, but it should work for most major desktop environments. @@ -50,18 +50,18 @@ particular desktop, but it should work for most major desktop environments. # Create symbolic links to add kitty and kitten to PATH (assuming ~/.local/bin is in # your system-wide PATH) ln -sf ~/.local/kitty.app/bin/kitty ~/.local/kitty.app/bin/kitten ~/.local/bin/ - # Place the kitty.desktop file somewhere it can be found by the OS - cp ~/.local/kitty.app/share/applications/kitty.desktop ~/.local/share/applications/ + # Place the kitty-terminal.desktop file somewhere it can be found by the OS + cp ~/.local/kitty.app/share/applications/kitty-terminal.desktop ~/.local/share/applications/ # If you want to open text files and images in kitty via your file manager also add the kitty-open.desktop file cp ~/.local/kitty.app/share/applications/kitty-open.desktop ~/.local/share/applications/ - # Update the paths to the kitty and its icon in the kitty.desktop file(s) + # Update the paths to the kitty and its icon in the kitty desktop file(s) sed -i "s|Icon=kitty|Icon=/home/$USER/.local/kitty.app/share/icons/hicolor/256x256/apps/kitty.png|g" ~/.local/share/applications/kitty*.desktop sed -i "s|Exec=kitty|Exec=/home/$USER/.local/kitty.app/bin/kitty|g" ~/.local/share/applications/kitty*.desktop .. note:: In :file:`kitty-open.desktop`, kitty is registered to handle some supported MIME types. This will cause kitty to take precedence on some systems where - the default apps are not explicitly set. For example, you expect to use + the default apps are not explicitly set. For example, if you expect to use other GUI file managers to open dir paths when using commands such as :program:`xdg-open`, you should configure the default opener for the MIME type ``inode/directory``:: diff --git a/setup.py b/setup.py index 46367d9f8..f4a3fab39 100755 --- a/setup.py +++ b/setup.py @@ -1340,7 +1340,7 @@ def create_linux_bundle_gunk(ddir: str, args: Options) -> None: shutil.copy2(f'logo/kitty.{ext}', icdir) deskdir = os.path.join(ddir, 'share', 'applications') safe_makedirs(deskdir) - with open(os.path.join(deskdir, 'kitty.desktop'), 'w') as f: + with open(os.path.join(deskdir, 'kitty-terminal.desktop'), 'w') as f: f.write( '''\ [Desktop Entry] @@ -1350,11 +1350,11 @@ Name=kitty GenericName=Terminal emulator Comment=Fast, feature-rich, GPU based terminal TryExec=kitty +StartupNotify=true Exec=kitty Icon=kitty Categories=System;TerminalEmulator; -''' - ) +''') with open(os.path.join(deskdir, 'kitty-open.desktop'), 'w') as f: f.write( '''\ @@ -1364,14 +1364,14 @@ Type=Application Name=kitty URL Launcher GenericName=Terminal emulator Comment=Open URLs with kitty +StartupNotify=true TryExec=kitty Exec=kitty +open %U Icon=kitty Categories=System;TerminalEmulator; NoDisplay=true MimeType=image/*;application/x-sh;application/x-shellscript;inode/directory;text/*;x-scheme-handler/kitty;x-scheme-handler/ssh; -''' - ) +''') if os.path.exists(in_src_launcher): os.remove(in_src_launcher)