diff --git a/custom/default.nix b/custom/default.nix index ce76210..45dd68c 100644 --- a/custom/default.nix +++ b/custom/default.nix @@ -6,6 +6,7 @@ let self = with pkgs; { lockscreen = callPackage ./lockscreen { }; update-background = callPackage ./update-background { }; + sddm-theme-clairvoyance = callPackage ./sddm-theme-clairvoyance { }; cocktail-bar-cli = callPackage ./cocktail-bar-cli { }; }; in diff --git a/custom/sddm-theme-clairvoyance/default.nix b/custom/sddm-theme-clairvoyance/default.nix new file mode 100644 index 0000000..881c670 --- /dev/null +++ b/custom/sddm-theme-clairvoyance/default.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchFromGitHub, fira-mono }: + +stdenv.mkDerivation rec { + pname = "materia-kde-theme"; + version = "20190530"; + + src = fetchFromGitHub { + owner = "eayus"; + repo = "sddm-theme-clairvoyance"; + rev = "dfc5984ff8f4a0049190da8c6173ba5667904487"; + sha256 = "sha256-AcVQpG6wPkMtAudqyu/iwZ4N6a2bCdfumCmdqE1E548="; + }; + + buildInputs = [ fira-mono ]; + + # makeFlags = [ "PREFIX=$(out)" ]; + + installPhase = '' + mkdir -p $out/usr/share/sddm/themes/ + cp -a . $out/usr/share/sddm/themes/clairvoyance + ''; + + meta = with lib; { + description = "Clairvoyance theme for SDDM"; + homepage = "https://github.com/eayus/sddm-theme-clairvoyance"; + license = licenses.gpl3Plus; + maintainers = [ maintainers.bertof ]; + platforms = platforms.all; + }; +} diff --git a/flake.nix b/flake.nix index a7cb03c..cd9d1aa 100644 --- a/flake.nix +++ b/flake.nix @@ -37,6 +37,7 @@ (final: _: { update-background = final.callPackage ./custom/update-background { backgrounds_directory = "$HOME/Immagini/Sfondi/1080+/1440+"; }; lockscreen = final.callPackage ./custom/lockscreen { palette = final.rice.colorPalette; font = final.rice.font.normal; }; + sddm-theme-clairvoyance = final.callPackage ./custom/sddm-theme-clairvoyance { }; }) (_: _: { stable = pkgs; }) (_: _: { unstable = unstablePkgs; }) diff --git a/hm_modules/xidlehook.nix b/hm_modules/xidlehook.nix index 1fa708a..0b702be 100644 --- a/hm_modules/xidlehook.nix +++ b/hm_modules/xidlehook.nix @@ -5,18 +5,30 @@ with lib; let xbacklightCmd = "${pkgs.xorg.xbacklight}/bin/xbacklight"; lightLevel = 10; + package = pkgs.writeScriptBin "xidlehook" '' + ${pkgs.xidlehook}/bin/xidlehook --detect-sleep "$@" + ''; + saveLightLevel = "${xbacklightCmd} -get > /run/user/$UID/xbacklight_v"; + lowerLight = "${xbacklightCmd} -set ${toString lightLevel}"; + resetLight = "${xbacklightCmd} -set $(