2021-04-07 06:31:30 +00:00
package com.termux.shared.termux ;
2021-03-08 10:09:22 +00:00
import android.annotation.SuppressLint ;
import java.io.File ;
2021-03-11 15:11:59 +00:00
/ *
2021-04-07 06:31:30 +00:00
* Version : v0 . 17 . 0
2021-03-11 15:11:59 +00:00
*
* Changelog
*
* - 0 . 1 . 0 ( 2021 - 03 - 08 )
* - Initial Release .
*
* - 0 . 2 . 0 ( 2021 - 03 - 11 )
* - Added ` _DIR ` and ` _FILE ` substrings to paths .
2021-03-15 22:59:54 +00:00
* - Added ` INTERNAL_PRIVATE_APP_DATA_DIR * ` , ` TERMUX_CACHE_DIR * ` , ` TERMUX_DATABASES_DIR * ` ,
* ` TERMUX_SHARED_PREFERENCES_DIR * ` , ` TERMUX_BIN_PREFIX_DIR * ` , ` TERMUX_ETC_DIR * ` ,
* ` TERMUX_INCLUDE_DIR * ` , ` TERMUX_LIB_DIR * ` , ` TERMUX_LIBEXEC_DIR * ` , ` TERMUX_SHARE_DIR * ` ,
* ` TERMUX_TMP_DIR * ` , ` TERMUX_VAR_DIR * ` , ` TERMUX_STAGING_PREFIX_DIR * ` ,
* ` TERMUX_STORAGE_HOME_DIR * ` , ` TERMUX_DEFAULT_PREFERENCES_FILE_BASENAME * ` ,
* ` TERMUX_DEFAULT_PREFERENCES_FILE ` .
2021-03-11 15:11:59 +00:00
* - Renamed ` DATA_HOME_PATH ` to ` TERMUX_DATA_HOME_DIR_PATH ` .
* - Renamed ` CONFIG_HOME_PATH ` to ` TERMUX_CONFIG_HOME_DIR_PATH ` .
* - Updated javadocs and spacing .
*
2021-03-12 00:53:10 +00:00
* - 0 . 3 . 0 ( 2021 - 03 - 12 )
2021-03-15 22:59:54 +00:00
* - Remove ` TERMUX_CACHE_DIR_PATH * ` , ` TERMUX_DATABASES_DIR_PATH * ` ,
* ` TERMUX_SHARED_PREFERENCES_DIR_PATH * ` since they may not be consistent on all devices .
2021-03-12 00:53:10 +00:00
* - Renamed ` TERMUX_DEFAULT_PREFERENCES_FILE_BASENAME ` to
* ` TERMUX_DEFAULT_PREFERENCES_FILE_BASENAME_WITHOUT_EXTENSION ` . This should be used for
* accessing shared preferences between Termux app and its plugins if ever needed by first
* getting shared package context with { @link Context . createPackageContext ( String , int } ) .
*
2021-03-15 22:59:54 +00:00
* - 0 . 4 . 0 ( 2021 - 03 - 16 )
* - Added ` BROADCAST_TERMUX_OPENED ` ,
* ` TERMUX_API_DEFAULT_PREFERENCES_FILE_BASENAME_WITHOUT_EXTENSION `
* ` TERMUX_BOOT_DEFAULT_PREFERENCES_FILE_BASENAME_WITHOUT_EXTENSION ` ,
* ` TERMUX_FLOAT_DEFAULT_PREFERENCES_FILE_BASENAME_WITHOUT_EXTENSION ` ,
* ` TERMUX_STYLING_DEFAULT_PREFERENCES_FILE_BASENAME_WITHOUT_EXTENSION ` ,
* ` TERMUX_TASKER_DEFAULT_PREFERENCES_FILE_BASENAME_WITHOUT_EXTENSION ` ,
* ` TERMUX_WIDGET_DEFAULT_PREFERENCES_FILE_BASENAME_WITHOUT_EXTENSION ` .
*
2021-03-16 14:07:54 +00:00
* - 0 . 5 . 0 ( 2021 - 03 - 16 )
2021-03-16 20:13:44 +00:00
* - Renamed " Termux Plugin app " labels to " Termux Tasker app " .
2021-03-16 16:29:25 +00:00
*
* - 0 . 6 . 0 ( 2021 - 03 - 16 )
2021-03-16 20:13:44 +00:00
* - Added ` TERMUX_FILE_SHARE_URI_AUTHORITY ` .
*
* - 0 . 7 . 0 ( 2021 - 03 - 17 )
* - Fixed javadocs .
2021-03-18 02:15:00 +00:00
*
* - 0 . 8 . 0 ( 2021 - 03 - 18 )
* - Fixed Intent extra types javadocs .
2021-03-18 21:19:55 +00:00
* - Added following to ` TERMUX_SERVICE ` :
* ` EXTRA_PENDING_INTENT ` , ` EXTRA_RESULT_BUNDLE ` ,
* ` EXTRA_STDOUT ` , ` EXTRA_STDERR ` , ` EXTRA_EXIT_CODE ` ,
2021-03-23 22:51:57 +00:00
* ` EXTRA_ERR ` , ` EXTRA_ERRMSG ` .
2021-03-18 16:52:22 +00:00
*
* - 0 . 9 . 0 ( 2021 - 03 - 18 )
* - Fixed javadocs .
2021-03-18 21:19:55 +00:00
*
* - 0 . 10 . 0 ( 2021 - 03 - 19 )
* - Added following to ` TERMUX_SERVICE ` :
* ` EXTRA_SESSION_ACTION ` ,
* ` VALUE_EXTRA_SESSION_ACTION_SWITCH_TO_NEW_SESSION_AND_OPEN_ACTIVITY ` ,
* ` VALUE_EXTRA_SESSION_ACTION_KEEP_CURRENT_SESSION_AND_OPEN_ACTIVITY ` ,
* ` VALUE_EXTRA_SESSION_ACTION_SWITCH_TO_NEW_SESSION_AND_DONT_OPEN_ACTIVITY `
2021-03-23 22:51:57 +00:00
* ` VALUE_EXTRA_SESSION_ACTION_KEEP_CURRENT_SESSION_AND_DONT_OPEN_ACTIVITY ` .
2021-03-18 21:19:55 +00:00
* - Added following to ` RUN_COMMAND_SERVICE ` :
2021-03-23 22:51:57 +00:00
* ` EXTRA_SESSION_ACTION ` .
*
* - 0 . 11 . 0 ( 2021 - 03 - 24 )
* - Added following to ` TERMUX_SERVICE ` :
* ` EXTRA_COMMAND_LABEL ` , ` EXTRA_COMMAND_DESCRIPTION ` , ` EXTRA_COMMAND_HELP ` , ` EXTRA_PLUGIN_API_HELP ` .
* - Added following to ` RUN_COMMAND_SERVICE ` :
* ` EXTRA_COMMAND_LABEL ` , ` EXTRA_COMMAND_DESCRIPTION ` , ` EXTRA_COMMAND_HELP ` .
* - Updated ` RESULT_BUNDLE ` related extras with ` PLUGIN_RESULT_BUNDLE ` prefixes .
2021-03-25 04:02:59 +00:00
*
* - 0 . 12 . 0 ( 2021 - 03 - 25 )
* - Added following to ` TERMUX_SERVICE ` :
* ` EXTRA_PLUGIN_RESULT_BUNDLE_STDOUT_ORIGINAL_LENGTH ` ,
* ` EXTRA_PLUGIN_RESULT_BUNDLE_STDERR_ORIGINAL_LENGTH ` .
2021-03-25 16:17:54 +00:00
*
* - 0 . 13 . 0 ( 2021 - 03 - 25 )
* - Added following to ` RUN_COMMAND_SERVICE ` :
* ` EXTRA_PENDING_INTENT ` .
2021-03-25 18:30:36 +00:00
*
* - 0 . 14 . 0 ( 2021 - 03 - 25 )
* - Added ` FDROID_PACKAGES_BASE_URL ` ,
* ` TERMUX_GITHUB_ORGANIZATION_NAME ` , ` TERMUX_GITHUB_ORGANIZATION_URL ` ,
* ` TERMUX_GITHUB_REPO_NAME ` , ` TERMUX_GITHUB_REPO_URL ` , ` TERMUX_FDROID_PACKAGE_URL ` ,
* ` TERMUX_API_GITHUB_REPO_NAME ` , ` TERMUX_API_GITHUB_REPO_URL ` , ` TERMUX_API_FDROID_PACKAGE_URL ` ,
* ` TERMUX_BOOT_GITHUB_REPO_NAME ` , ` TERMUX_BOOT_GITHUB_REPO_URL ` , ` TERMUX_BOOT_FDROID_PACKAGE_URL ` ,
* ` TERMUX_FLOAT_GITHUB_REPO_NAME ` , ` TERMUX_FLOAT_GITHUB_REPO_URL ` , ` TERMUX_FLOAT_FDROID_PACKAGE_URL ` ,
* ` TERMUX_STYLING_GITHUB_REPO_NAME ` , ` TERMUX_STYLING_GITHUB_REPO_URL ` , ` TERMUX_STYLING_FDROID_PACKAGE_URL ` ,
* ` TERMUX_TASKER_GITHUB_REPO_NAME ` , ` TERMUX_TASKER_GITHUB_REPO_URL ` , ` TERMUX_TASKER_FDROID_PACKAGE_URL ` ,
* ` TERMUX_WIDGET_GITHUB_REPO_NAME ` , ` TERMUX_WIDGET_GITHUB_REPO_URL ` ` TERMUX_WIDGET_FDROID_PACKAGE_URL ` .
2021-04-06 07:19:37 +00:00
*
* - 0 . 15 . 0 ( 2021 - 04 - 06 )
* - Fixed some variables that had ` PREFIX_ ` substring missing in their name .
* - Added ` TERMUX_CRASH_LOG_FILE_PATH ` , ` TERMUX_CRASH_LOG_BACKUP_FILE_PATH ` ,
* ` TERMUX_GITHUB_ISSUES_REPO_URL ` , ` TERMUX_API_GITHUB_ISSUES_REPO_URL ` ,
* ` TERMUX_BOOT_GITHUB_ISSUES_REPO_URL ` , ` TERMUX_FLOAT_GITHUB_ISSUES_REPO_URL ` ,
* ` TERMUX_STYLING_GITHUB_ISSUES_REPO_URL ` , ` TERMUX_TASKER_GITHUB_ISSUES_REPO_URL ` ,
* ` TERMUX_WIDGET_GITHUB_ISSUES_REPO_URL ` ,
* ` TERMUX_GITHUB_WIKI_REPO_URL ` , ` TERMUX_PACKAGES_GITHUB_WIKI_REPO_URL ` ,
* ` TERMUX_PACKAGES_GITHUB_REPO_NAME ` , ` TERMUX_PACKAGES_GITHUB_REPO_URL ` , ` TERMUX_PACKAGES_GITHUB_ISSUES_REPO_URL ` ,
* ` TERMUX_GAME_PACKAGES_GITHUB_REPO_NAME ` , ` TERMUX_GAME_PACKAGES_GITHUB_REPO_URL ` , ` TERMUX_GAME_PACKAGES_GITHUB_ISSUES_REPO_URL ` ,
* ` TERMUX_SCIENCE_PACKAGES_GITHUB_REPO_NAME ` , ` TERMUX_SCIENCE_PACKAGES_GITHUB_REPO_URL ` , ` TERMUX_SCIENCE_PACKAGES_GITHUB_ISSUES_REPO_URL ` ,
* ` TERMUX_ROOT_PACKAGES_GITHUB_REPO_NAME ` , ` TERMUX_ROOT_PACKAGES_GITHUB_REPO_URL ` , ` TERMUX_ROOT_PACKAGES_GITHUB_ISSUES_REPO_URL ` ,
* ` TERMUX_UNSTABLE_PACKAGES_GITHUB_REPO_NAME ` , ` TERMUX_UNSTABLE_PACKAGES_GITHUB_REPO_URL ` , ` TERMUX_UNSTABLE_PACKAGES_GITHUB_ISSUES_REPO_URL ` ,
* ` TERMUX_X11_PACKAGES_GITHUB_REPO_NAME ` , ` TERMUX_X11_PACKAGES_GITHUB_REPO_URL ` , ` TERMUX_X11_PACKAGES_GITHUB_ISSUES_REPO_URL ` .
* - Added following to ` RUN_COMMAND_SERVICE ` :
* ` RUN_COMMAND_API_HELP_URL ` .
2021-04-06 11:13:28 +00:00
*
* - 0 . 16 . 0 ( 2021 - 04 - 06 )
* - Added ` TERMUX_SUPPORT_EMAIL ` , ` TERMUX_SUPPORT_EMAIL_URL ` , ` TERMUX_SUPPORT_EMAIL_MAILTO_URL ` ,
* ` TERMUX_REDDIT_SUBREDDIT ` , ` TERMUX_REDDIT_SUBREDDIT_URL ` .
* - The ` TERMUX_SUPPORT_EMAIL_URL ` value must be fixed later when email has been set up .
2021-04-07 06:31:30 +00:00
*
* - 0 . 17 . 0 ( 2021 - 04 - 07 )
* - Added ` TERMUX_APP_NOTIFICATION_CHANNEL_ID ` , ` TERMUX_APP_NOTIFICATION_CHANNEL_NAME ` , ` TERMUX_APP_NOTIFICATION_ID ` ,
* ` TERMUX_RUN_COMMAND_NOTIFICATION_CHANNEL_ID ` , ` TERMUX_RUN_COMMAND_NOTIFICATION_CHANNEL_NAME ` , ` TERMUX_RUN_COMMAND_NOTIFICATION_ID ` ,
* ` TERMUX_PLUGIN_COMMAND_ERRORS_NOTIFICATION_CHANNEL_ID ` , ` TERMUX_PLUGIN_COMMAND_ERRORS_NOTIFICATION_CHANNEL_NAME ` ,
* ` TERMUX_CRASH_REPORTS_NOTIFICATION_CHANNEL_ID ` , ` TERMUX_CRASH_REPORTS_NOTIFICATION_CHANNEL_NAME ` .
* - Updated javadocs .
2021-03-11 15:11:59 +00:00
* /
2021-03-08 10:09:22 +00:00
/ * *
* A class that defines shared constants of the Termux app and its plugins .
2021-04-07 06:31:30 +00:00
* This class will be hosted by termux - shared lib and should be imported by other termux plugin
* apps as is instead of copying constants to random classes . The 3rd party apps can also import
* it for interacting with termux apps . If changes are made to this file , increment the version number
2021-03-11 15:11:59 +00:00
* and add an entry in the Changelog section above .
2021-03-08 10:09:22 +00:00
*
2021-03-16 20:13:44 +00:00
* Termux app default package name is " com.termux " and is used in { @link # TERMUX_PREFIX_DIR_PATH } .
* The binaries compiled for termux have { @link # TERMUX_PREFIX_DIR_PATH } hardcoded in them but it
* can be changed during compilation .
2021-03-08 10:09:22 +00:00
*
2021-03-16 20:13:44 +00:00
* The { @link # TERMUX_PACKAGE_NAME } must be the same as the applicationId of termux - app build . gradle
* since its also used by { @link # TERMUX_FILES_DIR_PATH } .
* If { @link # TERMUX_PACKAGE_NAME } is changed , then binaries , specially used in bootstrap need to be
* compiled appropriately . Check https : //github.com/termux/termux-packages/wiki/Building-packages
* for more info .
2021-03-08 10:09:22 +00:00
*
* Ideally the only places where changes should be required if changing package name are the following :
2021-03-16 20:13:44 +00:00
* - The { @link # TERMUX_PACKAGE_NAME } in { @link TermuxConstants } .
2021-04-07 06:31:30 +00:00
* - The " applicationId " in " build.gradle " of termux - app . This is package name that android and app
* stores will use and is also the final package name stored in " AndroidManifest.xml " .
* - The " manifestPlaceholders " values for { @link # TERMUX_PACKAGE_NAME } and * _APP_NAME in
* " build.gradle " of termux - app .
* - The " ENTITY " values for { @link # TERMUX_PACKAGE_NAME } and * _APP_NAME in " strings.xml " of
* termux - app and of termux - shared .
* - The " shortcut.xml " and " *_preferences.xml " files of termux - app since dynamic variables don ' t
2021-03-25 16:17:54 +00:00
* work in it .
2021-04-07 06:31:30 +00:00
* - Optionally the " package " in " AndroidManifest.xml " if modifying project structure of termux - app .
* This is package name for java classes project structure and is prefixed if activity and service
* names use dot ( . ) notation . This is currently not advisable since this will break lot of
* stuff , including termux - * packages .
2021-03-16 20:13:44 +00:00
* - Optionally the * _PATH variables in { @link TermuxConstants } containing the string " termux " .
2021-03-08 10:09:22 +00:00
*
* Check https : //developer.android.com/studio/build/application-id for info on "package" in
* " AndroidManifest.xml " and " applicationId " in " build.gradle " .
*
2021-04-07 06:31:30 +00:00
* The { @link # TERMUX_PACKAGE_NAME } must be used in source code of Termux app and its plugins instead
* of hardcoded " com.termux " paths .
2021-03-08 10:09:22 +00:00
* /
public final class TermuxConstants {
2021-03-25 18:30:36 +00:00
/ *
* Termux organization variables .
* /
/** Termux Github organization name */
public static final String TERMUX_GITHUB_ORGANIZATION_NAME = " termux " ; // Default: "termux"
/** Termux Github organization url */
public static final String TERMUX_GITHUB_ORGANIZATION_URL = " https://github.com " + " / " + TERMUX_GITHUB_ORGANIZATION_NAME ; // Default: "https://github.com/termux"
2021-04-06 11:13:28 +00:00
/** Termux support email */
public static final String TERMUX_SUPPORT_EMAIL = " support " ; // Default: "support"
/** Termux support email url */
public static final String TERMUX_SUPPORT_EMAIL_URL = " email@example.com " ; // Default: "email@example.com"
/** Termux support email mailto url */
public static final String TERMUX_SUPPORT_EMAIL_MAILTO_URL = " mailto: " + TERMUX_SUPPORT_EMAIL_URL ; // Default: "mailto:email@example.com"
/** Termux Reddit subreddit */
public static final String TERMUX_REDDIT_SUBREDDIT = " r/termux " ; // Default: "r/termux"
/** Termux Reddit subreddit url */
public static final String TERMUX_REDDIT_SUBREDDIT_URL = " https://www.reddit.com/r/termux " ; // Default: "https://www.reddit.com/r/termux"
2021-03-25 18:30:36 +00:00
/** F-Droid packages base url */
public static final String FDROID_PACKAGES_BASE_URL = " https://f-droid.org/en/packages " ; // Default: "https://f-droid.org/en/packages"
2021-04-06 11:13:28 +00:00
2021-03-11 15:11:59 +00:00
/ *
2021-04-06 07:19:37 +00:00
* Termux and its plugin app and package names and urls .
2021-03-08 10:09:22 +00:00
* /
2021-03-11 15:11:59 +00:00
/** Termux app name */
2021-03-08 10:09:22 +00:00
public static final String TERMUX_APP_NAME = " Termux " ; // Default: "Termux"
2021-03-25 18:30:36 +00:00
/** Termux package name */
2021-03-08 10:09:22 +00:00
public static final String TERMUX_PACKAGE_NAME = " com.termux " ; // Default: "com.termux"
2021-03-25 18:30:36 +00:00
/** Termux Github repo name */
public static final String TERMUX_GITHUB_REPO_NAME = " termux-app " ; // Default: "termux-app"
/** Termux Github repo url */
public static final String TERMUX_GITHUB_REPO_URL = TERMUX_GITHUB_ORGANIZATION_URL + " / " + TERMUX_GITHUB_REPO_NAME ; // Default: "https://github.com/termux/termux-app"
2021-04-06 07:19:37 +00:00
/** Termux Github issues repo url */
public static final String TERMUX_GITHUB_ISSUES_REPO_URL = TERMUX_GITHUB_REPO_URL + " /issues " ; // Default: "https://github.com/termux/termux-app/issues"
/** Termux Github wiki repo url */
public static final String TERMUX_GITHUB_WIKI_REPO_URL = TERMUX_GITHUB_REPO_URL + " /wiki " ; // Default: "https://github.com/termux/termux-app/wiki"
2021-03-25 18:30:36 +00:00
/** Termux F-Droid package url */
public static final String TERMUX_FDROID_PACKAGE_URL = FDROID_PACKAGES_BASE_URL + " / " + TERMUX_PACKAGE_NAME ; // Default: "https://f-droid.org/en/packages/com.termux"
2021-03-08 10:09:22 +00:00
2021-03-11 15:11:59 +00:00
/** Termux API app name */
2021-03-08 10:09:22 +00:00
public static final String TERMUX_API_APP_NAME = " Termux:API " ; // Default: "Termux:API"
2021-03-11 15:11:59 +00:00
/** Termux API app package name */
2021-03-08 10:09:22 +00:00
public static final String TERMUX_API_PACKAGE_NAME = TERMUX_PACKAGE_NAME + " .api " ; // Default: "com.termux.api"
2021-03-25 18:30:36 +00:00
/** Termux API Github repo name */
public static final String TERMUX_API_GITHUB_REPO_NAME = " termux-api " ; // Default: "termux-api"
/** Termux API Github repo url */
public static final String TERMUX_API_GITHUB_REPO_URL = TERMUX_GITHUB_ORGANIZATION_URL + " / " + TERMUX_API_GITHUB_REPO_NAME ; // Default: "https://github.com/termux/termux-api"
2021-04-06 07:19:37 +00:00
/** Termux API Github issues repo url */
public static final String TERMUX_API_GITHUB_ISSUES_REPO_URL = TERMUX_API_GITHUB_REPO_URL + " /issues " ; // Default: "https://github.com/termux/termux-api/issues"
2021-03-25 18:30:36 +00:00
/** Termux API F-Droid package url */
public static final String TERMUX_API_FDROID_PACKAGE_URL = FDROID_PACKAGES_BASE_URL + " / " + TERMUX_API_PACKAGE_NAME ; // Default: "https://f-droid.org/en/packages/com.termux.api"
2021-03-08 10:09:22 +00:00
2021-03-11 15:11:59 +00:00
/** Termux Boot app name */
2021-03-08 10:09:22 +00:00
public static final String TERMUX_BOOT_APP_NAME = " Termux:Boot " ; // Default: "Termux:Boot"
2021-03-11 15:11:59 +00:00
/** Termux Boot app package name */
2021-03-08 10:09:22 +00:00
public static final String TERMUX_BOOT_PACKAGE_NAME = TERMUX_PACKAGE_NAME + " .boot " ; // Default: "com.termux.boot"
2021-03-25 18:30:36 +00:00
/** Termux Boot Github repo name */
public static final String TERMUX_BOOT_GITHUB_REPO_NAME = " termux-boot " ; // Default: "termux-boot"
/** Termux Boot Github repo url */
public static final String TERMUX_BOOT_GITHUB_REPO_URL = TERMUX_GITHUB_ORGANIZATION_URL + " / " + TERMUX_BOOT_GITHUB_REPO_NAME ; // Default: "https://github.com/termux/termux-boot"
2021-04-06 07:19:37 +00:00
/** Termux Boot Github issues repo url */
public static final String TERMUX_BOOT_GITHUB_ISSUES_REPO_URL = TERMUX_BOOT_GITHUB_REPO_URL + " /issues " ; // Default: "https://github.com/termux/termux-boot/issues"
2021-03-25 18:30:36 +00:00
/** Termux Boot F-Droid package url */
public static final String TERMUX_BOOT_FDROID_PACKAGE_URL = FDROID_PACKAGES_BASE_URL + " / " + TERMUX_BOOT_PACKAGE_NAME ; // Default: "https://f-droid.org/en/packages/com.termux.boot"
2021-03-08 10:09:22 +00:00
2021-03-11 15:11:59 +00:00
/** Termux Float app name */
2021-03-08 10:09:22 +00:00
public static final String TERMUX_FLOAT_APP_NAME = " Termux:Float " ; // Default: "Termux:Float"
2021-03-11 15:11:59 +00:00
/** Termux Float app package name */
2021-03-08 10:09:22 +00:00
public static final String TERMUX_FLOAT_PACKAGE_NAME = TERMUX_PACKAGE_NAME + " .window " ; // Default: "com.termux.window"
2021-03-25 18:30:36 +00:00
/** Termux Float Github repo name */
public static final String TERMUX_FLOAT_GITHUB_REPO_NAME = " termux-float " ; // Default: "termux-float"
/** Termux Float Github repo url */
public static final String TERMUX_FLOAT_GITHUB_REPO_URL = TERMUX_GITHUB_ORGANIZATION_URL + " / " + TERMUX_FLOAT_GITHUB_REPO_NAME ; // Default: "https://github.com/termux/termux-float"
2021-04-06 07:19:37 +00:00
/** Termux Float Github issues repo url */
public static final String TERMUX_FLOAT_GITHUB_ISSUES_REPO_URL = TERMUX_FLOAT_GITHUB_REPO_URL + " /issues " ; // Default: "https://github.com/termux/termux-float/issues"
2021-03-25 18:30:36 +00:00
/** Termux Float F-Droid package url */
public static final String TERMUX_FLOAT_FDROID_PACKAGE_URL = FDROID_PACKAGES_BASE_URL + " / " + TERMUX_FLOAT_PACKAGE_NAME ; // Default: "https://f-droid.org/en/packages/com.termux.window"
2021-03-08 10:09:22 +00:00
2021-03-11 15:11:59 +00:00
/** Termux Styling app name */
2021-03-08 10:09:22 +00:00
public static final String TERMUX_STYLING_APP_NAME = " Termux:Styling " ; // Default: "Termux:Styling"
2021-03-11 15:11:59 +00:00
/** Termux Styling app package name */
2021-03-08 10:09:22 +00:00
public static final String TERMUX_STYLING_PACKAGE_NAME = TERMUX_PACKAGE_NAME + " .styling " ; // Default: "com.termux.styling"
2021-03-25 18:30:36 +00:00
/** Termux Styling Github repo name */
public static final String TERMUX_STYLING_GITHUB_REPO_NAME = " termux-styling " ; // Default: "termux-styling"
/** Termux Styling Github repo url */
public static final String TERMUX_STYLING_GITHUB_REPO_URL = TERMUX_GITHUB_ORGANIZATION_URL + " / " + TERMUX_STYLING_GITHUB_REPO_NAME ; // Default: "https://github.com/termux/termux-styling"
2021-04-06 07:19:37 +00:00
/** Termux Styling Github issues repo url */
public static final String TERMUX_STYLING_GITHUB_ISSUES_REPO_URL = TERMUX_STYLING_GITHUB_REPO_URL + " /issues " ; // Default: "https://github.com/termux/termux-styling/issues"
2021-03-25 18:30:36 +00:00
/** Termux Styling F-Droid package url */
public static final String TERMUX_STYLING_FDROID_PACKAGE_URL = FDROID_PACKAGES_BASE_URL + " / " + TERMUX_STYLING_PACKAGE_NAME ; // Default: "https://f-droid.org/en/packages/com.termux.styling"
2021-03-08 10:09:22 +00:00
2021-03-11 15:11:59 +00:00
2021-03-16 14:07:54 +00:00
/** Termux Tasker app name */
2021-03-08 10:09:22 +00:00
public static final String TERMUX_TASKER_APP_NAME = " Termux:Tasker " ; // Default: "Termux:Tasker"
2021-03-16 14:07:54 +00:00
/** Termux Tasker app package name */
2021-03-08 10:09:22 +00:00
public static final String TERMUX_TASKER_PACKAGE_NAME = TERMUX_PACKAGE_NAME + " .tasker " ; // Default: "com.termux.tasker"
2021-03-25 18:30:36 +00:00
/** Termux Tasker Github repo name */
public static final String TERMUX_TASKER_GITHUB_REPO_NAME = " termux-tasker " ; // Default: "termux-tasker"
/** Termux Tasker Github repo url */
public static final String TERMUX_TASKER_GITHUB_REPO_URL = TERMUX_GITHUB_ORGANIZATION_URL + " / " + TERMUX_TASKER_GITHUB_REPO_NAME ; // Default: "https://github.com/termux/termux-tasker"
2021-04-06 07:19:37 +00:00
/** Termux Tasker Github issues repo url */
public static final String TERMUX_TASKER_GITHUB_ISSUES_REPO_URL = TERMUX_TASKER_GITHUB_REPO_URL + " /issues " ; // Default: "https://github.com/termux/termux-tasker/issues"
2021-03-25 18:30:36 +00:00
/** Termux Tasker F-Droid package url */
public static final String TERMUX_TASKER_FDROID_PACKAGE_URL = FDROID_PACKAGES_BASE_URL + " / " + TERMUX_TASKER_PACKAGE_NAME ; // Default: "https://f-droid.org/en/packages/com.termux.tasker"
2021-03-08 10:09:22 +00:00
2021-03-11 15:11:59 +00:00
/** Termux Widget app name */
2021-03-08 10:09:22 +00:00
public static final String TERMUX_WIDGET_APP_NAME = " Termux:Widget " ; // Default: "Termux:Widget"
2021-03-11 15:11:59 +00:00
/** Termux Widget app package name */
2021-03-08 10:09:22 +00:00
public static final String TERMUX_WIDGET_PACKAGE_NAME = TERMUX_PACKAGE_NAME + " .widget " ; // Default: "com.termux.widget"
2021-03-25 18:30:36 +00:00
/** Termux Widget Github repo name */
public static final String TERMUX_WIDGET_GITHUB_REPO_NAME = " termux-widget " ; // Default: "termux-widget"
/** Termux Widget Github repo url */
public static final String TERMUX_WIDGET_GITHUB_REPO_URL = TERMUX_GITHUB_ORGANIZATION_URL + " / " + TERMUX_WIDGET_GITHUB_REPO_NAME ; // Default: "https://github.com/termux/termux-widget"
2021-04-06 07:19:37 +00:00
/** Termux Widget Github issues repo url */
public static final String TERMUX_WIDGET_GITHUB_ISSUES_REPO_URL = TERMUX_WIDGET_GITHUB_REPO_URL + " /issues " ; // Default: "https://github.com/termux/termux-widget/issues"
2021-03-25 18:30:36 +00:00
/** Termux Widget F-Droid package url */
public static final String TERMUX_WIDGET_FDROID_PACKAGE_URL = FDROID_PACKAGES_BASE_URL + " / " + TERMUX_WIDGET_PACKAGE_NAME ; // Default: "https://f-droid.org/en/packages/com.termux.widget"
2021-03-08 10:09:22 +00:00
2021-03-11 15:11:59 +00:00
2021-04-06 07:19:37 +00:00
/ *
* Termux packages urls .
* /
/** Termux Packages Github repo name */
public static final String TERMUX_PACKAGES_GITHUB_REPO_NAME = " termux-packages " ; // Default: "termux-packages"
/** Termux Packages Github repo url */
public static final String TERMUX_PACKAGES_GITHUB_REPO_URL = TERMUX_GITHUB_ORGANIZATION_URL + " / " + TERMUX_PACKAGES_GITHUB_REPO_NAME ; // Default: "https://github.com/termux/termux-packages"
/** Termux Packages Github issues repo url */
public static final String TERMUX_PACKAGES_GITHUB_ISSUES_REPO_URL = TERMUX_PACKAGES_GITHUB_REPO_URL + " /issues " ; // Default: "https://github.com/termux/termux-packages/issues"
/** Termux Packages wiki repo url */
public static final String TERMUX_PACKAGES_GITHUB_WIKI_REPO_URL = TERMUX_PACKAGES_GITHUB_REPO_URL + " /wiki " ; // Default: "https://github.com/termux/termux-packages/wiki"
/** Termux Game Packages Github repo name */
public static final String TERMUX_GAME_PACKAGES_GITHUB_REPO_NAME = " game-packages " ; // Default: "game-packages"
/** Termux Game Packages Github repo url */
public static final String TERMUX_GAME_PACKAGES_GITHUB_REPO_URL = TERMUX_GITHUB_ORGANIZATION_URL + " / " + TERMUX_GAME_PACKAGES_GITHUB_REPO_NAME ; // Default: "https://github.com/termux/game-packages"
/** Termux Game Packages Github issues repo url */
public static final String TERMUX_GAME_PACKAGES_GITHUB_ISSUES_REPO_URL = TERMUX_GAME_PACKAGES_GITHUB_REPO_URL + " /issues " ; // Default: "https://github.com/termux/game-packages/issues"
/** Termux Science Packages Github repo name */
public static final String TERMUX_SCIENCE_PACKAGES_GITHUB_REPO_NAME = " science-packages " ; // Default: "science-packages"
/** Termux Science Packages Github repo url */
public static final String TERMUX_SCIENCE_PACKAGES_GITHUB_REPO_URL = TERMUX_GITHUB_ORGANIZATION_URL + " / " + TERMUX_SCIENCE_PACKAGES_GITHUB_REPO_NAME ; // Default: "https://github.com/termux/science-packages"
/** Termux Science Packages Github issues repo url */
public static final String TERMUX_SCIENCE_PACKAGES_GITHUB_ISSUES_REPO_URL = TERMUX_SCIENCE_PACKAGES_GITHUB_REPO_URL + " /issues " ; // Default: "https://github.com/termux/science-packages/issues"
/** Termux Root Packages Github repo name */
public static final String TERMUX_ROOT_PACKAGES_GITHUB_REPO_NAME = " termux-root-packages " ; // Default: "termux-root-packages"
/** Termux Root Packages Github repo url */
public static final String TERMUX_ROOT_PACKAGES_GITHUB_REPO_URL = TERMUX_GITHUB_ORGANIZATION_URL + " / " + TERMUX_ROOT_PACKAGES_GITHUB_REPO_NAME ; // Default: "https://github.com/termux/termux-root-packages"
/** Termux Root Packages Github issues repo url */
public static final String TERMUX_ROOT_PACKAGES_GITHUB_ISSUES_REPO_URL = TERMUX_ROOT_PACKAGES_GITHUB_REPO_URL + " /issues " ; // Default: "https://github.com/termux/termux-root-packages/issues"
/** Termux Unstable Packages Github repo name */
public static final String TERMUX_UNSTABLE_PACKAGES_GITHUB_REPO_NAME = " unstable-packages " ; // Default: "unstable-packages"
/** Termux Unstable Packages Github repo url */
public static final String TERMUX_UNSTABLE_PACKAGES_GITHUB_REPO_URL = TERMUX_GITHUB_ORGANIZATION_URL + " / " + TERMUX_UNSTABLE_PACKAGES_GITHUB_REPO_NAME ; // Default: "https://github.com/termux/unstable-packages"
/** Termux Unstable Packages Github issues repo url */
public static final String TERMUX_UNSTABLE_PACKAGES_GITHUB_ISSUES_REPO_URL = TERMUX_UNSTABLE_PACKAGES_GITHUB_REPO_URL + " /issues " ; // Default: "https://github.com/termux/unstable-packages/issues"
/** Termux X11 Packages Github repo name */
public static final String TERMUX_X11_PACKAGES_GITHUB_REPO_NAME = " x11-packages " ; // Default: "x11-packages"
/** Termux X11 Packages Github repo url */
public static final String TERMUX_X11_PACKAGES_GITHUB_REPO_URL = TERMUX_GITHUB_ORGANIZATION_URL + " / " + TERMUX_X11_PACKAGES_GITHUB_REPO_NAME ; // Default: "https://github.com/termux/x11-packages"
/** Termux X11 Packages Github issues repo url */
public static final String TERMUX_X11_PACKAGES_GITHUB_ISSUES_REPO_URL = TERMUX_X11_PACKAGES_GITHUB_REPO_URL + " /issues " ; // Default: "https://github.com/termux/x11-packages/issues"
2021-03-11 15:11:59 +00:00
/ *
* Termux app core directory paths .
2021-03-08 10:09:22 +00:00
* /
2021-03-11 15:11:59 +00:00
/** Termux app internal private app data directory path */
2021-03-08 10:09:22 +00:00
@SuppressLint ( " SdCardPath " )
2021-03-11 15:11:59 +00:00
public static final String INTERNAL_PRIVATE_APP_DATA_DIR_PATH = " /data/data/ " + TERMUX_PACKAGE_NAME ; // Default: "/data/data/com.termux"
/** Termux app internal private app data directory */
public static final File INTERNAL_PRIVATE_APP_DATA_DIR = new File ( INTERNAL_PRIVATE_APP_DATA_DIR_PATH ) ;
2021-03-08 10:09:22 +00:00
2021-03-11 15:11:59 +00:00
/** Termux app Files directory path */
public static final String TERMUX_FILES_DIR_PATH = INTERNAL_PRIVATE_APP_DATA_DIR_PATH + " /files " ; // Default: "/data/data/com.termux/files"
/** Termux app Files directory */
public static final File TERMUX_FILES_DIR = new File ( TERMUX_FILES_DIR_PATH ) ;
/** Termux app $PREFIX directory path */
public static final String TERMUX_PREFIX_DIR_PATH = TERMUX_FILES_DIR_PATH + " /usr " ; // Default: "/data/data/com.termux/files/usr"
/** Termux app $PREFIX directory */
public static final File TERMUX_PREFIX_DIR = new File ( TERMUX_PREFIX_DIR_PATH ) ;
/** Termux app $PREFIX/bin directory path */
public static final String TERMUX_BIN_PREFIX_DIR_PATH = TERMUX_PREFIX_DIR_PATH + " /bin " ; // Default: "/data/data/com.termux/files/usr/bin"
/** Termux app $PREFIX/bin directory */
public static final File TERMUX_BIN_PREFIX_DIR = new File ( TERMUX_BIN_PREFIX_DIR_PATH ) ;
/** Termux app $PREFIX/etc directory path */
public static final String TERMUX_ETC_PREFIX_DIR_PATH = TERMUX_PREFIX_DIR_PATH + " /etc " ; // Default: "/data/data/com.termux/files/usr/etc"
/** Termux app $PREFIX/etc directory */
2021-04-06 07:19:37 +00:00
public static final File TERMUX_ETC_PREFIX_DIR = new File ( TERMUX_ETC_PREFIX_DIR_PATH ) ;
2021-03-11 15:11:59 +00:00
/** Termux app $PREFIX/include directory path */
public static final String TERMUX_INCLUDE_PREFIX_DIR_PATH = TERMUX_PREFIX_DIR_PATH + " /include " ; // Default: "/data/data/com.termux/files/usr/include"
/** Termux app $PREFIX/include directory */
2021-04-06 07:19:37 +00:00
public static final File TERMUX_INCLUDE_PREFIX_DIR = new File ( TERMUX_INCLUDE_PREFIX_DIR_PATH ) ;
2021-03-11 15:11:59 +00:00
/** Termux app $PREFIX/lib directory path */
public static final String TERMUX_LIB_PREFIX_DIR_PATH = TERMUX_PREFIX_DIR_PATH + " /lib " ; // Default: "/data/data/com.termux/files/usr/lib"
/** Termux app $PREFIX/lib directory */
2021-04-06 07:19:37 +00:00
public static final File TERMUX_LIB_PREFIX_DIR = new File ( TERMUX_LIB_PREFIX_DIR_PATH ) ;
2021-03-11 15:11:59 +00:00
/** Termux app $PREFIX/libexec directory path */
public static final String TERMUX_LIBEXEC_PREFIX_DIR_PATH = TERMUX_PREFIX_DIR_PATH + " /libexec " ; // Default: "/data/data/com.termux/files/usr/libexec"
/** Termux app $PREFIX/libexec directory */
2021-04-06 07:19:37 +00:00
public static final File TERMUX_LIBEXEC_PREFIX_DIR = new File ( TERMUX_LIBEXEC_PREFIX_DIR_PATH ) ;
2021-03-11 15:11:59 +00:00
/** Termux app $PREFIX/share directory path */
public static final String TERMUX_SHARE_PREFIX_DIR_PATH = TERMUX_PREFIX_DIR_PATH + " /share " ; // Default: "/data/data/com.termux/files/usr/share"
/** Termux app $PREFIX/share directory */
2021-04-06 07:19:37 +00:00
public static final File TERMUX_SHARE_PREFIX_DIR = new File ( TERMUX_SHARE_PREFIX_DIR_PATH ) ;
2021-03-11 15:11:59 +00:00
2021-04-06 07:19:37 +00:00
/** Termux app $PREFIX/tmp and $TMPDIR directory path */
2021-03-11 15:11:59 +00:00
public static final String TERMUX_TMP_PREFIX_DIR_PATH = TERMUX_PREFIX_DIR_PATH + " /tmp " ; // Default: "/data/data/com.termux/files/usr/tmp"
2021-04-06 07:19:37 +00:00
/** Termux app $PREFIX/tmp and $TMPDIR directory */
public static final File TERMUX_TMP_PREFIX_DIR = new File ( TERMUX_TMP_PREFIX_DIR_PATH ) ;
2021-03-11 15:11:59 +00:00
/** Termux app $PREFIX/var directory path */
public static final String TERMUX_VAR_PREFIX_DIR_PATH = TERMUX_PREFIX_DIR_PATH + " /var " ; // Default: "/data/data/com.termux/files/usr/var"
/** Termux app $PREFIX/var directory */
2021-04-06 07:19:37 +00:00
public static final File TERMUX_VAR_PREFIX_DIR = new File ( TERMUX_VAR_PREFIX_DIR_PATH ) ;
2021-03-11 15:11:59 +00:00
/** Termux app usr-staging directory path */
public static final String TERMUX_STAGING_PREFIX_DIR_PATH = TERMUX_FILES_DIR_PATH + " /usr-staging " ; // Default: "/data/data/com.termux/files/usr-staging"
/** Termux app usr-staging directory */
public static final File TERMUX_STAGING_PREFIX_DIR = new File ( TERMUX_STAGING_PREFIX_DIR_PATH ) ;
/** Termux app $HOME directory path */
public static final String TERMUX_HOME_DIR_PATH = TERMUX_FILES_DIR_PATH + " /home " ; // Default: "/data/data/com.termux/files/home"
/** Termux app $HOME directory */
public static final File TERMUX_HOME_DIR = new File ( TERMUX_HOME_DIR_PATH ) ;
/** Termux app config home directory path */
public static final String TERMUX_CONFIG_HOME_DIR_PATH = TERMUX_HOME_DIR_PATH + " /.config/termux " ; // Default: "/data/data/com.termux/files/home/.config/termux"
/** Termux app config home directory */
public static final File TERMUX_CONFIG_HOME_DIR = new File ( TERMUX_CONFIG_HOME_DIR_PATH ) ;
/** Termux app data home directory path */
public static final String TERMUX_DATA_HOME_DIR_PATH = TERMUX_HOME_DIR_PATH + " /.termux " ; // Default: "/data/data/com.termux/files/home/.termux"
/** Termux app data home directory */
public static final File TERMUX_DATA_HOME_DIR = new File ( TERMUX_DATA_HOME_DIR_PATH ) ;
/** Termux app storage home directory path */
public static final String TERMUX_STORAGE_HOME_DIR_PATH = TERMUX_HOME_DIR_PATH + " /storage " ; // Default: "/data/data/com.termux/files/home/storage"
/** Termux app storage home directory */
public static final File TERMUX_STORAGE_HOME_DIR = new File ( TERMUX_STORAGE_HOME_DIR_PATH ) ;
/ *
2021-03-15 22:59:54 +00:00
* Termux app and plugin preferences and properties file paths .
2021-03-08 10:09:22 +00:00
* /
2021-03-18 16:52:22 +00:00
/** Termux app default SharedPreferences file basename without extension */
2021-03-12 00:53:10 +00:00
public static final String TERMUX_DEFAULT_PREFERENCES_FILE_BASENAME_WITHOUT_EXTENSION = TERMUX_PACKAGE_NAME + " _preferences " ; // Default: "com.termux_preferences"
2021-03-08 10:09:22 +00:00
2021-03-18 16:52:22 +00:00
/** Termux API app default SharedPreferences file basename without extension */
2021-03-15 22:59:54 +00:00
public static final String TERMUX_API_DEFAULT_PREFERENCES_FILE_BASENAME_WITHOUT_EXTENSION = TERMUX_API_PACKAGE_NAME + " _preferences " ; // Default: "com.termux.api_preferences"
2021-03-18 16:52:22 +00:00
/** Termux Boot app default SharedPreferences file basename without extension */
2021-03-15 22:59:54 +00:00
public static final String TERMUX_BOOT_DEFAULT_PREFERENCES_FILE_BASENAME_WITHOUT_EXTENSION = TERMUX_BOOT_PACKAGE_NAME + " _preferences " ; // Default: "com.termux.boot_preferences"
2021-03-18 16:52:22 +00:00
/** Termux Float app default SharedPreferences file basename without extension */
2021-03-15 22:59:54 +00:00
public static final String TERMUX_FLOAT_DEFAULT_PREFERENCES_FILE_BASENAME_WITHOUT_EXTENSION = TERMUX_FLOAT_PACKAGE_NAME + " _preferences " ; // Default: "com.termux.window_preferences"
2021-03-18 16:52:22 +00:00
/** Termux Styling app default SharedPreferences file basename without extension */
2021-03-15 22:59:54 +00:00
public static final String TERMUX_STYLING_DEFAULT_PREFERENCES_FILE_BASENAME_WITHOUT_EXTENSION = TERMUX_STYLING_PACKAGE_NAME + " _preferences " ; // Default: "com.termux.styling_preferences"
2021-03-18 16:52:22 +00:00
/** Termux Tasker app default SharedPreferences file basename without extension */
2021-03-15 22:59:54 +00:00
public static final String TERMUX_TASKER_DEFAULT_PREFERENCES_FILE_BASENAME_WITHOUT_EXTENSION = TERMUX_TASKER_PACKAGE_NAME + " _preferences " ; // Default: "com.termux.tasker_preferences"
2021-03-18 16:52:22 +00:00
/** Termux Widget app default SharedPreferences file basename without extension */
2021-03-15 22:59:54 +00:00
public static final String TERMUX_WIDGET_DEFAULT_PREFERENCES_FILE_BASENAME_WITHOUT_EXTENSION = TERMUX_WIDGET_PACKAGE_NAME + " _preferences " ; // Default: "com.termux.widget_preferences"
2021-03-08 10:09:22 +00:00
2021-03-18 16:52:22 +00:00
/** Termux app termux.properties primary file path */
2021-03-11 15:11:59 +00:00
public static final String TERMUX_PROPERTIES_PRIMARY_FILE_PATH = TERMUX_DATA_HOME_DIR_PATH + " /termux.properties " ; // Default: "/data/data/com.termux/files/home/.termux/termux.properties"
2021-03-18 16:52:22 +00:00
/** Termux app termux.properties primary file */
2021-03-11 15:11:59 +00:00
public static final File TERMUX_PROPERTIES_PRIMARY_FILE = new File ( TERMUX_PROPERTIES_PRIMARY_FILE_PATH ) ;
2021-03-08 10:09:22 +00:00
2021-03-18 16:52:22 +00:00
/** Termux app termux.properties secondary file path */
2021-03-11 15:11:59 +00:00
public static final String TERMUX_PROPERTIES_SECONDARY_FILE_PATH = TERMUX_CONFIG_HOME_DIR_PATH + " /termux.properties " ; // Default: "/data/data/com.termux/files/home/.config/termux/termux.properties"
2021-03-18 16:52:22 +00:00
/** Termux app termux.properties secondary file */
2021-03-11 15:11:59 +00:00
public static final File TERMUX_PROPERTIES_SECONDARY_FILE = new File ( TERMUX_PROPERTIES_SECONDARY_FILE_PATH ) ;
2021-03-08 10:09:22 +00:00
2021-03-15 22:59:54 +00:00
2021-03-18 16:52:22 +00:00
/** Termux app and Termux:Styling colors.properties file path */
2021-03-11 15:11:59 +00:00
public static final String TERMUX_COLOR_PROPERTIES_FILE_PATH = TERMUX_DATA_HOME_DIR_PATH + " /colors.properties " ; // Default: "/data/data/com.termux/files/home/.termux/colors.properties"
2021-03-18 16:52:22 +00:00
/** Termux app and Termux:Styling colors.properties file */
2021-03-11 15:11:59 +00:00
public static final File TERMUX_COLOR_PROPERTIES_FILE = new File ( TERMUX_COLOR_PROPERTIES_FILE_PATH ) ;
2021-03-08 10:09:22 +00:00
2021-03-18 16:52:22 +00:00
/** Termux app and Termux:Styling font.ttf file path */
2021-03-11 15:11:59 +00:00
public static final String TERMUX_FONT_FILE_PATH = TERMUX_DATA_HOME_DIR_PATH + " /font.ttf " ; // Default: "/data/data/com.termux/files/home/.termux/font.ttf"
2021-03-18 16:52:22 +00:00
/** Termux app and Termux:Styling font.ttf file */
2021-03-11 15:11:59 +00:00
public static final File TERMUX_FONT_FILE = new File ( TERMUX_FONT_FILE_PATH ) ;
2021-03-08 10:09:22 +00:00
2021-04-06 07:19:37 +00:00
/** Termux app and plugins crash log file path */
public static final String TERMUX_CRASH_LOG_FILE_PATH = TERMUX_HOME_DIR_PATH + " /crash_log.md " ; // Default: "/data/data/com.termux/files/home/crash_log.md"
/** Termux app and plugins crash log backup file path */
public static final String TERMUX_CRASH_LOG_BACKUP_FILE_PATH = TERMUX_HOME_DIR_PATH + " /crash_log_backup.md " ; // Default: "/data/data/com.termux/files/home/crash_log_backup.md"
2021-03-08 10:09:22 +00:00
2021-03-11 15:11:59 +00:00
/ *
* Termux app plugin specific paths .
2021-03-08 10:09:22 +00:00
* /
2021-03-25 18:30:36 +00:00
/** Termux app directory path to store scripts to be run at boot by Termux:Boot */
2021-03-11 15:11:59 +00:00
public static final String TERMUX_BOOT_SCRIPTS_DIR_PATH = TERMUX_DATA_HOME_DIR_PATH + " /boot " ; // Default: "/data/data/com.termux/files/home/.termux/boot"
2021-03-18 16:52:22 +00:00
/** Termux app directory to store scripts to be run at boot by Termux:Boot */
2021-03-11 15:11:59 +00:00
public static final File TERMUX_BOOT_SCRIPTS_DIR = new File ( TERMUX_BOOT_SCRIPTS_DIR_PATH ) ;
2021-03-18 16:52:22 +00:00
/** Termux app directory path to store foreground scripts that can be run by the termux launcher widget provided by Termux:Widget */
2021-03-11 15:11:59 +00:00
public static final String TERMUX_SHORTCUT_SCRIPTS_DIR_PATH = TERMUX_DATA_HOME_DIR_PATH + " /shortcuts " ; // Default: "/data/data/com.termux/files/home/.termux/shortcuts"
2021-03-18 16:52:22 +00:00
/** Termux app directory to store foreground scripts that can be run by the termux launcher widget provided by Termux:Widget */
2021-03-11 15:11:59 +00:00
public static final File TERMUX_SHORTCUT_SCRIPTS_DIR = new File ( TERMUX_SHORTCUT_SCRIPTS_DIR_PATH ) ;
2021-03-08 10:09:22 +00:00
2021-03-25 18:30:36 +00:00
/** Termux app directory path to store background scripts that can be run by the termux launcher widget provided by Termux:Widget */
2021-03-11 15:11:59 +00:00
public static final String TERMUX_SHORTCUT_TASKS_SCRIPTS_DIR_PATH = TERMUX_DATA_HOME_DIR_PATH + " /shortcuts/tasks " ; // Default: "/data/data/com.termux/files/home/.termux/shortcuts/tasks"
2021-03-18 16:52:22 +00:00
/** Termux app directory to store background scripts that can be run by the termux launcher widget provided by Termux:Widget */
2021-03-11 15:11:59 +00:00
public static final File TERMUX_SHORTCUT_TASKS_SCRIPTS_DIR = new File ( TERMUX_SHORTCUT_TASKS_SCRIPTS_DIR_PATH ) ;
2021-03-08 10:09:22 +00:00
2021-03-18 16:52:22 +00:00
/** Termux app directory path to store scripts to be run by 3rd party twofortyfouram locale plugin host apps like Tasker app via the Termux:Tasker plugin client */
2021-03-11 15:11:59 +00:00
public static final String TERMUX_TASKER_SCRIPTS_DIR_PATH = TERMUX_DATA_HOME_DIR_PATH + " /tasker " ; // Default: "/data/data/com.termux/files/home/.termux/tasker"
2021-03-18 16:52:22 +00:00
/** Termux app directory to store scripts to be run by 3rd party twofortyfouram locale plugin host apps like Tasker app via the Termux:Tasker plugin client */
2021-03-11 15:11:59 +00:00
public static final File TERMUX_TASKER_SCRIPTS_DIR = new File ( TERMUX_TASKER_SCRIPTS_DIR_PATH ) ;
2021-04-07 06:31:30 +00:00
/ *
* Termux app and plugins notification variables .
* /
/** Termux app notification channel id used by {@link TERMUX_APP.TERMUX_SERVICE} */
public static final String TERMUX_APP_NOTIFICATION_CHANNEL_ID = " termux_notification_channel " ;
/** Termux app notification channel name used by {@link TERMUX_APP.TERMUX_SERVICE} */
public static final String TERMUX_APP_NOTIFICATION_CHANNEL_NAME = TermuxConstants . TERMUX_APP_NAME + " App " ;
/** Termux app unique notification id used by {@link TERMUX_APP.TERMUX_SERVICE} */
public static final int TERMUX_APP_NOTIFICATION_ID = 1337 ;
/** Termux app notification channel id used by {@link TERMUX_APP.RUN_COMMAND_SERVICE} */
public static final String TERMUX_RUN_COMMAND_NOTIFICATION_CHANNEL_ID = " termux_run_command_notification_channel " ;
/** Termux app notification channel name used by {@link TERMUX_APP.RUN_COMMAND_SERVICE} */
public static final String TERMUX_RUN_COMMAND_NOTIFICATION_CHANNEL_NAME = TermuxConstants . TERMUX_APP_NAME + " RunCommandService " ;
/** Termux app unique notification id used by {@link TERMUX_APP.RUN_COMMAND_SERVICE} */
public static final int TERMUX_RUN_COMMAND_NOTIFICATION_ID = 1338 ;
/** Termux app notification channel id used for plugin command errors */
public static final String TERMUX_PLUGIN_COMMAND_ERRORS_NOTIFICATION_CHANNEL_ID = " termux_plugin_command_errors_notification_channel " ;
/** Termux app notification channel name used for plugin command errors */
public static final String TERMUX_PLUGIN_COMMAND_ERRORS_NOTIFICATION_CHANNEL_NAME = TermuxConstants . TERMUX_APP_NAME + " Plugin Commands Errors " ;
/** Termux app notification channel id used for crash reports */
public static final String TERMUX_CRASH_REPORTS_NOTIFICATION_CHANNEL_ID = " termux_crash_reports_notification_channel " ;
/** Termux app notification channel name used for crash reports */
public static final String TERMUX_CRASH_REPORTS_NOTIFICATION_CHANNEL_NAME = TermuxConstants . TERMUX_APP_NAME + " Crash Reports " ;
2021-03-11 15:11:59 +00:00
/ *
* Termux app and plugins miscellaneous variables .
* /
2021-03-25 18:30:36 +00:00
/** Android OS permission declared by Termux app in AndroidManifest.xml which can be requested by 3rd party apps to run various commands in Termux app context */
2021-03-08 10:09:22 +00:00
public static final String PERMISSION_RUN_COMMAND = TERMUX_PACKAGE_NAME + " .permission.RUN_COMMAND " ; // Default: "com.termux.permission.RUN_COMMAND"
2021-03-25 18:30:36 +00:00
/** Termux property defined in termux.properties file as a secondary check to PERMISSION_RUN_COMMAND to allow 3rd party apps to run various commands in Termux app context */
2021-03-08 10:09:22 +00:00
public static final String PROP_ALLOW_EXTERNAL_APPS = " allow-external-apps " ; // Default: "allow-external-apps"
2021-03-18 16:52:22 +00:00
/** Default value for {@link #PROP_ALLOW_EXTERNAL_APPS} */
2021-03-08 10:09:22 +00:00
public static final String PROP_DEFAULT_VALUE_ALLOW_EXTERNAL_APPS = " false " ; // Default: "false"
2021-03-18 16:52:22 +00:00
/** The broadcast action sent when Termux App opens */
2021-03-15 22:59:54 +00:00
public static final String BROADCAST_TERMUX_OPENED = TERMUX_PACKAGE_NAME + " .app.OPENED " ;
2021-03-11 15:11:59 +00:00
2021-03-18 16:52:22 +00:00
/** The Uri authority for Termux app file shares */
2021-03-16 16:29:25 +00:00
public static final String TERMUX_FILE_SHARE_URI_AUTHORITY = TERMUX_PACKAGE_NAME + " .files " ; // Default: "com.termux.files"
2021-03-11 15:11:59 +00:00
2021-03-08 10:09:22 +00:00
/ * *
* Termux app constants .
* /
public static final class TERMUX_APP {
2021-03-11 15:11:59 +00:00
/** Termux app core activity name. */
public static final String TERMUX_ACTIVITY_NAME = TERMUX_PACKAGE_NAME + " .app.TermuxActivity " ; // Default: "com.termux.app.TermuxActivity"
2021-03-08 10:09:22 +00:00
/ * *
* Termux app core activity .
* /
public static final class TERMUX_ACTIVITY {
2021-03-18 16:52:22 +00:00
/** Intent action to start termux failsafe session */
2021-03-08 10:09:22 +00:00
public static final String ACTION_FAILSAFE_SESSION = TermuxConstants . TERMUX_PACKAGE_NAME + " .app.failsafe_session " ; // Default: "com.termux.app.failsafe_session"
2021-03-11 15:11:59 +00:00
2021-03-18 16:52:22 +00:00
/** Intent action to make termux reload its termux session styling */
2021-03-08 10:09:22 +00:00
public static final String ACTION_RELOAD_STYLE = TermuxConstants . TERMUX_PACKAGE_NAME + " .app.reload_style " ; // Default: "com.termux.app.reload_style"
2021-03-18 16:52:22 +00:00
/** Intent {@code String} extra for what to reload for the TERMUX_ACTIVITY.ACTION_RELOAD_STYLE intent */
2021-03-08 10:09:22 +00:00
public static final String EXTRA_RELOAD_STYLE = TermuxConstants . TERMUX_PACKAGE_NAME + " .app.reload_style " ; // Default: "com.termux.app.reload_style"
}
2021-03-11 15:11:59 +00:00
/** Termux app core service name. */
public static final String TERMUX_SERVICE_NAME = TERMUX_PACKAGE_NAME + " .app.TermuxService " ; // Default: "com.termux.app.TermuxService"
2021-03-08 10:09:22 +00:00
/ * *
* Termux app core service .
* /
public static final class TERMUX_SERVICE {
2021-03-18 16:52:22 +00:00
/** Intent action to stop TERMUX_SERVICE */
2021-03-08 10:09:22 +00:00
public static final String ACTION_STOP_SERVICE = TERMUX_PACKAGE_NAME + " .service_stop " ; // Default: "com.termux.service_stop"
2021-03-11 15:11:59 +00:00
2021-03-18 16:52:22 +00:00
/** Intent action to make TERMUX_SERVICE acquire a wakelock */
2021-03-08 10:09:22 +00:00
public static final String ACTION_WAKE_LOCK = TERMUX_PACKAGE_NAME + " .service_wake_lock " ; // Default: "com.termux.service_wake_lock"
2021-03-11 15:11:59 +00:00
2021-03-18 16:52:22 +00:00
/** Intent action to make TERMUX_SERVICE release wakelock */
2021-03-08 10:09:22 +00:00
public static final String ACTION_WAKE_UNLOCK = TERMUX_PACKAGE_NAME + " .service_wake_unlock " ; // Default: "com.termux.service_wake_unlock"
2021-03-11 15:11:59 +00:00
2021-03-18 16:52:22 +00:00
/** Intent action to execute command with TERMUX_SERVICE */
2021-03-08 10:09:22 +00:00
public static final String ACTION_SERVICE_EXECUTE = TERMUX_PACKAGE_NAME + " .service_execute " ; // Default: "com.termux.service_execute"
2021-03-18 16:52:22 +00:00
/** Uri scheme for paths sent via intent to TERMUX_SERVICE */
2021-03-08 10:09:22 +00:00
public static final String URI_SCHEME_SERVICE_EXECUTE = TERMUX_PACKAGE_NAME + " .file " ; // Default: "com.termux.file"
2021-03-18 16:52:22 +00:00
/** Intent {@code String[]} extra for command arguments for the TERMUX_SERVICE.ACTION_SERVICE_EXECUTE intent */
2021-03-08 10:09:22 +00:00
public static final String EXTRA_ARGUMENTS = TERMUX_PACKAGE_NAME + " .execute.arguments " ; // Default: "com.termux.execute.arguments"
2021-03-18 16:52:22 +00:00
/** Intent {@code String} extra for command current working directory for the TERMUX_SERVICE.ACTION_SERVICE_EXECUTE intent */
2021-03-08 10:09:22 +00:00
public static final String EXTRA_WORKDIR = TERMUX_PACKAGE_NAME + " .execute.cwd " ; // Default: "com.termux.execute.cwd"
2021-03-18 16:52:22 +00:00
/** Intent {@code boolean} extra for command background mode for the TERMUX_SERVICE.ACTION_SERVICE_EXECUTE intent */
2021-03-08 10:09:22 +00:00
public static final String EXTRA_BACKGROUND = TERMUX_PACKAGE_NAME + " .execute.background " ; // Default: "com.termux.execute.background"
2021-03-18 21:19:55 +00:00
/** Intent {@code String} extra for session action for foreground commands for the TERMUX_SERVICE.ACTION_SERVICE_EXECUTE intent */
public static final String EXTRA_SESSION_ACTION = TERMUX_PACKAGE_NAME + " .execute.session_action " ; // Default: "com.termux.execute.session_action"
2021-03-23 22:51:57 +00:00
/** Intent {@code String} extra for label of the command for the TERMUX_SERVICE.ACTION_SERVICE_EXECUTE intent */
public static final String EXTRA_COMMAND_LABEL = TERMUX_PACKAGE_NAME + " .execute.command_label " ; // Default: "com.termux.execute.command_label"
/** Intent markdown {@code String} extra for description of the command for the TERMUX_SERVICE.ACTION_SERVICE_EXECUTE intent */
public static final String EXTRA_COMMAND_DESCRIPTION = TERMUX_PACKAGE_NAME + " .execute.command_description " ; // Default: "com.termux.execute.command_description"
/** Intent markdown {@code String} extra for help of the command for the TERMUX_SERVICE.ACTION_SERVICE_EXECUTE intent */
public static final String EXTRA_COMMAND_HELP = TERMUX_PACKAGE_NAME + " .execute.command_help " ; // Default: "com.termux.execute.command_help"
/** Intent markdown {@code String} extra for help of the plugin API for the TERMUX_SERVICE.ACTION_SERVICE_EXECUTE intent (Internal Use Only) */
public static final String EXTRA_PLUGIN_API_HELP = TERMUX_PACKAGE_NAME + " .execute.plugin_api_help " ; // Default: "com.termux.execute.plugin_help"
2021-03-25 16:17:54 +00:00
/** Intent {@code Parcelable} extra containing pending intent for the execute command caller */
public static final String EXTRA_PENDING_INTENT = " pendingIntent " ; // Default: "pendingIntent"
2021-03-18 02:15:00 +00:00
2021-03-18 21:19:55 +00:00
/ * * The value for { @link # EXTRA_SESSION_ACTION } extra that will set the new session as
2021-04-07 06:31:30 +00:00
* the current session and will start { @link TERMUX_ACTIVITY } if its not running to bring
2021-03-18 21:19:55 +00:00
* the new session to foreground .
* /
public static final int VALUE_EXTRA_SESSION_ACTION_SWITCH_TO_NEW_SESSION_AND_OPEN_ACTIVITY = 0 ;
/ * * The value for { @link # EXTRA_SESSION_ACTION } extra that will keep any existing session
2021-04-07 06:31:30 +00:00
* as the current session and will start { @link TERMUX_ACTIVITY } if its not running to
2021-03-18 21:19:55 +00:00
* bring the existing session to foreground . The new session will be added to the left
* sidebar in the sessions list .
* /
public static final int VALUE_EXTRA_SESSION_ACTION_KEEP_CURRENT_SESSION_AND_OPEN_ACTIVITY = 1 ;
/ * * The value for { @link # EXTRA_SESSION_ACTION } extra that will set the new session as
2021-04-07 06:31:30 +00:00
* the current session but will not start { @link TERMUX_ACTIVITY } if its not running
2021-03-18 21:19:55 +00:00
* and session ( s ) will be seen in Termux notification and can be clicked to bring new
2021-04-07 06:31:30 +00:00
* session to foreground . If the { @link TERMUX_ACTIVITY } is already running , then this
2021-03-18 21:19:55 +00:00
* will behave like { @link # VALUE_EXTRA_SESSION_ACTION_KEEP_CURRENT_SESSION_AND_OPEN_ACTIVITY } .
* /
public static final int VALUE_EXTRA_SESSION_ACTION_SWITCH_TO_NEW_SESSION_AND_DONT_OPEN_ACTIVITY = 2 ;
/ * * The value for { @link # EXTRA_SESSION_ACTION } extra that will keep any existing session
2021-04-07 06:31:30 +00:00
* as the current session but will not start { @link TERMUX_ACTIVITY } if its not running
2021-03-18 21:19:55 +00:00
* and session ( s ) will be seen in Termux notification and can be clicked to bring
2021-04-07 06:31:30 +00:00
* existing session to foreground . If the { @link TERMUX_ACTIVITY } is already running ,
2021-03-18 21:19:55 +00:00
* then this will behave like { @link # VALUE_EXTRA_SESSION_ACTION_KEEP_CURRENT_SESSION_AND_OPEN_ACTIVITY } .
* /
public static final int VALUE_EXTRA_SESSION_ACTION_KEEP_CURRENT_SESSION_AND_DONT_OPEN_ACTIVITY = 3 ;
2021-03-18 02:15:00 +00:00
/ * * Intent { @code Bundle } extra to store result of execute command that is sent back for the
* TERMUX_SERVICE . ACTION_SERVICE_EXECUTE intent if the { @link # EXTRA_PENDING_INTENT } is not
* { @code null } * /
2021-03-23 22:51:57 +00:00
public static final String EXTRA_PLUGIN_RESULT_BUNDLE = " result " ; // Default: "result"
/** Intent {@code String} extra for stdout value of execute command of the {@link #EXTRA_PLUGIN_RESULT_BUNDLE} */
public static final String EXTRA_PLUGIN_RESULT_BUNDLE_STDOUT = " stdout " ; // Default: "stdout"
2021-03-25 04:02:59 +00:00
/** Intent {@code String} extra for original length of stdout value of execute command of the {@link #EXTRA_PLUGIN_RESULT_BUNDLE} */
public static final String EXTRA_PLUGIN_RESULT_BUNDLE_STDOUT_ORIGINAL_LENGTH = " stdout_original_length " ; // Default: "stdout_original_length"
2021-03-23 22:51:57 +00:00
/** Intent {@code String} extra for stderr value of execute command of the {@link #EXTRA_PLUGIN_RESULT_BUNDLE} */
public static final String EXTRA_PLUGIN_RESULT_BUNDLE_STDERR = " stderr " ; // Default: "stderr"
2021-03-25 04:02:59 +00:00
/** Intent {@code String} extra for original length of stderr value of execute command of the {@link #EXTRA_PLUGIN_RESULT_BUNDLE} */
public static final String EXTRA_PLUGIN_RESULT_BUNDLE_STDERR_ORIGINAL_LENGTH = " stderr_original_length " ; // Default: "stderr_original_length"
2021-03-23 22:51:57 +00:00
/** Intent {@code int} extra for exit code value of execute command of the {@link #EXTRA_PLUGIN_RESULT_BUNDLE} */
public static final String EXTRA_PLUGIN_RESULT_BUNDLE_EXIT_CODE = " exitCode " ; // Default: "exitCode"
/** Intent {@code int} extra for err value of execute command of the {@link #EXTRA_PLUGIN_RESULT_BUNDLE} */
public static final String EXTRA_PLUGIN_RESULT_BUNDLE_ERR = " err " ; // Default: "err"
/** Intent {@code String} extra for errmsg value of execute command of the {@link #EXTRA_PLUGIN_RESULT_BUNDLE} */
public static final String EXTRA_PLUGIN_RESULT_BUNDLE_ERRMSG = " errmsg " ; // Default: "errmsg"
2021-03-08 10:09:22 +00:00
}
2021-03-11 15:11:59 +00:00
/** Termux app run command service name. */
2021-03-08 10:09:22 +00:00
public static final String RUN_COMMAND_SERVICE_NAME = TERMUX_PACKAGE_NAME + " .app.RunCommandService " ; // Termux app service to receive commands from 3rd party apps "com.termux.app.RunCommandService"
2021-03-11 15:11:59 +00:00
/ * *
* Termux app run command service to receive commands sent by 3rd party apps .
* /
2021-03-08 10:09:22 +00:00
public static final class RUN_COMMAND_SERVICE {
2021-04-06 07:19:37 +00:00
/** Termux RUN_COMMAND Intent help url */
public static final String RUN_COMMAND_API_HELP_URL = TERMUX_GITHUB_WIKI_REPO_URL + " /RUN_COMMAND-Intent " ; // Default: "https://github.com/termux/termux-app/wiki/RUN_COMMAND-Intent"
2021-03-18 16:52:22 +00:00
/** Intent action to execute command with RUN_COMMAND_SERVICE */
2021-03-08 10:09:22 +00:00
public static final String ACTION_RUN_COMMAND = TERMUX_PACKAGE_NAME + " .RUN_COMMAND " ; // Default: "com.termux.RUN_COMMAND"
2021-03-18 21:19:55 +00:00
/** Intent {@code String} extra for absolute path of command for the RUN_COMMAND_SERVICE.ACTION_RUN_COMMAND intent */
2021-03-08 10:09:22 +00:00
public static final String EXTRA_COMMAND_PATH = TERMUX_PACKAGE_NAME + " .RUN_COMMAND_PATH " ; // Default: "com.termux.RUN_COMMAND_PATH"
2021-03-18 21:19:55 +00:00
/** Intent {@code String[]} extra for any arguments to pass to command for the RUN_COMMAND_SERVICE.ACTION_RUN_COMMAND intent */
2021-03-08 10:09:22 +00:00
public static final String EXTRA_ARGUMENTS = TERMUX_PACKAGE_NAME + " .RUN_COMMAND_ARGUMENTS " ; // Default: "com.termux.RUN_COMMAND_ARGUMENTS"
2021-03-18 21:19:55 +00:00
/** Intent {@code String} extra for current working directory of command for the RUN_COMMAND_SERVICE.ACTION_RUN_COMMAND intent */
2021-03-08 10:09:22 +00:00
public static final String EXTRA_WORKDIR = TERMUX_PACKAGE_NAME + " .RUN_COMMAND_WORKDIR " ; // Default: "com.termux.RUN_COMMAND_WORKDIR"
2021-03-18 21:19:55 +00:00
/** Intent {@code boolean} extra for whether to run command in background or foreground terminal session for the RUN_COMMAND_SERVICE.ACTION_RUN_COMMAND intent */
2021-03-08 10:09:22 +00:00
public static final String EXTRA_BACKGROUND = TERMUX_PACKAGE_NAME + " .RUN_COMMAND_BACKGROUND " ; // Default: "com.termux.RUN_COMMAND_BACKGROUND"
2021-03-18 21:19:55 +00:00
/** Intent {@code String} extra for session action of foreground commands for the RUN_COMMAND_SERVICE.ACTION_RUN_COMMAND intent */
public static final String EXTRA_SESSION_ACTION = TERMUX_PACKAGE_NAME + " .RUN_COMMAND_SESSION_ACTION " ; // Default: "com.termux.RUN_COMMAND_SESSION_ACTION"
2021-03-23 22:51:57 +00:00
/** Intent {@code String} extra for label of the command for the RUN_COMMAND_SERVICE.ACTION_RUN_COMMAND intent */
public static final String EXTRA_COMMAND_LABEL = TERMUX_PACKAGE_NAME + " .RUN_COMMAND_COMMAND_LABEL " ; // Default: "com.termux.RUN_COMMAND_COMMAND_LABEL"
/** Intent markdown {@code String} extra for description of the command for the RUN_COMMAND_SERVICE.ACTION_RUN_COMMAND intent */
public static final String EXTRA_COMMAND_DESCRIPTION = TERMUX_PACKAGE_NAME + " .RUN_COMMAND_COMMAND_DESCRIPTION " ; // Default: "com.termux.RUN_COMMAND_COMMAND_DESCRIPTION"
/** Intent markdown {@code String} extra for help of the command for the RUN_COMMAND_SERVICE.ACTION_RUN_COMMAND intent */
public static final String EXTRA_COMMAND_HELP = TERMUX_PACKAGE_NAME + " .RUN_COMMAND_COMMAND_HELP " ; // Default: "com.termux.RUN_COMMAND_COMMAND_HELP"
2021-03-25 16:17:54 +00:00
/** Intent {@code Parcelable} extra containing pending intent for the RUN_COMMAND_SERVICE.ACTION_RUN_COMMAND intent */
public static final String EXTRA_PENDING_INTENT = TERMUX_PACKAGE_NAME + " .RUN_COMMAND_PENDING_INTENT " ; // Default: "com.termux.RUN_COMMAND_PENDING_INTENT"
2021-03-08 10:09:22 +00:00
}
}
2021-03-11 15:11:59 +00:00
2021-03-08 10:09:22 +00:00
/ * *
* Termux : Styling app constants .
* /
public static final class TERMUX_STYLING {
2021-03-11 15:11:59 +00:00
/** Termux:Styling app core activity name. */
2021-03-08 10:09:22 +00:00
public static final String TERMUX_STYLING_ACTIVITY_NAME = TERMUX_STYLING_PACKAGE_NAME + " .TermuxStyleActivity " ; // Default: "com.termux.styling.TermuxStyleActivity"
}
}