1
0
forked from extern/nix-config

eww: Inline config

Note that the home manager module can't be used here since it requires
configDir.
This commit is contained in:
Donovan Glover 2023-08-11 15:05:23 -04:00
parent 93ac26652e
commit 33835aa6c6
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
3 changed files with 51 additions and 49 deletions

View File

@ -1,16 +0,0 @@
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;
}

View File

@ -1,28 +0,0 @@
(defwidget icons []
(box :orientation "h" :spacing 32
(icon :img "grey-user-home" :exec "/home/user")
(icon :img "grey-folder-download" :exec "/home/user/ダウンロード")
(icon :img "grey-folder-documents" :exec "/home/user/ドキュメント")
(icon :img "grey-folder-music" :exec "/home/user/音楽")
(icon :img "grey-folder-pictures" :exec "/home/user/画像")
(icon :img "grey-folder-video" :exec "/home/user/ビデオ")))
(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)

View File

@ -1,9 +1,55 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
programs.eww = { home.packages = with pkgs; [ eww-wayland ];
enable = true;
package = pkgs.eww-wayland; xdg.configFile."eww/eww.yuck".text = /* yuck */ ''
configDir = ../assets/eww; (defwidget icons []
}; (box :orientation "h" :spacing 32
(icon :img "grey-user-home" :exec "/home/user")
(icon :img "grey-folder-download" :exec "/home/user/")
(icon :img "grey-folder-documents" :exec "/home/user/")
(icon :img "grey-folder-music" :exec "/home/user/")
(icon :img "grey-folder-pictures" :exec "/home/user/")
(icon :img "grey-folder-video" :exec "/home/user/")))
(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;
}
'';
} }