use stylix for styling

This commit is contained in:
2025-03-12 14:49:20 +01:00
parent b007e5b232
commit 2196a1a5e8
11 changed files with 464 additions and 81 deletions

View File

@@ -168,8 +168,9 @@
monitor = [
"eDP-1, 3840x2160, 0x0, 1.5" # the internal laptop monitor
"DP-2, 3840x2160, 0x-1440, 1.5"
", preferred, auto, 1" # automatically add any newly detected monitor
# Samsung monitor at irchel (matching the description)
# "desc:Samsung Electric Company LS27D80xU HK7X800803, 3840x2160, auto-up, 1.5"
", preferred, auto-up, auto" # automatically add any newly detected monitor
];
xwayland = {

View File

@@ -4,60 +4,60 @@
...
}:
with lib; let
# load the wallpapers from the wallpapers directory - this gives a set with the folder content
dirContent = builtins.readDir ../../../wallpapers;
wallpaperString = lib.strings.concatMapStrings (x: " " + x) wallpapers;
# # load each wallpaper and keep its path (now in the nix store) as an array
# wallpapers = map (x: builtins.readDir "${../../../wallpapers}/${x.value}") dirContent;
# # load the wallpapers from the wallpapers directory - this gives a set with the folder content
# dirContent = builtins.readDir ../../../wallpapers;
# wallpaperString = lib.strings.concatMapStrings (x: " " + x) wallpapers;
# # # load each wallpaper and keep its path (now in the nix store) as an array
# # wallpapers = map (x: builtins.readDir "${../../../wallpapers}/${x.value}") dirContent;
# # wallpaperString = lib.strings.concatMapStrings (x: " " + x) wallpapers;
# script that picks a random wallpaper from the array and sets it as the desktop background
monitor = ""; # leave empty to set the wallpaper on all monitors
# # script that picks a random wallpaper from the array and sets it as the desktop background
# monitor = ""; # leave empty to set the wallpaper on all monitors
wallpaperRandomizer = pkgs.writeShellScriptBin "wallpaperRandomizer" ''
wallpaper=$(shuf -n 1 -e ${wallpaperString})
hyprctl hyprpaper unload all
hyprctl hyprpaper preload $wallpaper
hyprctl hyprpaper wallpaper "${monitor},$wallpaper"
'';
# wallpaperRandomizer = pkgs.writeShellScriptBin "wallpaperRandomizer" ''
# wallpaper=$(shuf -n 1 -e ${wallpaperString})
# hyprctl hyprpaper unload all
# hyprctl hyprpaper preload $wallpaper
# hyprctl hyprpaper wallpaper "${monitor},$wallpaper"
# '';
in {
home.packages = [wallpaperRandomizer];
# home.packages = [wallpaperRandomizer];
services.hyprpaper = {
enable = true;
settings = {
ipc = "off";
splash = false;
};
};
# settings = {
# ipc = "off";
# splash = false;
# };
# };
systemd.user = {
services.wallpaperRandomizer = {
Install = {WantedBy = ["graphical-session.target"];};
# systemd.user = {
# services.wallpaperRandomizer = {
# Install = {WantedBy = ["graphical-session.target"];};
Unit = {
Description = "Set random desktop background using hyprpaper";
After = ["graphical-session-pre.target"];
PartOf = ["graphical-session.target"];
};
# Unit = {
# Description = "Set random desktop background using hyprpaper";
# After = ["graphical-session-pre.target"];
# PartOf = ["graphical-session.target"];
# };
Service = {
Type = "oneshot";
ExecStart = "${wallpaperRandomizer}/bin/wallpaperRandomizer";
IOSchedulingClass = "idle";
};
};
# Service = {
# Type = "oneshot";
# ExecStart = "${wallpaperRandomizer}/bin/wallpaperRandomizer";
# IOSchedulingClass = "idle";
# };
# };
timers.wallpaperRandomizer = {
Unit = {Description = "Set random desktop background using hyprpaper on an interval";};
# timers.wallpaperRandomizer = {
# Unit = {Description = "Set random desktop background using hyprpaper on an interval";};
Timer = {OnUnitActiveSec = "6h";};
# Timer = {OnUnitActiveSec = "6h";};
Install = {WantedBy = ["timers.target"];};
};
};
# Install = {WantedBy = ["timers.target"];};
# };
# };
}