et-mode - Added support for saving current mode

This commit is contained in:
Gaston Gonzalez
2024-11-06 11:58:40 -07:00
parent 4a8fbfc0da
commit 908a0c8d70
2 changed files with 6 additions and 0 deletions
@@ -0,0 +1 @@
none
+5
View File
@@ -4,6 +4,8 @@
# Date : 6 November 2024 # Date : 6 November 2024
# Purpose : Configures the system for a specific mode of operation # Purpose : Configures the system for a specific mode of operation
MODE_STATUS_FILE="${HOME}/.config/emcomm-tools/et-mode"
# TODO check for call, radio, audio # TODO check for call, radio, audio
# TODO show current mode (delegate to et-system-info to align with Conky) # TODO show current mode (delegate to et-system-info to align with Conky)
# TODO Add better detection between startup services / apps # TODO Add better detection between startup services / apps
@@ -72,7 +74,10 @@ if [ $exit_status -eq 0 ]; then
;; ;;
esac esac
echo ${SELECTED_MODE} > ${MODE_STATUS_FILE}
else else
et-log "No mode selected" et-log "No mode selected"
echo ${MODE_ID_NONE} > ${MODE_STATUS_FILE}
exit 1 exit 1
fi fi