106 lines
3.7 KiB
Markdown
106 lines
3.7 KiB
Markdown
# StatusBarTweak
|
|
|
|
StatusBarTweak is an Xposed/LSPosed module for Samsung SystemUI. It focuses on
|
|
making the status bar, lockscreen, and Always On Display more configurable while
|
|
still keeping Samsung's own icons and visual style where possible.
|
|
|
|
The project is currently tested only on a Samsung Galaxy Z Fold5 running One UI
|
|
8.0 / Android 16. Expect device- and One UI-version-specific behaviour.
|
|
|
|
## What It Does
|
|
|
|
- Custom status bar layout for the unlocked screen, lockscreen, and AOD.
|
|
- Independent placement of clock, carrier text, notification icons, status
|
|
icons, and Samsung status chips.
|
|
- Separate notification display handling for Samsung's cards, icons, and dot
|
|
modes.
|
|
- Configurable icon sizes, vertical offsets, ordering, spacing, truncation, and
|
|
cutout handling.
|
|
- Hide selected notification icons by app, separately for AOD, lockscreen, and
|
|
unlocked mode.
|
|
- Hide selected status icons such as NFC, Bluetooth, hotspot, location, VPN,
|
|
battery, and similar SystemUI indicators.
|
|
- Optional custom clock text with multi-line formatting, colours, font families,
|
|
and cutout-aware split alignment.
|
|
- Battery bar with configurable position, alignment, thickness, colours, and
|
|
threshold colours.
|
|
- Controls for Samsung status chips such as media, navigation, and call chips.
|
|
- Debug tools for generating test notifications, visualizing layout containers,
|
|
and restarting SystemUI during development.
|
|
|
|
## Custom Clock Text
|
|
|
|
The custom clock uses Java-style date/time patterns such as `HH:mm`,
|
|
`EEE d MMM HH:mm`, or `HH:mm:ss`.
|
|
|
|
It also supports lightweight markup:
|
|
|
|
- HTML-like tags: `<i>`, `<u>`, `<small>`, `<big>`, and `<font ...>`.
|
|
- Shorthand blocks such as `{#FA0 big @sans-serif-condensed}HH:mm`.
|
|
- Multi-line text using `\n` or `{\\n12}`; numbered line breaks use statusbar units.
|
|
- Pipe alignment with `|`, useful for aligning split clock rows around a camera
|
|
cutout.
|
|
- Colour variants and reverse Polish notation colour math for light/dark status
|
|
bar states, for example `color(#batterybar 1.2 * ; invRGB 0.5 *RGB)`.
|
|
|
|
The in-app clock page has the full syntax help and examples.
|
|
|
|
## Requirements
|
|
|
|
- A rooted Samsung device.
|
|
- A modern Xposed implementation such as LSPosed.
|
|
- Xposed API 101 or newer.
|
|
- A Samsung/One UI version close to One UI 8.0 / Android 16.
|
|
|
|
This module hooks Samsung SystemUI internals. It is not expected to work on
|
|
non-Samsung SystemUI, and updates to One UI may require fixes.
|
|
|
|
## Device Compatibility
|
|
|
|
StatusBarTweak is Samsung-specific in its current form. Some lower-level ideas,
|
|
such as drawing a custom battery bar or parsing custom clock text, could be
|
|
ported elsewhere. The layout engine itself depends on Samsung's SystemUI,
|
|
lockscreen, AOD service, notification display modes, status icons, and status
|
|
chip implementation.
|
|
|
|
Plain Android or other OEM skins would need separate hooks and probably a
|
|
different source-collection layer. They should be treated as unsupported rather
|
|
than untested-compatible.
|
|
|
|
## Build
|
|
|
|
The project is a standard Gradle Android project:
|
|
|
|
```bash
|
|
./gradlew assembleDebug
|
|
```
|
|
|
|
Release builds require local signing configuration:
|
|
|
|
```bash
|
|
./gradlew assembleRelease
|
|
```
|
|
|
|
## Releases
|
|
|
|
Public releases use two-part versions such as `0.1`, `0.2`, and eventually
|
|
`1.0`.
|
|
|
|
Gitea automatically provides source archives for release tags, so the release
|
|
assets only need the APK and its checksum. A release can be created with:
|
|
|
|
```bash
|
|
mkdir -p local
|
|
printf '%s' 'your-gitea-token' > local/gitea-token
|
|
|
|
GITEA_BASE_URL=git.ajpanton.se \
|
|
GITEA_TOKEN_FILE=local/gitea-token \
|
|
scripts/release-gitea.sh 0.1
|
|
```
|
|
|
|
## Development Note
|
|
|
|
This project has been coded with the help of AI as an implementation aid. The
|
|
design decisions, device testing, and final behaviour are still manually
|
|
reviewed.
|