2022-07-03

If GNOME Shell crashes it automatically disables all extensions in case they were responsible. This can be confusing upon the next login, though, as thereโ€™s no visible explanation of what happened. For crashes not caused by extensions it can be simply unhelpful.

A simple notice upon login is a welcome convenience:

screenshot of notification
#!/usr/bin/env bash
set -Eeuo pipefail

[[ "$(gsettings get org.gnome.shell disable-user-extensions)" == 'true' ]] || exit

case "$(notify-send --urgency 'critical' --icon 'extensions' \
'Extensions have been automatically disabled.' \
--action 'enable=Re-Enable' \
--action 'settings=Settingsโ€ฆ')
"
\
in
'enable') gsettings set org.gnome.shell disable-user-extensions 'false';;
'settings') gnome-extensions-app & disown;;
esac