Setup hibernation by default on new installs

This commit is contained in:
David Heinemeier Hansson
2026-02-07 10:45:24 +01:00
parent 3bbb57b54d
commit ea24b0dc68
3 changed files with 9 additions and 4 deletions

View File

@@ -17,9 +17,11 @@ if [ -f "$MKINITCPIO_CONF" ] && grep -q "^HOOKS+=(resume)$" "$MKINITCPIO_CONF";
exit 0 exit 0
fi fi
MEM_TOTAL_HUMAN=$(free --human | awk '/Mem/ {print $2}') if [[ $1 != "--force" ]]; then
if ! gum confirm "Use $MEM_TOTAL_HUMAN on boot drive to make hibernation available?"; then MEM_TOTAL_HUMAN=$(free --human | awk '/Mem/ {print $2}')
exit 0 if ! gum confirm "Use $MEM_TOTAL_HUMAN on boot drive to make hibernation available?"; then
exit 0
fi
fi fi
SWAP_SUBVOLUME="/swap" SWAP_SUBVOLUME="/swap"
@@ -70,6 +72,6 @@ sudo limine-mkinitcpio
echo echo
if gum confirm "Reboot to enable hiberation?"; then if [[ $1 != "--force" ]] && gum confirm "Reboot to enable hibernation?"; then
omarchy-cmd-reboot omarchy-cmd-reboot
fi fi

View File

@@ -20,6 +20,7 @@ run_logged $OMARCHY_INSTALL/config/sudoless-asdcontrol.sh
run_logged $OMARCHY_INSTALL/config/input-group.sh run_logged $OMARCHY_INSTALL/config/input-group.sh
run_logged $OMARCHY_INSTALL/config/omarchy-ai-skill.sh run_logged $OMARCHY_INSTALL/config/omarchy-ai-skill.sh
run_logged $OMARCHY_INSTALL/config/powerprofilesctl-rules.sh run_logged $OMARCHY_INSTALL/config/powerprofilesctl-rules.sh
run_logged $OMARCHY_INSTALL/config/hibernation.sh
run_logged $OMARCHY_INSTALL/config/hardware/network.sh run_logged $OMARCHY_INSTALL/config/hardware/network.sh
run_logged $OMARCHY_INSTALL/config/hardware/set-wireless-regdom.sh run_logged $OMARCHY_INSTALL/config/hardware/set-wireless-regdom.sh
run_logged $OMARCHY_INSTALL/config/hardware/fix-fkeys.sh run_logged $OMARCHY_INSTALL/config/hardware/fix-fkeys.sh

View File

@@ -0,0 +1,2 @@
# Enable hibernation
omarchy-hibernation-setup --force