attempt plasma flake
This commit is contained in:
parent
dac2d0cf9c
commit
012e493ad3
12 changed files with 561 additions and 5 deletions
21
flakes/de_plasma/home_manager/autostart.nix
Normal file
21
flakes/de_plasma/home_manager/autostart.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.ringofstorms.dePlasma;
|
||||
inherit (lib) mkIf;
|
||||
delayMs = cfg.monitors.scriptDelayMs;
|
||||
script = pkgs.writeShellScriptBin "plasma-kscreen-overrides" ''
|
||||
set -euo pipefail
|
||||
sleep $((${toString delayMs} / 1000)).$(( ${toString delayMs} % 1000 ))
|
||||
${lib.concatStringsSep "\n" (map (c: c) cfg.monitors.commands)}
|
||||
'';
|
||||
in
|
||||
{
|
||||
options = {};
|
||||
config = mkIf (cfg.enable && cfg.monitors.enableOverrides && cfg.monitors.commands != [ ]) {
|
||||
# Use XDG autostart
|
||||
xdg.autostart."ringofstorms-kscreen-overrides" = {
|
||||
name = "Apply monitor overrides";
|
||||
exec = "${script}/bin/plasma-kscreen-overrides";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue