mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-07 03:05:18 +08:00
Add termux.properties property for opening terminal transcript urls on click
The user can add `terminal-onclick-url-open` entry to `termux.properties` file to enable opening url links in terminal transcript on click or on tap. The default value is `false`. So adding the entry `terminal-onclick-url-open=true` to `termux.properties` file will enable url opening. Running `termux-reload-settings` command will also update the behaviour instantaneously if changed. This commit just adds the property and doesn't implement the functionality. That will later be merged from #2146.
This commit is contained in:
@@ -94,6 +94,11 @@ public final class TermuxPropertyConstants {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** Defines the key for whether url links in terminal transcript will automatically open on click or on tap */
|
||||||
|
public static final String KEY_TERMINAL_ONCLICK_URL_OPEN = "terminal-onclick-url-open"; // Default: "terminal-onclick-url-open"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** Defines the key for whether to use black UI */
|
/** Defines the key for whether to use black UI */
|
||||||
public static final String KEY_USE_BLACK_UI = "use-black-ui"; // Default: "use-black-ui"
|
public static final String KEY_USE_BLACK_UI = "use-black-ui"; // Default: "use-black-ui"
|
||||||
|
|
||||||
@@ -301,6 +306,7 @@ public final class TermuxPropertyConstants {
|
|||||||
KEY_DISABLE_TERMINAL_SESSION_CHANGE_TOAST,
|
KEY_DISABLE_TERMINAL_SESSION_CHANGE_TOAST,
|
||||||
KEY_ENFORCE_CHAR_BASED_INPUT,
|
KEY_ENFORCE_CHAR_BASED_INPUT,
|
||||||
KEY_HIDE_SOFT_KEYBOARD_ON_STARTUP,
|
KEY_HIDE_SOFT_KEYBOARD_ON_STARTUP,
|
||||||
|
KEY_TERMINAL_ONCLICK_URL_OPEN,
|
||||||
KEY_USE_BLACK_UI,
|
KEY_USE_BLACK_UI,
|
||||||
KEY_USE_CTRL_SPACE_WORKAROUND,
|
KEY_USE_CTRL_SPACE_WORKAROUND,
|
||||||
KEY_USE_FULLSCREEN,
|
KEY_USE_FULLSCREEN,
|
||||||
@@ -341,6 +347,7 @@ public final class TermuxPropertyConstants {
|
|||||||
KEY_DISABLE_TERMINAL_SESSION_CHANGE_TOAST,
|
KEY_DISABLE_TERMINAL_SESSION_CHANGE_TOAST,
|
||||||
KEY_ENFORCE_CHAR_BASED_INPUT,
|
KEY_ENFORCE_CHAR_BASED_INPUT,
|
||||||
KEY_HIDE_SOFT_KEYBOARD_ON_STARTUP,
|
KEY_HIDE_SOFT_KEYBOARD_ON_STARTUP,
|
||||||
|
KEY_TERMINAL_ONCLICK_URL_OPEN,
|
||||||
KEY_USE_CTRL_SPACE_WORKAROUND,
|
KEY_USE_CTRL_SPACE_WORKAROUND,
|
||||||
KEY_USE_FULLSCREEN,
|
KEY_USE_FULLSCREEN,
|
||||||
KEY_USE_FULLSCREEN_WORKAROUND,
|
KEY_USE_FULLSCREEN_WORKAROUND,
|
||||||
|
@@ -476,6 +476,10 @@ public class TermuxSharedProperties {
|
|||||||
return (boolean) getInternalPropertyValue(TermuxPropertyConstants.KEY_HIDE_SOFT_KEYBOARD_ON_STARTUP, true);
|
return (boolean) getInternalPropertyValue(TermuxPropertyConstants.KEY_HIDE_SOFT_KEYBOARD_ON_STARTUP, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean shouldOpenTerminalTranscriptURLOnClick() {
|
||||||
|
return (boolean) getInternalPropertyValue(TermuxPropertyConstants.KEY_TERMINAL_ONCLICK_URL_OPEN, true);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isUsingBlackUI() {
|
public boolean isUsingBlackUI() {
|
||||||
return (boolean) getInternalPropertyValue(TermuxPropertyConstants.KEY_USE_BLACK_UI, true);
|
return (boolean) getInternalPropertyValue(TermuxPropertyConstants.KEY_USE_BLACK_UI, true);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user