diff --git a/scripts/toggle-graphics.sh b/scripts/toggle-graphics.sh new file mode 100644 index 0000000..892da17 --- /dev/null +++ b/scripts/toggle-graphics.sh @@ -0,0 +1,17 @@ +#! /bin/bash + +# Script to toggle graphical + +defTarget=$(systemctl get-default) + +if [[ $defTarget == 'graphical.target' ]] +then + echo 'Changing default target to nongraphical shell' + sudo systemctl set-default multi-user.target +else + echo 'Changing default target to graphical shell' + sudo systemctl set-default graphical.target +fi +echo +echo 'Default target changed to '$(systemctl get-default) +echo 'Please reboot for the change to take effect'