SysAct is a terminal‑user‑interface (TUI) application written in Go, built with the Bubble Tea framework and Lip Gloss styling. It provides a quick way to perform common system actions (logout, suspend, reboot, poweroff) directly from your terminal or launcher.
- Logout: End the current user session and return to the login screen.
- Suspend: Pause the system, saving the session to memory and entering a low‑power state.
- Reboot: Restart the system, closing all applications and reinitializing the OS.
- Poweroff: Completely shut down the system.
- Responsive UI: Centrally‑aligned list menu that adapts to terminal window size.
- Confirmation Dialog: Ask for user confirmation (with countdown timer) before performing actions.
- Localization: Full support for English, French, Spanish, and Arabic; easily extendable via
config.toml
. - Custom Keybindings: Remap navigation, confirm, cancel, and quit keys via
config.toml
. - Theme & Colors: Configure
primary_color
andsecondary_color
inconfig.toml
for Lip Gloss styles. - Structured Logging: Built‑in multi‑level loggers with automatic rotation (via
lumberjack
). - Debian Package: Pre‑built
.deb
available in GitHub Releases for easy installation.
Below is a GIF demonstrating how to navigate through the list and open the confirmation dialog:
In this demo, arrow keys move the selection; pressing Enter opens the confirm dialog with a countdown.
There are two main ways to install SysAct:
A pre‑built .deb
is provided in the Releases. Simply:
# Download the .deb for your architecture (e.g. sysact_0.1.0_amd64.deb)
sudo dpkg -i sysact_0.1.0_amd64.deb
Once installed, you can run:
sysact
Note: This method is quickest for most Debian‑based distributions (Ubuntu, Debian, Mint, etc.).
Ensure you have Go 1.18+ installed and $GOPATH/bin
(or Go’s bin directory) in your PATH
. Then:
# Clone the repository
git clone https://github.com/AyKrimino/SysAct.git
cd SysAct
# Download dependencies
go mod download
# Build the executable into ./bin/sysact
make build
# You can now run:
./bin/sysact
# Optionally, add bin/ to your PATH:
export PATH="$PWD/bin:$PATH"
# So that typing "sysact" runs the app from anywhere:
sysact
After installation or building, simply execute:
sysact
- Use arrow keys (
↑
/↓
) ork
/j
to navigate. - Press
Enter
(or your configuredkey_confirm
) to initiate an action. - A confirmation dialog appears, with a countdown timer. Press
y
(orkey_confirm
) to confirm immediately, or wait for auto‑cancel. - Press
q
orEsc
(or your configuredkey_quit
/key_cancel
) to quit at any time.
SysAct reads settings from a TOML file located at:
~/.config/sysact/config.toml
If the file is missing, built‑in defaults are used. To customize, copy the example:
cp config.toml.example ~/.config/sysact/config.toml
Open ~/.config/sysact/config.toml
in your editor to adjust:
- default_language: Choose among
en
,fr
,es
,ar
. - confirm_timeout: Seconds before auto-confirm (1–60).
- key_up / key_down / key_confirm / key_cancel / key_quit / key_select: Customize navigation and control keys.
- show_help:
true
orfalse
to display or hide footer help text. - enable_logging: Enable file logging.
- primary_color / secondary_color: Hex codes (e.g.
#50fa7b
) for TUI styling. - [lang.
]
sections: Localized UI strings for each supported language.
See config.toml.example
for full annotated sample.
├── LICENSE
├── Makefile # Build, test, and run shortcuts
├── README.md # This file
├── bin/
│ └── sysact # Pre‑built binary (ignored by Git)
├── cmd/
│ └── sysact/
│ └── main.go # Entry point, loads config and starts TUI
├── config.toml.example # Sample configuration with all keys commented
├── go.mod
├── go.sum
├── internal/
│ ├── config/
│ │ └── loader.go # Loads + merges + validates config.toml
│ ├── logging/
│ │ └── logger.go # Sets up multi‑level loggers with rotation
│ ├── system/
│ │ ├── actions.go # Maps action indices to shell commands
│ │ └── utils.go # Detects desktop environment / WM via XDG_CURRENT_DESKTOP
│ └── tui/
│ ├── action.go # Defines a list item for a system action
│ ├── confirm_model.go # Manages confirm dialog state and timer
│ ├── confirm_update.go# Handles keypresses and timeout in confirm screen
│ ├── confirm_view.go # Renders the confirm dialog
│ ├── main_model.go # Main list model, holds items + config + styles
│ ├── main_update.go # Updates main list (navigation + selection)
│ ├── main_view.go # Renders the main screen
│ ├── root_model.go # Switches between main and confirm models
│ └── styles.go # Lip Gloss styles, now driven by config colors
└── logs/
└── sysact.log # Rotating log file (auto‑created & ignored by Git)
Pre‑built Debian packages (.deb
) are published on the GitHub Releases page. To install:
# Download the latest sysact_<version>_amd64.deb
sudo dpkg -i sysact_<version>_amd64.deb
This installs /usr/bin/sysact
so you can launch by typing sysact
in any terminal.
Contributions are welcome! Here are some ideas for ongoing improvements:
- Enhance Confirm Dialog Styles: Add more color themes, borders, or animations to the confirmation screen.
- Improve Logout Detection: Support additional desktop environments or window managers beyond the defaults. Provide a fallback if
$XDG_CURRENT_DESKTOP
is missing.
- Add Unit Tests: Write tests for
internal/system/utils.go
and other packages to cover logout command resolution, command execution, and configuration merging.
- New Localization: Add more languages by creating new
[lang.<code>]
tables in config.toml
.
- Packaging for Other Distros: Maintain an RPM spec file or Snapcraft YAML for Fedora/Snapcraft users.
To contribute:
-
Fork the repo.
-
Create a new branch:
git checkout -b feature/my-improvement
-
Implement your changes, commit with a descriptive message:
git commit -m "feat: add dark theme option"
-
Push your branch and open a pull request.
Please follow the existing code style and update this README if you add new configuration keys or features.
This project is licensed under the MIT License. See the LICENSE file for details.