Skip to content

Commit

Permalink
⚡ reversal icons
Browse files Browse the repository at this point in the history
  • Loading branch information
elythh committed Nov 1, 2023
1 parent c05c7f4 commit 8e6ebb4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 55 deletions.
5 changes: 3 additions & 2 deletions home/gwen/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ in
size = 11;
};
};
colorScheme = nix-colors.colorSchemes.catppuccin-mocha;
colorScheme = nix-colors.colorSchemes.material;
imports = [
nix-colors.homeManagerModules.default
# Importing Configurations
Expand Down Expand Up @@ -96,6 +96,7 @@ in
packages = with pkgs; [
(pkgs.callPackage ../../derivs/phocus.nix { inherit colors; })
(pkgs.callPackage ../shared/icons/whitesur.nix { })
(pkgs.callPackage ../shared/icons/reversal.nix { })
zjstatus.packages.${system}.default
android-tools
arandr
Expand Down Expand Up @@ -194,7 +195,7 @@ in
swww
syncthing
telegram-desktop
tessen
rofi-pass
thunderbird
tree-sitter
vault
Expand Down
69 changes: 16 additions & 53 deletions home/shared/icons/reversal.nix
Original file line number Diff line number Diff line change
@@ -1,46 +1,23 @@
{ lib
, stdenvNoCC
, fetchFromGitHub
, gtk3
, hicolor-icon-theme
, jdupes
, boldPanelIcons ? false
, blackPanelIcons ? false
, alternativeIcons ? false
, themeVariants ? [ ]
}:

let pname = "Reversal-icon-theme";
in
lib.checkListOfEnum "${pname}: theme variants" [
"default"
"purple"
"pink"
"red"
"orange"
"yellow"
"green"
"grey"
"nord"
"all"
]
themeVariants

stdenvNoCC.mkDerivation
rec {
inherit pname;
{ lib, stdenv, fetchFromGitHub, pkg-config, gdk-pixbuf, optipng, librsvg, gtk3, pantheon, gnome, gnome-icon-theme, hicolor-icon-theme, pkgs }:
stdenv.mkDerivation rec {
pname = "Reversal";
name = "Reversal";

src = fetchFromGitHub {
owner = "yeyushengfan258";
repo = pname;
repo = "Reversal-icon-theme";
rev = "bdae2ea365731b25a869fc2c8c6a1fb849eaf5b2";
sha256 = "0hfhsqpi3c569gx34vkbn70lx0g0vhkwwffcjf98vycj1j1bbpq9";
};
nativeBuildInputs = [
pkg-config
gdk-pixbuf
librsvg
pkgs.gnused
optipng
gtk3
];

nativeBuildInputs = [ gtk3 jdupes ];

buildInputs = [ hicolor-icon-theme ];

# These fixup steps are slow and unnecessary
dontPatchELF = true;
dontRewriteSymlinks = true;
dontDropIconThemeCache = true;
Expand All @@ -51,22 +28,8 @@ rec {

installPhase = ''
runHook preInstall
./install.sh --dest $out/share/icons \
--name WhiteSur \
--theme ${builtins.toString themeVariants} \
${lib.optionalString alternativeIcons "--alternative"} \
${lib.optionalString boldPanelIcons "--bold"} \
${lib.optionalString blackPanelIcons "--black"}
jdupes --link-soft --recurse $out/share
mkdir -p $out/share/icons
./install.sh -d $out/share/icons -blue
runHook postInstall
'';

meta = with lib; {
description = "Reversal style icon theme for Linux desktops";
homepage = "https://github.com/yeyushengfan258/Reversal-icon-theme";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ icy-thought ];
};

}

0 comments on commit 8e6ebb4

Please sign in to comment.