diff --git a/app/src/main/java/io/neoterm/frontend/preference/DefaultPreference.kt b/app/src/main/java/io/neoterm/frontend/preference/DefaultPreference.kt index 3678412..6534208 100644 --- a/app/src/main/java/io/neoterm/frontend/preference/DefaultPreference.kt +++ b/app/src/main/java/io/neoterm/frontend/preference/DefaultPreference.kt @@ -19,7 +19,6 @@ object DefaultPreference { const val enableExplicitExtraKeysWeight = false const val enableBackButtonBeMappedToEscape = false const val enableSpecialVolumeKeys = false - const val enableExitMessage = true const val loginShell = "sh" const val initialCommand = "" diff --git a/app/src/main/java/io/neoterm/frontend/preference/NeoPreference.kt b/app/src/main/java/io/neoterm/frontend/preference/NeoPreference.kt index 4a0c095..1592974 100644 --- a/app/src/main/java/io/neoterm/frontend/preference/NeoPreference.kt +++ b/app/src/main/java/io/neoterm/frontend/preference/NeoPreference.kt @@ -186,10 +186,26 @@ object NeoPreference { return loadString(R.string.key_general_initial_command, DefaultPreference.initialCommand) } - fun isEnableBell(): Boolean { + fun isBellEnabled(): Boolean { return loadBoolean(R.string.key_general_bell, DefaultPreference.enableBell) } + fun isVibrateEnabled(): Boolean { + return loadBoolean(R.string.key_general_vibrate, DefaultPreference.enableVibrate) + } + + fun isExecveWrapperEnabled() : Boolean { + return loadBoolean(R.string.key_general_use_execve_wrapper, DefaultPreference.enableExecveWrapper) + } + + fun isSpecialVolumeKeysEnabled() : Boolean { + return loadBoolean(R.string.key_general_volume_as_control, DefaultPreference.enableSpecialVolumeKeys) + } + + fun isAutoCompletionEnabled() : Boolean { + return loadBoolean(R.string.key_general_auto_completion, DefaultPreference.enableAutoCompletion) + } + // fun storeWindowSize(context: Context, width: Int, height: Int) { // store(KEY_FLOATING_WIDTH, width) diff --git a/app/src/main/java/io/neoterm/frontend/session/shell/ShellProfile.kt b/app/src/main/java/io/neoterm/frontend/session/shell/ShellProfile.kt index 5cadb96..dbf9151 100644 --- a/app/src/main/java/io/neoterm/frontend/session/shell/ShellProfile.kt +++ b/app/src/main/java/io/neoterm/frontend/session/shell/ShellProfile.kt @@ -17,7 +17,7 @@ class ShellProfile { var enableVibrate = DefaultPreference.enableVibrate var enableExecveWrapper = DefaultPreference.enableExecveWrapper var enableSpecialVolumeKeys = DefaultPreference.enableSpecialVolumeKeys - var enableExitMessage = DefaultPreference.enableExitMessage; + var enableAutoCompletion = DefaultPreference.enableAutoCompletion var profileFont: String var profileColorScheme: String @@ -31,6 +31,10 @@ class ShellProfile { loginShell = NeoPreference.getLoginShellPath() initialCommand = NeoPreference.getInitialCommand() - enableBell = NeoPreference.isEnableBell() + enableBell = NeoPreference.isBellEnabled() + enableVibrate = NeoPreference.isVibrateEnabled() + enableExecveWrapper = NeoPreference.isExecveWrapperEnabled() + enableSpecialVolumeKeys = NeoPreference.isSpecialVolumeKeysEnabled() + enableAutoCompletion = NeoPreference.isAutoCompletionEnabled() } } \ No newline at end of file