Thanks to visit codestin.com
Credit goes to github.com

Skip to content

nooneknowspeter/legionlinuxtui

Repository files navigation

legionlinuxtui

Note

Ensure that the Lenovo Legion Linux Drivers and lm_sensors are installed properly on your system.

A terminal user interface for controlling Lenovo Legion laptops.

It utilizes the Lenovo Legion Linux Drivers.

demo1

demo2

Features

  • Sensor information display (100ms update)
  • Capability toggles; convservative mode, power mode, ...
  • Additional information

Installation

NixOS

NUR

Users who have the NUR setup, you can install legionlinuxtui using:

nur.repos.nooneknowspeter.legionlinuxtui

Flakes

You can install legionlinuxtui without having the NUR setup by using my NUR flake directly.

In your flake.nix, add the repo as an input:

inputs = {
    nooneknowspeter = {
      url = "github:nooneknowspeter/nurpkgs";
    };
}

Note

Ensure that you inherit the inputs in your NixOS or Home-Manager configurations

Note

Either inputs.nooneknowspeter.packages.x86_64-linux.legionlinuxtui or inputs.nooneknowspeter.packages.x86_64-linux.legionlinuxtui-git can be used at a time.

legionlinuxtui-git builds from the latest commit from the main branch (rolling release) and legionlinux builds from each tagged version, so pick your poison.

Add the package to your system environment packages:

environment.systemPackages = with pkgs; [
    inputs.nooneknowspeter.packages.x86_64-linux.legionlinuxtui
]

or in Home-Manager packages:

home.packages = with pkgs; [
    inputs.nooneknowspeter.packages.x86_64-linux.legionlinuxtui
]

Note

Run the application with sudo privileges.

Setup

Note

Ensure Go >= 1.24.4 is installed.

Nix

Note

Ensure Nix is installed and experimental features are on.

A Nix flake development shell declaration is available in the repository.

Enter the shell using:

nix develop

Note

A .envrc is also available in the repository for direnv users

Build and Run

Note

A Makefile is avaiable with quick commands.

Note

The application needs sudo privileges for I/O; interacting with the drivers, changing values in sysfs

Run the application:

sudo go run .

or:

go build -o build/
sudo ./build/legionlinuxtui

Contributing

Although this project is suited to my needs and wants; add my own features and fix my own issues, I will gladly appreciate and accept any PRs and issues that help the project.

PRs

Note

Ensure code is formatted with treefmt.

A treefmt.toml is available in the repository.

Note

Use the make lint command in Makefile for linting.

CI/CD is available, PRs will get checked for any errors before merging.

Feedback

Leaving issues; bugs and requested features are appreciated. They will help the project making it stable and practical as possible for others.

TODO

I keep track of the project tasks here as well as in the codebase; TODO:.

Resources

About

Control lenovo legion laptops in the terminal

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages