This commit is contained in:
Hadi
2024-03-14 18:42:15 +01:00
parent 77eba6e2c2
commit 05fc3fbcd9
7 changed files with 111 additions and 55 deletions

View File

@@ -6,5 +6,6 @@
./sounds.nix
./brightness.nix
./caffeine.nix
./night-shift.nix
];
}

View File

@@ -0,0 +1,16 @@
{ pkgs, config, ... }:
let
homedir = config.home.homeDirectory;
default = "4000";
night-shift-on = pkgs.writeShellScriptBin "night-shift-on" ''
${pkgs.hyprland}/bin/hyprctl dispatch exec "${pkgs.wlsunset}/bin/wlsunset -t ${default}"
${pkgs.libnotify}/bin/notify-send "󰖔 Night Shift Activated"
'';
night-shift-off = pkgs.writeShellScriptBin "night-shift-off" ''
pkill wlsunset
${pkgs.libnotify}/bin/notify-send " Night Shift Deactivated"
'';
in { home.packages = with pkgs; [ night-shift-on night-shift-off ]; }