Added: Add support for using image as background
This changes allows the user to use an image as the terminal's background.
Background Image
To set an image as a background, open the context menu by long clicking on the terminal and select Menu -> Style -> Set background image.
To remove background image Menu -> Style -> Remove background image (It will also delete generated image files).
When an image is selected from the gallery, it is resized corresponding to device resolution and then compressed into a jpeg. Three image files, background.jpeg, background_portrait.jpeg, and background_landscape.jpeg are generated. The original source image is compressed into background.jpeg and can be used to regenerate portrait and landscape files in case of display size change or files get deleted.
Note: Resized images are center-cropped generated using ThumbnailUtils
Overlay Color
The overlay color is loaded from the termux.properties file with the key background-overlay-color. The default value is set to #59000000. To change the overlay color, add background-overlay-color=<color> to the termux.properties file. Supported color formats are #AARRGGBB and #RRGGBB. If the color is in #RRGGBB format then the alpha value of default color 0x59 (35%) is used.
Termux Settings
Background image loading can also be enabled/disabled from settings. From Termux Settings -> Termux -> Termux Style -> Background Image. If some malformed image is stored as background image and not letting open termux, then setting can be used to disable image loading.
Note: Disabling the image from the setting will not delete image files and can be restored.
Setting can also be used to temporarily disable image loading. You can enable it until and unless you delete image files from .termux/background folder.
Backup
Image files are stored in .termux/background folder, and overlay color value is stored in termux.properties and both are part of the backup, so you can easily Backup them.
However, the preference for background, whether it's image or color is stored and read from com.termux_preference.xml which is not part of the backup. The default value set for the background_image_enabled is false.
To overcome this issue, if background.jpeg is present, then the user can restore them. When again selecting an image from the gallery using Set background image, the alert is shown to restore images. If files for both orientation are present, It can also be done from the setting by enabling background image loading.
Some feedbacks regarding this change, so far this feature works without issues how the way termux works and creates some terminal aesthetics. so far so good!
Landscape:

Portrait:

Although this is so far one of the things I've tried is setting the background. One minor things to address is toolbar transparency if it's feasible to fix? otherwise it's all good 👍
As per setting the color overlay. this works as to make texts readable on lighter backgrounds that would blend the text unreadable.
Some feedbacks regarding this change, so far the performance is very good and creates some terminal aesthetics. so far so good! Landscape:
Portrait:
It would be cool if the bottom keys were also changed
Could the notch (aka the display cutout) also be filled in landscape?
Working on toolbar transparency. Will commit once the proper code is changed.

Could the notch (aka the display cutout) also be filled in landscape?
No, currently it's not filling cutout on landscape orientation. Will see what can be done.
It can be done but, will look like this:


I think leaving the notch as is would be better, considering not all devices have notch and the transparency would be enough to fill the gap to make the background consistent in the terminal.
I think leaving the notch as is would be better, considering not all devices have notch and the transparency would be enough to fill the gap to make the background consistent in the terminal.
Yeah nevermind, Termux is not fully full screen so that looks a bit odd
The extra keys toolbar transparency works like a charm!
I tested CTRL, ESC, TAB and PG keys and it works as intended!
I tried this feature on my device and it doesn't work the background doesn't change and looks messed up on the text


I tried this feature on my device and it doesn't work the background doesn't change and looks messed up on the text
can you check if background files are generated properly at .termux/background.jpeg and .termux/background_landscape.jpeg
What is the status in setting, is the switch enabled at Termux Settings -> Termux Style -> Background Image enabled
I tried this feature on my device and it doesn't work the background doesn't change and looks messed up on the text
can you check if background files are generated properly at
.termux/background.jpegand.termux/background_landscape.jpegWhat is the status in setting, is the switch enabled at
Termux Settings -> Termux Style -> Background Image enabled
perfectly available

i try again from action. i think its fixed but still have same issue

i try again from action. i think its fixed but still have same issue
Fixed the issue,
PorterDuff.Mode.MULTIPLY was causing the issue. For Android > 9 BlendMode filter is used, that's why it was working fine for android > 9.
Now changed to PorterDuff.Mode.DARKEN which seems to work pretty fine.
It amazing feature thank you man
@Kruna1Pate1 friend Transparent theme like Windows Terminal when ?
@rihaq Actually, I have implemented it. But, there are several issues with it. To make an Activity transparent, Activity needs to be Translucent.
But, it leads to android:screenOrientation set to unspecified. Which means it chooses orientation from background activity. And most launchers are fixed to portrait.
Another problem is, the method to change Activity from opaque to translucent and vice-versa was added in API 30 "setTranslucent(boolean)". For API <= 29, I can't find a proper way to change it programmatically.
It might create problems for Android 8 devices, because of this Prevent non-fullscreen activities from influencing orientation which was fixed in Android 8.1.
Will see if this can be figured out. Also, it looks a little bit uncomfortable on Android. Maybe playing with some alpha value and blur effect can help.

Please add TIOCGWINSZ #3002
I am not much familiar with Terminal code, But will see if I can help there.
Here's a suggestion: You could implement background blur along with transparent background that works on Android <11 with RealtimeBlurView lib. (suggesting mine because official one is very outdated and doesn't build anymore)
And then, it would look like just as windows' cmd blur
But of course, there would be some performance impact, so this could be an optional setting
Here's a suggestion: You could implement background blur along with transparent background that works on Android <11 with RealtimeBlurView lib. (suggesting mine because official one is very outdated and doesn't build anymore)
I tried it (on Android 12 btw). Looks pretty cool with the blur effect. But as I said have to make the activity translucent which causes some trouble. (Can't make it optional because changing it dynamically is added in API 30 as I said).
But of course, there would be some performance impact, so this could be an optional setting
Yes, I have noticed that causing some performance drawbacks.
But as I said have to make the activity
translucentwhich causes some trouble. (Can't make it optional because changing it dynamically is added in API 30 as I said).
What I'd do for these cases is have 2 Activities that only differ in the translucency, and make the launcher icon start an invisible helper Activity that starts the translucent or opaque Activity depending on the setting. When you make the original Activity a base class it should be possible without much code duplication. I don't know if Termux can manage having 2 terminal activities, and changing the setting would have to finish the old Activity, so there aren't 2 at the same time.
I will try to do that. and i think new pr would be better for this since many changes would require.
Can't find the set background option
Make sure to download from GitHub Action build.
@Kruna1Pate1 friend Transparent theme like Windows Terminal when ?
?
Use Termux:Float for this

@Kruna1Pate1 friend Transparent theme like Windows Terminal when ?
?
Use Termux:Float for this
Says the one using Vanced 😂 (I also have it installed for emergency purpose but I use revanced)
No I won't use float shit
~then write it yourself~
@Kruna1Pate1 friend Transparent theme like Windows Terminal when ?
?
Use Termux:Float for this
Says the one using Vanced 😂 (I also have it installed for emergency purpose but I use revanced) No I won't use float shit
~then write it yourself~
Shut up its not telegram. Behave. Be civilised
Hold up what, you should be the person getting this advice
It would be cool if there's an alpha option
It would be cool if there's an alpha option
That what "Overlay Color" is mentioned in PR i guess.
It would be cool if there's an alpha option
That what "Overlay Color" is mentioned in PR i guess.
When it will be push?
I will try to do that. and i think new pr would be better for this since many changes would require.
Patiently waiting for your pr 🤗
I can see in the OP screenshot, keyboard is also transparent. How?
?