https://github.com/arunim-io/apm
Arunim's Power Manager
https://github.com/arunim-io/apm
gtk4 power-menu rust
Last synced: 2 months ago
JSON representation
Arunim's Power Manager
- Host: GitHub
- URL: https://github.com/arunim-io/apm
- Owner: arunim-io
- License: gpl-3.0
- Created: 2023-12-25T15:35:49.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-22T02:51:17.000Z (about 1 year ago)
- Last Synced: 2025-02-13T11:50:16.959Z (4 months ago)
- Topics: gtk4, power-menu, rust
- Language: Nix
- Homepage:
- Size: 648 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Arunim's Power Manager (apm)
> apm is a simple power menu built with [`gtk4-layer-shell`](https://github.com/wmww/gtk4-layer-shell) and [`gtk4`](https://docs.gtk.org/gtk4/).
## Running
Just use the command `apm` to run.
## Installation
### From source
You will need the following dependencies to build the binary.
- pkg-config
- glib
- gtk4
- gtk4-layer-shell```sh
cargo build --release
```If you are using Nix or NixOS with flakes support, then run:
```sh
nix build
```### Nix/NixOS + Flakes
```sh
nix profile install github:arunim-io/apm
```You can also include it in your flake config.
Example:
```nix
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
apm.url = "github:arunim-io/apm";
};
}
```## Configuration
`apm` is configured using `toml`. See [`examples/config.toml`](examples/config.toml) for reference.
For styling, see the following links:
- [CSS in GTK](https://docs.gtk.org/gtk4/css-overview.html)
- [GTK CSS Properties](https://docs.gtk.org/gtk4/css-properties.html)See [`examples/styles.css`](examples/styles.css) for reference.
### Options
| Name | Type | Default Value | Description |
| ----------- | ---------- | ------------- | ------------------------------------ |
| spacing | `integer` | 25 | The gap between each button |
| icon_size | `integer` | 50 | The size of the icon in the button |
| icon_margin | `integer` | 10 | The margin of the icon in the button |
| buttons | `Button[]` | [] | The buttons to display. |#### Button Options
| Name | Type | Default Value | Description |
| ----- | -------- | ------------- | ------------------------------------------------- |
| icon | `string` | 25 | The icon to display |
| label | `string` | 50 | The label to show under the button |
| cmd | `string` | 10 | The command to execute when the button is called. |
| key | `string` | [] | The key to use for activating the button. |## License
`apm` is [GNU GPLv3](LICENSE) licensed.