Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions system_files/bluefin/etc/profile.d/caffeinate.sh
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 1 addition & 1 deletion system_files/shared/usr/bin/ublue-bling
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading