Skip to content

Commit

Permalink
revert: feat(kitty): use alternate outrun icon on linux
Browse files Browse the repository at this point in the history
This reverts commit 93664a0.
  • Loading branch information
water-sucks committed Nov 3, 2024
1 parent dae5383 commit 9470607
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions home/profiles/apps/kitty.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,23 @@
rev = "7f631a61bcbdfb268cdf1c97992a5c077beec9d6";
hash = "sha256-AXU1KOXaEiAMTkgkR+yVc8g4FZq8TqXj9imswCHhNKc=";
};

pngIcon = "${icons}/build/outrun.iconset/icon_256x256.png";
icnsIcon = "${icons}/build/neue_outrun.icns";
icon = "${icons}/build/neue_outrun.icns";

fileicon =
if pkgs.stdenv.system == "aarch64-darwin"
then "/opt/homebrew/bin/fileicon"
else "/usr/local/bin/fileicon";

linuxPackage = pkgs.kitty.overrideAttrs (o: {
postInstall =
(o.postInstall or "")
+ ''
cp -f "${pngIcon}" "$out/share/icons/hicolor/256x256/apps/kitty.png"
rm -f $out/share/icons/hicolor/scalable/apps/kitty.svg
'';
});

c = config.colorscheme.palette;
in
lib.mkMerge [
{
programs.kitty = {
enable = true;
package =
package = with pkgs;
if isLinux
then linuxPackage
else pkgs.runCommand "kitty-0.0.0" {} "mkdir $out";
then kitty
else runCommand "kitty-0.0.0" {} "mkdir $out";
settings = {
font_family = "BlexMono Nerd Font";
bold_font = "BlexMono Nerd Font Bold";
Expand Down Expand Up @@ -108,7 +97,7 @@ in
home.activation.setKittyIcon = lib.hm.dag.entryAfter ["writeBoundary"] ''
original_sum=$(sha256sum /Applications/kitty.app/Contents/Resources/kitty.icns)
${fileicon} -q set /Applications/kitty.app ${icnsIcon}
${fileicon} -q set /Applications/kitty.app ${icon}
if [ "$original_sum" != "$(sha256sum /Applications/kitty.app/Contents/Resources/kitty.icns)" ]; then
killall Dock && killall Finder
Expand Down

0 comments on commit 9470607

Please sign in to comment.