From 4bb8bfc44cd9c3b17c268b62d4c30d36cdce57d6 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 7 Jan 2026 19:51:00 +0100 Subject: [PATCH] Do not allow hibernation to be setup if its not supported --- bin/omarchy-hibernation-setup | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/omarchy-hibernation-setup b/bin/omarchy-hibernation-setup index 84556355..8a423cbd 100755 --- a/bin/omarchy-hibernation-setup +++ b/bin/omarchy-hibernation-setup @@ -3,6 +3,12 @@ # Creates a swap file in the btrfs subvolume, adds the swap file to /etc/fstab, # adds a resume hook to mkinitcpio, and configures suspend-then-hibernate. +if [[ ! -f /sys/power/image_size ]]; then + echo -e "\033[31mError: Hibernation is not supported on your system\033[0m" >&2 + exit 1 +fi + + MKINITCPIO_CONF="/etc/mkinitcpio.conf.d/omarchy_resume.conf" # Check if hibernation is already configured