mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-21 15:53:32 +01:00
eww: Drop
Removes complexity since we don't use eww in dwm.
This commit is contained in:
parent
c8de9b447b
commit
8164a3c0f1
79
home/eww.nix
79
home/eww.nix
@ -1,79 +0,0 @@
|
||||
{
|
||||
nixosConfig,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (nixosConfig._module.specialArgs) nix-config;
|
||||
|
||||
inherit (config.home) homeDirectory;
|
||||
inherit (config.lib.stylix.colors.withHashtag) base00 base05;
|
||||
inherit (nix-config.packages.${pkgs.system}) fluent-icons;
|
||||
|
||||
inherit (config.xdg.userDirs)
|
||||
download
|
||||
documents
|
||||
music
|
||||
pictures
|
||||
videos
|
||||
;
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [ eww ];
|
||||
|
||||
xdg.configFile = {
|
||||
"eww/eww.yuck".text = # yuck
|
||||
''
|
||||
(defwidget icons []
|
||||
(box :orientation "h" :spacing 32
|
||||
(icon :img "default-user-home" :exec "${homeDirectory}")
|
||||
(icon :img "default-folder-download" :exec "${download}")
|
||||
(icon :img "default-folder-documents" :exec "${documents}")
|
||||
(icon :img "default-folder-music" :exec "${music}")
|
||||
(icon :img "default-folder-pictures" :exec "${pictures}")
|
||||
(icon :img "default-folder-video" :exec "${videos}")))
|
||||
|
||||
(defwidget icon [img exec]
|
||||
(eventbox :cursor "pointer" :onclick "lnch thunar ''${exec}" :tooltip "''${exec}"
|
||||
(image :path "${fluent-icons}/''${img}.png" :image-width 128)))
|
||||
|
||||
(defwindow desktop-icons
|
||||
:monitor 0
|
||||
:geometry (geometry :x "32px" :anchor "bottom center"
|
||||
:y "8px")
|
||||
:stacking "bg"
|
||||
(icons))
|
||||
|
||||
(defpoll time :interval "1s"
|
||||
"date '+%H:%M'")
|
||||
|
||||
(defwindow overlay
|
||||
:monitor 0
|
||||
:geometry (geometry :y "4px" :x "8px" :anchor "bottom right")
|
||||
:stacking "fg"
|
||||
time)
|
||||
'';
|
||||
|
||||
"eww/eww.scss".text = # scss
|
||||
''
|
||||
img {
|
||||
all: unset;
|
||||
}
|
||||
|
||||
.desktop-icons {
|
||||
all: unset;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
background: transparent;
|
||||
color: ${base05};
|
||||
font-weight: bold;
|
||||
text-shadow: 0 0 0.075em ${base00};
|
||||
font-size: 32px;
|
||||
opacity: 0.4;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
@ -1,70 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fluent-icon-theme,
|
||||
fd,
|
||||
inkscape,
|
||||
lutgen,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
|
||||
let
|
||||
lutgen' = lutgen.overrideAttrs (oldAttrs: rec {
|
||||
version = "0.8.3-unstable-2023-08-31";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ozwaldorf";
|
||||
repo = "lutgen-rs";
|
||||
rev = "transparency";
|
||||
hash = "sha256-6jaRyZsp9GVYAihE8lcslwpDtcKJfC2KZbXw0MFJNRY=";
|
||||
};
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd lutgen \
|
||||
--bash <($out/bin/lutgen completions bash) \
|
||||
--fish <($out/bin/lutgen completions fish) \
|
||||
--zsh <($out/bin/lutgen completions zsh)
|
||||
'';
|
||||
|
||||
cargoDeps = oldAttrs.cargoDeps.overrideAttrs (
|
||||
lib.const {
|
||||
name = "${oldAttrs.pname}-${version}-vendor.tar.gz";
|
||||
inherit src;
|
||||
outputHash = "sha256-GmGEq7uUvfKtMP8TyA3lnih8KuZCdd6req0fBMFoX/M=";
|
||||
}
|
||||
);
|
||||
});
|
||||
in
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "fluent-icons";
|
||||
version = "2024-01-02";
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
fd
|
||||
inkscape
|
||||
fluent-icon-theme
|
||||
lutgen'
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
cp ${fluent-icon-theme}/share/icons/Fluent/scalable/places/default-* .
|
||||
fd -e svg -x inkscape -w 128 -h 128 "{}" -o "{.}.png"
|
||||
fd -e png -x lutgen apply -o "{}" -p monokai-base16 --transparency "{}"
|
||||
|
||||
install -Dm644 *.png -t $out
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Fluent folder icons converted to png";
|
||||
homepage = "https://github.com/vinceliuice/Fluent-icon-theme";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = with lib.maintainers; [ donovanglover ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user