#!/bin/bash

# omarchy:summary=Toggle suspend availability in the system menu

if omarchy-sleep-disabled; then
  omarchy-notification-send -g 󰒲 "$(omarchy-i18n suspend.turnedOffOnMachine)"
  exit 0
fi

omarchy-toggle suspend-off

if omarchy-toggle-enabled suspend-off; then
  omarchy-notification-send -g 󰒲 "$(omarchy-i18n suspend.removedFromMenu)"
else
  omarchy-notification-send -g 󰒲 "$(omarchy-i18n suspend.availableInMenu)"
fi
