Better lockscreen automation + sddm theme
This commit is contained in:
parent
613673299d
commit
0a07445ebc
10 changed files with 62 additions and 17 deletions
|
|
@ -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
|
||||
|
|
|
|||
30
custom/sddm-theme-clairvoyance/default.nix
Normal file
30
custom/sddm-theme-clairvoyance/default.nix
Normal file
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
@ -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; })
|
||||
|
|
|
|||
|
|
@ -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 $(</run/user/$UID/xbacklight_v) || ${xbacklightCmd} -set 100";
|
||||
in
|
||||
{
|
||||
services.xidlehook = {
|
||||
inherit package;
|
||||
enable = true;
|
||||
not-when-audio = true;
|
||||
# not-when-audio = true;
|
||||
not-when-fullscreen = true;
|
||||
timers = [
|
||||
{
|
||||
command = "${xbacklightCmd} -get > /tmp/xbacklight_v && ${xbacklightCmd} -set ${toString lightLevel}";
|
||||
canceller = "${xbacklightCmd} -set $(cat /tmp/xbacklight_v || echo 100)";
|
||||
command = "${saveLightLevel} && ${lowerLight}";
|
||||
canceller = resetLight;
|
||||
delay = 60;
|
||||
}
|
||||
{
|
||||
command = "${pkgs.lockscreen}/bin/lockscreen";
|
||||
canceller = resetLight;
|
||||
delay = 120;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,6 +68,12 @@ with lib;
|
|||
# };
|
||||
windowManager.bspwm.enable = true;
|
||||
|
||||
displayManager.sddm = {
|
||||
enable = true;
|
||||
autoNumlock = true;
|
||||
theme = "${pkgs.sddm-theme-clairvoyance}/usr/share/sddm/themes/clairvoyance";
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
layout = "it";
|
||||
extraLayouts = {
|
||||
|
|
|
|||
|
|
@ -20,11 +20,6 @@
|
|||
# enable = true;
|
||||
# wayland = true;
|
||||
# };
|
||||
displayManager.sddm = {
|
||||
enable = true;
|
||||
autoNumlock = true;
|
||||
# enableHidpi = true;
|
||||
};
|
||||
};
|
||||
|
||||
# This runs only Intel and nvidia does not drain power.
|
||||
|
|
|
|||
|
|
@ -6,11 +6,6 @@
|
|||
|
||||
services.xserver = {
|
||||
videoDrivers = [ "nvidia" ];
|
||||
displayManager.sddm = {
|
||||
enable = true;
|
||||
autoNumlock = true;
|
||||
# enableHidpi = true;
|
||||
};
|
||||
# displayManager.gdm = {
|
||||
# enable = true;
|
||||
# wayland = false;
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@
|
|||
# ../hm_modules/pycharm.nix
|
||||
../hm_modules/rofimoji.nix
|
||||
../hm_modules/rofi.nix
|
||||
../hm_modules/screen_locker.nix
|
||||
# ../hm_modules/screen_locker.nix
|
||||
# ../hm_modules/security.nix
|
||||
../hm_modules/sxhkd.nix
|
||||
../hm_modules/syncthing.nix
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ with lib;
|
|||
{
|
||||
boot = {
|
||||
binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ];
|
||||
kernelPackages = pkgs.linuxPackages_5_18;
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
|
|
@ -124,7 +124,10 @@ with lib;
|
|||
};
|
||||
windowManager.bspwm = { enable = true; };
|
||||
# displayManager.gdm = { enable = true; nvidiaWayland = true; };
|
||||
displayManager.sddm.enable = true;
|
||||
displayManager.sddm = {
|
||||
enable = true;
|
||||
theme = "${pkgs.sddm-theme-clairvoyance}/usr/share/sddm/themes/clairvoyance";
|
||||
};
|
||||
layout = "us";
|
||||
videoDrivers = [ "nvidia" ];
|
||||
xkbOptions = "eurosign:e,terminate:ctrl_alt_bksp,compose:rctrl";
|
||||
|
|
@ -132,6 +135,8 @@ with lib;
|
|||
# gnome.gnome-remote-desktop.enable = true;
|
||||
};
|
||||
|
||||
|
||||
|
||||
services.teamviewer.enable = true;
|
||||
|
||||
security = {
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@
|
|||
../hm_modules/pro_audio.nix
|
||||
../hm_modules/rofimoji.nix
|
||||
../hm_modules/rofi.nix
|
||||
../hm_modules/screen_locker.nix
|
||||
# ../hm_modules/screen_locker.nix
|
||||
# ../hm_modules/security.nix
|
||||
../hm_modules/sxhkd.nix
|
||||
../hm_modules/syncthing.nix
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue