nix-config/home/eww.nix
Donovan Glover a6f2c58d51
meta: Don't hardcode home directory
This is a much better way of handling things.
2024-04-04 19:39:35 -04:00

59 lines
1.6 KiB
Nix

{ pkgs, config, ... }:
let
inherit (config.home) homeDirectory;
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 "${homeDirectory}/")
(icon :img "default-folder-documents" :exec "${homeDirectory}/")
(icon :img "default-folder-music" :exec "${homeDirectory}/")
(icon :img "default-folder-pictures" :exec "${homeDirectory}/")
(icon :img "default-folder-video" :exec "${homeDirectory}/")))
(defwidget icon [img exec]
(eventbox :cursor "pointer" :onclick "lnch thunar ''${exec}" :tooltip "''${exec}"
(image :path "/run/current-system/sw/share/eww/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: #f8f8f2;
font-weight: bold;
text-shadow: 0 0 0.075em #272822;
font-size: 32px;
opacity: 0.1;
}
'';
}