mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-22 00:03:55 +01:00
2297fb41e3
Having to change the package list in two places was a bit redundant. We can also use `with` patterns now since nixd warns if there are escaping variables being used. Note that variables used in multiple places are kept to make it easier to recognize that those variables must be changed together. Also note that inherit (pkgs) inside of mkMerge are currently kept to reduce the diff.
72 lines
1.8 KiB
Nix
72 lines
1.8 KiB
Nix
{ pkgs, config, ... }:
|
|
|
|
let
|
|
inherit (config.home) homeDirectory;
|
|
inherit (config.lib.stylix.colors.withHashtag) base00 base05;
|
|
|
|
inherit (config.xdg.userDirs)
|
|
download
|
|
documents
|
|
music
|
|
pictures
|
|
videos
|
|
;
|
|
|
|
fluent-icons = pkgs.callPackage ../packages/fluent-icons.nix { };
|
|
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)
|
|
'';
|
|
|
|
xdg.configFile."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;
|
|
}
|
|
'';
|
|
}
|