phone: Use custom backgrounds with phosh

Seems to make using phosh more interesting than without, although I'd
like to try using Hyprland again instead.
This commit is contained in:
Donovan Glover 2024-07-09 23:46:07 -04:00
parent 737d0e2d42
commit 23b970e750
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -1,7 +1,11 @@
{ self, pkgs, lib, ... }:
{ self, pkgs, lib, config, ... }:
let
inherit (builtins) attrValues;
transparency = "0.7";
getColorCh = colorName: channel: config.lib.stylix.colors."${colorName}-rgb-${channel}";
rgba = color: ''rgba(${getColorCh color "r"}, ${getColorCh color "g"}, ${getColorCh color "b"}, ${transparency})'';
in
{
imports = attrValues self.nixosModules;
@ -24,6 +28,34 @@ in
xdg-user-dirs
xresources
;
background = {
stylix.targets.gtk.extraCss = /* css */ ''
phosh-lockscreen, .phosh-lockshield {
background-image: linear-gradient(${rgba "base00"}, ${rgba "base00"}), url('file:///home/user/wall-lock.jpg');
background-size: cover;
background-position: center;
}
phosh-app-grid {
background-image: linear-gradient(${rgba "base00"}, ${rgba "base00"}), url('file:///home/user/wall-grid.jpg');
background-size: cover;
background-position: center;
}
phosh-top-panel {
background-image: linear-gradient(${rgba "base00"}, ${rgba "base00"}), url('file:///home/user/wall-panel.jpg');
background-size: cover;
background-position: center;
}
phosh-home {
background-image: linear-gradient(${rgba "base00"}, ${rgba "base00"}), url('file:///home/user/wall-home.jpg');
background-size: cover;
background-position: center;
}
'';
};
};
environment.systemPackages = attrValues {