tmt is a Python script designed to modify GNOME Terminal settings directly from the command line. It allows users to customize aspects such as background and foreground colors, transparency levels, and font sizes, enhancing the terminal's visual appearance and usability.
- Set Background Color: Change the terminal's background to any specified hex color.
- Set Foreground Color: Adjust the text color using a desired hex value.
- Adjust Transparency: Modify the terminal's transparency level within a range of 0% (opaque) to 100% (fully transparent).
- Change Font Size: Update the terminal's font size to improve readability.
- GNOME Terminal: Ensure that GNOME Terminal is installed on your system.
- Python 3: The script requires Python 3 to execute.
- gsettings: This utility should be available for the script to interact with GNOME settings.
Just run the following in your terminal and you are good to go.
This just fetches the tmt (zipped executable release) from the repo,
and adds it to your PATH.
wget https://raw.githubusercontent.com/iaseth/tmt/refs/heads/master/build/tmt && chmod +x tmt && cp tmt ~/.local/binRun the script with the desired options to customize your GNOME Terminal settings:
tmt --help-b,--background: Set the terminal background color. Accepts a hex color code (e.g.,#000000or000000).-f,--foreground: Set the terminal foreground (text) color. Accepts a hex color code (e.g.,#fffffforffffff).-c,--css: Set the terminal background/foreground color using Tailwind classes likebg-slate-900andtext-zinc-100.--theme: Set the terminal background and foreground color using Themes likeMonokaiandSolarized Dark.-t,--transparency: Set the terminal transparency level. Accepts an integer between 0 and 100, where 0 is fully opaque and 100 is fully transparent.-z,--fontsize: Set the terminal font size. Accepts an integer representing the desired font size.-v,--verbose: Enable verbose output to display detailed information about the changes being applied.
-
Using Color Themes:
tmt --theme Monokai
Sets the background and the foreground colors to the
Monokaitheme`.tmt --random
Sets a random theme.
tmt --theme
This will list all the supported themes.
-
Change Background and Foreground Colors:
tmt -b 1d1f21 -f c5c8c6
Sets the background color to a dark shade (
#1d1f21) and the foreground (text) color to a light grey (#c5c8c6).tmt --css bg-zinc-900 text-zinc-50
Sets the background and/or the foreground color using Tailwind classes.
Set the colors to default, i.e., White text on Black background:
tmt --default
-
Adjust Transparency: Set the terminal transparency to 20%, making it slightly transparent:
tmt -t 20
Turn off Transparency:
tmt --opaque
Turn on Transparency:
tmt --transparent
-
Change Font Size:
tmt --fontsize 12
Sets the font size to 12.
-
Print current Profile Settings:
tmt --print
- Clone the Repository:
git clone https://github.com/iaseth/tmt.git
- Navigate to the Directory:
cd tmt - Run the script:
python3 tmtpy -p
- The script retrieves the default GNOME Terminal profile ID to apply the settings.
- Invalid color codes or unsupported values will result in error messages without applying changes.
- Transparency adjustments require the terminal to support background transparency.
This project is licensed under the MIT License.