diff --git a/system_files/bluefin/etc/profile.d/caffeinate.sh b/system_files/bluefin/etc/profile.d/caffeinate.sh new file mode 100644 index 00000000..44e8dbaa --- /dev/null +++ b/system_files/bluefin/etc/profile.d/caffeinate.sh @@ -0,0 +1,10 @@ +# Prevent system sleep while a long-running task completes. +# Usage: caffeinate — prevent sleep indefinitely (Ctrl+C to release) +# caffeinate sleep 3600 — prevent sleep for 1 hour +caffeinate() { + if [ $# -eq 0 ]; then + systemd-inhibit --what=idle --who=caffeinate --why="User requested" --mode=block sleep infinity + else + systemd-inhibit --what=idle --who=caffeinate --why="User requested" --mode=block "$@" + fi +} diff --git a/system_files/shared/usr/bin/ublue-bling b/system_files/shared/usr/bin/ublue-bling index 30ebd12c..b7563cc0 100755 --- a/system_files/shared/usr/bin/ublue-bling +++ b/system_files/shared/usr/bin/ublue-bling @@ -43,7 +43,7 @@ BLING_MESSAGE_DISABLE="${BLING_MESSAGE_DISABLE:-Disable bling for ${shell}?}" if is-bling-installed "${shell}" ; then gum confirm "${BLING_MESSAGE_DISABLE}" if ! sed -i "/### ${BLING_SCRIPT_SOURCE} source start/,/### ${BLING_SCRIPT_SOURCE} source end/d" "${TARGET_CONFIG_FILE}" ; then - sed -i "$(grep -n "source ${BLING_SCRIPT_SOURCE}" "${TARGET_CONFIG_FILE}" | grep -Eo '^[^:]+')"d "${HOME}/.bashrc" + sed -i "$(grep -n "source ${BLING_SCRIPT_SOURCE}" "${TARGET_CONFIG_FILE}" | grep -Eo '^[^:]+')"d "${TARGET_CONFIG_FILE}" fi echo "Bling removed. Reopen your terminal so that the configurations may be removed" else