From 65d3cc875ae47224ccb4652044fcd373d6924e12 Mon Sep 17 00:00:00 2001 From: albert Date: Sun, 27 Aug 2023 18:55:51 +0900 Subject: [PATCH] Testing suspend/hibernate in hyprland w/ swayidle --- README.md | 4 +++- .../desktops/hyprland/hyprland-conf.nix | 14 ++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 91ffa993..8072a9d7 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,8 @@ nixos-rebuild switch --flake '/etc/nixos#' * [ ] Get swaylock to dim / turn off the screen, then enter suspend/hibernate * [x] swayosd * [ ] wayprompt - * [ ] wlogout + * [ ] Needs an overlay? Can't find it in search + * [ ] wlogout / nwg-bar theming * [ ] cli-based filebrowser for hyprland * [x] Find a way to adjust window sizes with a keyboard shortcut in Hyprland * [ ] Try disko - [Link](https://github.com/nix-community/disko) @@ -30,6 +31,7 @@ nixos-rebuild switch --flake '/etc/nixos#' * [ ] Try and submit this as a nixpkg - [Link](https://github.com/SylEleuth/gruvbox-plus-icon-pack) * [ ] doom-emacs / spacemacs overlay install / configuration * [ ] gnome-terminal theming (or alternatives) + --- # Done * [x] hyprland diff --git a/home-manager/hosts/nixos-laptop/desktops/hyprland/hyprland-conf.nix b/home-manager/hosts/nixos-laptop/desktops/hyprland/hyprland-conf.nix index 04d0c4fa..aa9c1973 100644 --- a/home-manager/hosts/nixos-laptop/desktops/hyprland/hyprland-conf.nix +++ b/home-manager/hosts/nixos-laptop/desktops/hyprland/hyprland-conf.nix @@ -170,9 +170,9 @@ # trigger when the switch is toggled # bindl=,switch:[switch name],exec,swaylock # trigger when the switch is turning on - # bindl=,switch:on:[switch name],exec,hyprctl keyword monitor "eDP-1, 2560x1600, 0x0, 1" + bindl=,switch:on:1241ec0,exec,hyprctl keyword monitor "eDP-1, 2560x1600, 0x0, 1" # trigger when the switch is turning off - # bindl=,switch:off:[switch name],exec,hyprctl keyword monitor "eDP-1, disable" + bindl=,switch:off:1241ec0,exec,hyprctl keyword monitor "eDP-1, disable" # Laptop specific config # Set up the FN keys: @@ -250,18 +250,24 @@ # https://wiki.hyprland.org/FAQ/#some-of-my-apps-take-a-really-long-time-to-open dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP & + # Set the wallpaper swww init & WALLPAPER_DIR=/etc/nixos/git/wallpapers/gruvbox swww img $WALLPAPER_DIR/wallpaper11.jpg & + + # Waybar waybar & # Set up the idle management daemon swayidle -w \ - timeout 300 'swaylock -f' \ - timeout 600 'hyprctl dispatch dpms off' \ + timeout 60 'swaylock -f' \ + timeout 90 'hyprctl dispatch dpms off' \ + timeout 300 'systemctl suspend' \ + timeout 900 'systemctl hibernate' \ resume 'hyprctl dispatch dpms on' \ before-sleep 'swaylock -f' + # Notification listener mako ''; };