From e7ba648e1c59a9d142e347aba9a3caa892ab312c Mon Sep 17 00:00:00 2001 From: notohh Date: Mon, 22 Jan 2024 03:48:28 -0500 Subject: [PATCH] tsuki: add swayidle --- hosts/tsuki/home.nix | 4 +++- hosts/tsuki/services/swayidle.nix | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 hosts/tsuki/services/swayidle.nix diff --git a/hosts/tsuki/home.nix b/hosts/tsuki/home.nix index ddae88e..6a9033f 100755 --- a/hosts/tsuki/home.nix +++ b/hosts/tsuki/home.nix @@ -4,6 +4,7 @@ ... }: { imports = [ + ./services/swayidle.nix ../../home ../../home/firefox ../../home/ags @@ -16,7 +17,6 @@ ../../home/zellij ../../home/spotify-player ../../home/wayland/hyprland - ../../modules/swayidle.nix ]; systemd.user.startServices = "sd-switch"; @@ -35,6 +35,8 @@ pavucontrol vscodium-fhs obsidian + supersonic-wayland + jellyfin-mpv-shim unzip unrar p7zip diff --git a/hosts/tsuki/services/swayidle.nix b/hosts/tsuki/services/swayidle.nix new file mode 100644 index 0000000..e30ebda --- /dev/null +++ b/hosts/tsuki/services/swayidle.nix @@ -0,0 +1,13 @@ +_: { + home.file.".local/bin/lock" = { + executable = true; + text = '' + swayidle -w \ + timeout 500 'swaylock -f --image ~/Pictures/wallpapers/mumei.png --clock --grace 5 --ring-color f5c2e7 --inside-color 1e1e2e --line-color 11111b' \ + timeout 600 'hyprctl dispatch dpms off' \ + resume 'hyprctl dispatch dpms on' \ + before-sleep 'swaylock -f --image ~/Picture/wallpapers/mumei.png --clock --ring-color f5c2e7 --inside-color 1e1e2e --line-color 11111b' \ + after-resume 'ironbar reload' + ''; + }; +}