Chris Titus Tech's Linux Toolbox - Linutil is a distro-agnostic toolbox designed to simplify everyday Linux tasks.
Go to file
Jeevitha Kannan K S ab7a67087d
refact: rust fixes and optimizations (#933)
* fix: getting locked out when running script

* Use success and fail colors and reorder imports

Use theme color instead of using ratatui::Color for running_command success and fail + search preview text color + min tui warning color, add colors for confirmation prompt, fix inverted success and fail colors

* Remove redundant code in themes

Removed redundant match statement with a function

* Fix scroll beyond list, color bleeding and refact in confirmation.rs

Remove unnecessary usage of pub in ConfirmPropmt struct fields, simplify numbering, prevent scrolling beyond list, fix color bleeding

* Implement case insensitive, fix word disappearing bug

Use regex for case insesitive finding, implement String instead of char<Vec>, fix word disappearing by recalculating the render x for preview text

* Revert "Remove redundant code in themes"

This reverts commit 3b7e859af8.

* Reference instead of passing the vector

* Revert regex and String implementation

Use Vec<char> for search_input to prevent panics when using multi-byte characters, use lowercase conversion instead of regex, Added comments for clarity

* Replace ansi and text wrapping code with ratatui

Replaced ansi related code for tree sitter highlight with direct ratatui::text. Cache the processed text in appstate to remove processing of text for every frame render.Create paragraph instead of list so that scroll and wrapping can be done without external crates. Add caps keys for handle_key_event.

* Fix conflicts

* Reference instead of borrowing commands, refact mut variables

Reference instead of borrowing commands from state, Refactor draw function variables to immutable, calculate innersize from block instead of manual definition

* Update tui/src/filter.rs

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>

* Rendering optimizations and function refactors

Handle `find_command` inside state itself -> `get_command_by_name`. Move tips to a seperate file for modularity. Pass the whole args to state instead of seperate args. Use const for float and confirmation prompt float sizes. Add the `longest_tab_length` to appstate struct so that it will not be calculated for each frame render use static str instead String for tips. Use function for spawning confirmprompt. Merge command list and task items list rendering a single widget instead of two. Remove redundant keys in handle_key. Optimize scrolling logic. Rename `toggle_task_list_guide` -> `enable_task_list_guide`

* Cleanup

Use prelude for ratatui imports. Use const for theme functions, add
missing hints

* Update deps, remove unused temp-dir

* Add accidentally deleted preview.tape

Add labels + Wait 2sec after program ends

* Add fields to config files

Skip Confirmation, Bypass Size

* Remove accidentally commited config file

---------

Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>
2024-11-17 12:24:54 -06:00
.cargo 📔 docs: auto generation (#784) 2024-10-08 16:12:47 -05:00
.github Add accidentally deleted preview.tape (#947) 2024-11-14 10:46:15 -06:00
core refact: rust fixes and optimizations (#933) 2024-11-17 12:24:54 -06:00
docs docs: new repo (#888) 2024-11-08 17:09:25 -06:00
man Update CLI arguments documentation (#926) 2024-11-11 10:26:15 -06:00
tui refact: rust fixes and optimizations (#933) 2024-11-17 12:24:54 -06:00
xtask refact: Handle temporary directories entirely within core (#754) 2024-11-06 15:28:17 -06:00
_typos.toml ci: add a spellcheck typos CI (#776) 2024-10-07 20:43:47 -05:00
.gitignore get rid of tracking builds 2024-09-16 15:46:37 -05:00
.shellcheckrc feat: Alpine linux support (#814) 2024-11-07 13:03:21 -06:00
Cargo.lock refact: rust fixes and optimizations (#933) 2024-11-17 12:24:54 -06:00
Cargo.toml Use vt100-ctt instead of patching the dep (#952) 2024-11-16 15:07:22 -06:00
LICENSE Create LICENSE 2024-07-29 11:06:34 -05:00
linutil.desktop 🖥️ refact(linutil.desktop): executable paths (#782) 2024-10-07 20:41:32 -05:00
README.md Update CLI arguments documentation (#926) 2024-11-11 10:26:15 -06:00
start.sh Linutil arguments when using curl (#835) 2024-11-07 13:18:21 -06:00
startdev.sh Linutil arguments when using curl (#835) 2024-11-07 13:18:21 -06:00

Chris Titus Tech's Linux Utility

Version GitHub Downloads (specific asset, all releases)

Crates.io Version linutil AUR Version linutil-bin AUR Version

Preview

Linutil is a distro-agnostic toolbox designed to simplify everyday Linux tasks. It helps you set up applications and optimize your system for specific use cases. The utility is actively developed in Rust 🦀, providing performance and reliability.

Note

Since the project is still in active development, you may encounter some issues. Please consider submitting feedback if you do.

💡 Usage

To get started, pick which branch you would like to use, then run the command in your terminal:

curl -fsSL https://christitus.com/linux | sh

Dev branch

curl -fsSL https://christitus.com/linuxdev | sh

CLI arguments

Linutil supports various command-line arguments to customize its behavior. Here are some common arguments you can use:

  • -c, --config <CONFIG> : Path to the configuration file.
  • --override-validation : Show all available options, disregarding compatibility checks (UNSAFE).
  • --size-bypass : Bypass the terminal size limit.
  • -y, --skip-confirmation : Skip confirmation prompt before executing commands.
  • -t, --theme <THEME> : Set the theme to use in the application [default: default] [possible values: default, compatible].
  • -h, --help : Print help.

For more detailed usage, run:

curl -fsSL https://christitus.com/linux | sh -s -- --help
linutil --help

⬇️ Installation

Linutil is also available as a package in various repositories:

Packaging status

Arch Linux

Linutil can be installed on Arch Linux with three different AUR packages:

  • linutil - Stable release compiled from source
  • linutil-bin - Stable release pre-compiled
  • linutil-git - Compiled from the last commit (not recommended)

by running:

git clone https://aur.archlinux.org/<package>.git
cd <package>
makepkg -si

Replace <package> with your preferred package.

If you use yay, paru or any other AUR Helper, it's even simpler:

paru -S linutil

Replace paru with your preferred helper and linutil with your preferred package.

OpenSUSE

Linutil can be installed on OpenSUSE with:

sudo zypper install linutil
Cargo

Linutil can be installed via Cargo with:

cargo install linutil

Note that crates installed using cargo install require manual updating with cargo install --force (update functionality is included in LinUtil)

Configuration

Linutil supports configuration through a TOML config file. Path to the file can be specified with --config (or -c).

Available options:

  • auto_execute - a list of commands to execute automatically (can be combined with --skip-confirmation)

Example config:

# example_config.toml

auto_execute = [
    "Fastfetch",
    "Alacritty",
    "Kitty"
]
linutil --config /path/to/example_config.toml

💖 Support

If you find Linutil helpful, please consider giving it a to show your support!

🎓 Documentation

For comprehensive information on how to use Linutil, visit the Linutil Official Documentation.

🛠 Contributing

We welcome contributions from the community! Before you start, please review our Contributing Guidelines to understand how to make the most effective and efficient contributions.

Official LinUtil Roadmap

Docs are now here

🏅 Thanks to All Contributors

Thank you to everyone who has contributed to the development of Linutil. Your efforts are greatly appreciated, and youre helping make this tool better for everyone!

Contributors

📜 Contributor Milestones

  • 2024/07 - Original Linutil Rust TUI was developed by @JustLinuxUser.
  • 2024/09 - TabList (Left Column) and various Rust Core/TUI Improvements developed by @lj3954
  • 2024/09 - Cargo Publish, AUR, Rust, and Bash additions done by @adamperkowski
  • 2024/09 - Rust TUI Min/Max, MultiSelection, and Bash additions done by @jeevithakannan2
  • 2024/09 - Various bash updates and standardization done by @nnyyxxxx
  • 2024/09 - Multiple bash script additions done by @guruswarupa