Testing suspend/hibernate in hyprland w/ swayidle

This commit is contained in:
albert 2023-08-27 18:55:51 +09:00
parent 0c2f4bfbcc
commit 65d3cc875a
2 changed files with 13 additions and 5 deletions

View file

@ -18,7 +18,8 @@ nixos-rebuild switch --flake '/etc/nixos#<HOSTNAME>'
* [ ] Get swaylock to dim / turn off the screen, then enter suspend/hibernate * [ ] Get swaylock to dim / turn off the screen, then enter suspend/hibernate
* [x] swayosd * [x] swayosd
* [ ] wayprompt * [ ] wayprompt
* [ ] wlogout * [ ] Needs an overlay? Can't find it in search
* [ ] wlogout / nwg-bar theming
* [ ] cli-based filebrowser for hyprland * [ ] cli-based filebrowser for hyprland
* [x] Find a way to adjust window sizes with a keyboard shortcut in Hyprland * [x] Find a way to adjust window sizes with a keyboard shortcut in Hyprland
* [ ] Try disko - [Link](https://github.com/nix-community/disko) * [ ] Try disko - [Link](https://github.com/nix-community/disko)
@ -30,6 +31,7 @@ nixos-rebuild switch --flake '/etc/nixos#<HOSTNAME>'
* [ ] Try and submit this as a nixpkg - [Link](https://github.com/SylEleuth/gruvbox-plus-icon-pack) * [ ] Try and submit this as a nixpkg - [Link](https://github.com/SylEleuth/gruvbox-plus-icon-pack)
* [ ] doom-emacs / spacemacs overlay install / configuration * [ ] doom-emacs / spacemacs overlay install / configuration
* [ ] gnome-terminal theming (or alternatives) * [ ] gnome-terminal theming (or alternatives)
--- ---
# Done # Done
* [x] hyprland * [x] hyprland

View file

@ -170,9 +170,9 @@
# trigger when the switch is toggled # trigger when the switch is toggled
# bindl=,switch:[switch name],exec,swaylock # bindl=,switch:[switch name],exec,swaylock
# trigger when the switch is turning on # 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 # 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 # Laptop specific config
# Set up the FN keys: # 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 # 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 & dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP &
# Set the wallpaper
swww init & swww init &
WALLPAPER_DIR=/etc/nixos/git/wallpapers/gruvbox WALLPAPER_DIR=/etc/nixos/git/wallpapers/gruvbox
swww img $WALLPAPER_DIR/wallpaper11.jpg & swww img $WALLPAPER_DIR/wallpaper11.jpg &
# Waybar
waybar & waybar &
# Set up the idle management daemon # Set up the idle management daemon
swayidle -w \ swayidle -w \
timeout 300 'swaylock -f' \ timeout 60 'swaylock -f' \
timeout 600 'hyprctl dispatch dpms off' \ timeout 90 'hyprctl dispatch dpms off' \
timeout 300 'systemctl suspend' \
timeout 900 'systemctl hibernate' \
resume 'hyprctl dispatch dpms on' \ resume 'hyprctl dispatch dpms on' \
before-sleep 'swaylock -f' before-sleep 'swaylock -f'
# Notification listener
mako mako
''; '';
}; };