Luigit
repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by admin

termux/README.md

Raw
Rendered preview

Termux Nugu themes

nugu/termux.nu generates dark and light palettes from nugu/nugu.nu and nugu/base.toml. Foreground, background, cursor, ANSI colors, and indexed colors 16-22 match WezTerm's Nugu mapping. Only properties supported by Termux are emitted; WezTerm's selection and window styling are not portable.

From the dotfiles root:

mise run nugu-termux
mise run termux-test

Generation writes both variants to nugu/output/termux/ and termux/themes/ without selecting an active theme. The command reads the tracked palettes relative to its module, so no new HOME symlink is needed.

Manual selection

nushell/login.nu loads nushell/modules/termux-theme.nu in new login shells. For an already-running Nushell, import it once:

use ~/.config/nushell/modules/termux-theme.nu

Choose a palette:

termux-theme dark
termux-theme light

The command copies the selected palette into ~/.termux/colors.properties and runs termux-reload-settings. It requires Termux and its existing reload command, not an extra APK. There is no schedule, background process, startup selection, or system-theme integration. Keyboard settings, font, fullscreen, and app UI settings remain untouched.

Backup and recovery

Before the first switch, an existing palette is copied to ~/.termux/colors.properties.before-nugu. Later switches preserve that backup. If reload fails, the command reports failure, but the selected palette remains saved. Symlinked settings directories, active palettes, and backups are refused rather than modifying their targets.

To restore the original palette, if the backup exists:

cp ~/.termux/colors.properties.before-nugu ~/.termux/colors.properties
termux-reload-settings
# Termux Nugu themes

`nugu/termux.nu` generates dark and light palettes from `nugu/nugu.nu` and `nugu/base.toml`.
Foreground, background, cursor, ANSI colors, and indexed colors 16-22 match WezTerm's Nugu mapping.
Only properties supported by Termux are emitted; WezTerm's selection and window styling are not portable.

From the dotfiles root:

```sh
mise run nugu-termux
mise run termux-test
```

Generation writes both variants to `nugu/output/termux/` and `termux/themes/` without selecting an active theme.
The command reads the tracked palettes relative to its module, so no new HOME symlink is needed.

## Manual selection

`nushell/login.nu` loads `nushell/modules/termux-theme.nu` in new login shells.
For an already-running Nushell, import it once:

```nu
use ~/.config/nushell/modules/termux-theme.nu
```

Choose a palette:

```nu
termux-theme dark
termux-theme light
```

The command copies the selected palette into `~/.termux/colors.properties` and runs `termux-reload-settings`.
It requires Termux and its existing reload command, not an extra APK.
There is no schedule, background process, startup selection, or system-theme integration.
Keyboard settings, font, fullscreen, and app UI settings remain untouched.

## Backup and recovery

Before the first switch, an existing palette is copied to `~/.termux/colors.properties.before-nugu`.
Later switches preserve that backup.
If reload fails, the command reports failure, but the selected palette remains saved.
Symlinked settings directories, active palettes, and backups are refused rather than modifying their targets.

To restore the original palette, if the backup exists:

```nu
cp ~/.termux/colors.properties.before-nugu ~/.termux/colors.properties
termux-reload-settings
```