On Android 11 we need MANAGE_EXTERNAL_STORAGE to access files without
restrictions on shared storage.
Android 10 we have to opt-out from scoped storage and use WRITE_EXTERNAL_STORAGE.
* Changed the hardcoded cache directory to the android alternative (pointing to /data/user/0 which is a symlink to /data/data).
* Implemented the transparent activity mechanism for downloading multiple apps through the Play Store (which just works as if the intent was added to the back-stack)
* Now we check deliberately check for source (external for ext. repo and play-store for the Play Store).
* Fixed a few bugs.
as a string array extra instead of a string extra since TermuxService expects it that way.
Added "RUN_COMMAND_BACKGROUND" boolean extra so that Termux session can be started in background
when running a command.
Updated usage docs.
Check #1029 for details.
Highlighting text in the terminal often makes it hard to read, which
can be problematic for users who want to adjust or review selections
before copying them. For example, the default theme makes white and
green text hard to read on its light gray selection background, and
there are plenty of other themes where the choice of text and cursor
colors would hinder selection readability.
To fix this issue and make selected text more legible in nearly all
combinations of colors, invert selected text instead of highlighting it.
This is more common among terminal emulators anyway:
Invert: xterm, fbcon, kitty, Konsole, Alacritty, Tilix,
gnome-terminal (7)
Highlight: Termux, Terminal.app, iTerm2, Windows Terminal (4)
There is currently a bug where selection rendering is broken if the
active cursor shape is anything other than the default solid box.
Selected text is normally highlighted by effectively rendering a cursor
over all of the characters in the selection region, but if the cursor is
a bar, the resulting selection highlight is too narrow to cover the full
width of the selection. Similarly, if the cursor is an underline, all of
the selected text will be underlined instead of highlighted.
To fix this issue, treat selections different from cursors in the
rendering logic and force the renderer to always use the block cursor
style for rendering selections. That way, we get correct behavior
regardless of what the current cursor shape is.
Re-implementation of https://github.com/termux/termux-app/pull/1029.
If Termux has property "allow-external-apps" set to "true", a third-party
program will be able to send intents for executing custom commands
within Termux environment.
Third-party program must declare permission "com.termux.permission.RUN_COMMAND".
Some terminal applications, like mutt and weechat, prints a newline at
the end of each line even if text is wrapped. This causes urls which are
wrapped to not be selectable in full.
By ignoring newlines when the text fills the entire width of the screen,
those urls can be selected. Many other terminal emulators do this as
well.
A drawback of this is that if a url happens to fill the width of the
screen, the url selection will include the first word of the next line,
but this doesn't happen that often so I think it's an okay tradeoff.
Fixes#313
* Make popup keys for extra keys row configurable
This makes the keys you get when swiping up on a key configurable. You
can configure such a key by using an array of strings instead of a
single string in the row. The first entry will be the normal key and the
second will be the extra key.
This is a slightly breaking change, as people that have configured
custom extra keys with "-" or "/" will have to change the config to keep
the popup keys. The default config will remain the same in terms of
functionality, i.e. it includes the same popup key for "-".
* Make popup keys interact well with long press keys
This stops the repeat action when the popup is shown, and makes sure the
popup is closed when you release even if there has been some repeat
actions.
* Support configuring the style of the extra keys
This adds a setting for choosing between the different ways to render
key names that were already present in ExtraKeysView.
The available setting values are "arrows-only", "arrows-all", "all",
"none" and "default". Other values will fallback to "default".
Can be used as a workaround for #1410
* Support using modifier keys with letter keys in extra keys
This allows you to use the modifier keys on the extra keys rows, e.g.
ctrl, together with another button on the extra keys rows, as long as
that button is a normal letter and not a special key. Support for
special keys will come in the next commit.
* Support using modifier keys with special keys in extra keys
This allows you to use the modifier keys on the extra keys rows together
with a special key on the extra keys rows, e.g. CTRL+LEFT.
Fixes#745, fixes most of #895 and possibly #154
* Support mapping extra keys to other actions
This adds a setting called extra-keys-map which allows you to map a key
on the extra keys rows to another action. The value is a json object
where the key is the button text as configured in extra-keys and the
value is the action. Multiple actions can be used, but if they are
special characters (like ESC or LEFT) they have to be separated from the
other characters with a space on each side. If you want an actual space
character, use SPACE.
For example if you want to add a key to go to the next active channel in
weechat, you can use this:
extra-keys-map = {"weechat next": "ESC a"}
And then add "weechat next" to extra-keys. The name can of course be
whatever you want.
Or if you want the button for the UP arrow to show ⇧ instead of ↑, you
can use this:
extra-keys-map = {"⇧": "UP"}
And put "⇧" in extra-keys instead of "UP".
Modifier keys (ctrl, alt and shift) can't be used in this map yet.
Support for ctrl and alt will come in the next commit.
I think this fixes#1186
* Support CTRL and ALT in extra keys map
This allows you to use CTRL and ALT in extra-keys-map.
For example if you want a button to exit the terminal, you can use this:
extra-keys-map = {"exit": "CTRL d"}
And add "exit" to extra-keys.
* Support a KEYBOARD button in extra keys
This toggles showing the keyboard input method.
* Support specifying macro keys in the extra-keys option
Instead of specifying macros in the separate extra-keys-map option by
matching the key name in the two options, you can now use "macro"
instead of "key" in extra-keys, and it will be a macro, i.e. a sequence
of multiple keys separated by space.
* Remove option extra-keys-map
Now that you can specify macro in extra-keys, there is no point in
having this separate option. Instead of specifying the value to display
as key, and the macro to perform in extra-keys-map, you would now
specify the value to display in the display property and the macro to
perform in the macro property.
* Lookup display text when creating ExtraKeyButton
This will make it easier to support key aliases for macros in the next
commit.
* Add support for a key to open the drawer
Fixes (I think) #1325
This is the launcher icon with a circle around it. I added the circle
because the icon has a transparent background, so it looks a bit weird
with just the >_.