diff --git a/README.md b/README.md index b7cc61b2..590457ea 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,23 @@ -## Chris Titus Tech's Linux Utility +# Chris Titus Tech's Linux Utility +[![Version](https://img.shields.io/github/v/release/ChrisTitusTech/linutil?color=%230567ff&label=Latest%20Release&style=for-the-badge)](https://github.com/ChrisTitusTech/linutil/releases/latest) +![GitHub Downloads (specific asset, all releases)](https://img.shields.io/github/downloads/ChrisTitusTech/linutil/linutil?label=Total%20Downloads&style=for-the-badge) -![pv](https://i.imgur.com/quoAwXf.png) +![Preview](docs/assets/preview.png) -## Usage +## 💡 Usage Open your terminal and paste this command ```bash curl -fsSL https://christitus.com/linux | sh ``` +## 💖 Support +- To morally and mentally support the project, make sure to leave a ⭐️! + +## 🏅 Thanks to all Contributors +Thanks a lot for spending your time helping Winutil grow. Thanks a lot! Keep rocking 🍻. + +[![Contributors](https://contrib.rocks/image?repo=ChrisTitusTech/linutil)](https://github.com/ChrisTitusTech/linutil/graphs/contributors) + ## Credits Rust Shell written by [@JustLinuxUser](https://github.com/JustLinuxUser) diff --git a/build/release/linutil b/build/release/linutil index 7d3c6e79..141d41ab 100755 Binary files a/build/release/linutil and b/build/release/linutil differ diff --git a/docs/KnownIssues.md b/docs/KnownIssues.md new file mode 100644 index 00000000..7632f0f8 --- /dev/null +++ b/docs/KnownIssues.md @@ -0,0 +1 @@ +# Known Issues \ No newline at end of file diff --git a/docs/assets/favicon.png b/docs/assets/favicon.png new file mode 100644 index 00000000..a4f4bc5d Binary files /dev/null and b/docs/assets/favicon.png differ diff --git a/docs/assets/mainpage.png b/docs/assets/mainpage.png new file mode 100644 index 00000000..c9c7ec51 Binary files /dev/null and b/docs/assets/mainpage.png differ diff --git a/docs/assets/preview.png b/docs/assets/preview.png new file mode 100644 index 00000000..399ea373 Binary files /dev/null and b/docs/assets/preview.png differ diff --git a/docs/contribute.md b/docs/contribute.md new file mode 100644 index 00000000..2189c3c0 --- /dev/null +++ b/docs/contribute.md @@ -0,0 +1,2 @@ +# How to Contribute? + diff --git a/docs/faq.md b/docs/faq.md new file mode 100644 index 00000000..b050876e --- /dev/null +++ b/docs/faq.md @@ -0,0 +1,4 @@ +# FAQ's + +## How do I uninstall LinUtil? +* You do not have to uninstall LinUtil. As it is a script you run from your terminal it only loads into your RAM. This means as soon as you close LinUtil it will be deleted off your system. \ No newline at end of file diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000..91cd803e --- /dev/null +++ b/docs/index.md @@ -0,0 +1,16 @@ +# Welcome to the LinUtil Documentation! + +[![Version](https://img.shields.io/github/v/release/ChrisTitusTech/linutil?color=%230567ff&label=Latest%20Release&style=for-the-badge)](https://github.com/ChrisTitusTech/linutil/releases/latest) +![GitHub Downloads (specific asset, all releases)](https://img.shields.io/github/downloads/ChrisTitusTech/linutil/start.sh?label=Total%20Downloads&style=for-the-badge) + +## Running latest release of LinUtil + +* You will first need to start a Terminal on your linux machine. +* Now you will need to run following command: + ``` + curl -fsSL https://christitus.com/linux | sh + ``` + +!!! info + + LinUtil is updated weekly as of the time of writing. Consequently, features and functionalities may evolve, and the documentation may not always reflect the most current images or information. \ No newline at end of file diff --git a/docs/updates.md b/docs/updates.md new file mode 100644 index 00000000..758fc4bd --- /dev/null +++ b/docs/updates.md @@ -0,0 +1,3 @@ +# Update Log + +# \ No newline at end of file diff --git a/docs/userguide.md b/docs/userguide.md new file mode 100644 index 00000000..15ee5527 --- /dev/null +++ b/docs/userguide.md @@ -0,0 +1,9 @@ +# Walkthrough + +## How to run LinUtil? +Run the following command in a terminal on your Linux System: +``` +curl -fsSL https://christitus.com/linux | sh +``` +Once you have run that command you will see the following GUI show on your screen: +![Main Page](assets/mainpage.png) \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 00000000..5032786e --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,66 @@ +site_name: Chris Titus LinUtil Official Documentation +repo_url: https://github.com/ChrisTitusTech/linutil + +nav: + - Introduction: 'index.md' + - User Guide: 'userguide.md' + - Contribute: 'contribute.md' + - Updates: 'updates.md' + - Known Issues: 'KnownIssues.md' + - FAQ: 'faq.md' + +theme: + name: material + custom_dir: 'overrides' + features: + - navigation.tabs + - navigation.sections + - toc.integrate + - navigation.top + - search.suggest + - search.highlight + - content.tabs.link + - content.code.annotation + - content.code.copy + language: en + logo: assets/favicon.png + favicon: assets/favicon.png + palette: + - media: "(prefers-color-scheme: light)" + scheme: default + toggle: + icon: material/toggle-switch-off-outline + name: Switch to dark mode + primary: black + accent: purple + - media: "(prefers-color-scheme: dark)" + scheme: slate + toggle: + icon: material/toggle-switch + name: Switch to light mode + primary: teal + accent: lime +markdown_extensions: + - admonition + - pymdownx.details + - pymdownx.superfences + - pymdownx.superfences: + custom_fences: + - name: mermaid + class: mermaid + format: !!python/name:pymdownx.superfences.fence_code_format + - abbr + - attr_list + - pymdownx.snippets + - md_in_html + - pymdownx.superfences + - pymdownx.tabbed: + alternate_style: true + - pymdownx.highlight: + anchor_linenums: true + line_spans: __span + pygments_lang_class: true + - pymdownx.inlinehilite + - def_list + - pymdownx.tasklist: + custom_checkbox: true \ No newline at end of file diff --git a/overrides/main.html b/overrides/main.html new file mode 100644 index 00000000..0cebb4ac --- /dev/null +++ b/overrides/main.html @@ -0,0 +1,12 @@ +{% extends "base.html" %} + +{% block header %} + {{ super() }} +
+ Announcement: This documentation is still in progress. +
+{% endblock %} + +{% block footer %} + {# Empty block to override the footer #} +{% endblock %} \ No newline at end of file diff --git a/src/commands/system-setup/2-gaming-setup.sh b/src/commands/system-setup/2-gaming-setup.sh index 98f47552..1d903105 100755 --- a/src/commands/system-setup/2-gaming-setup.sh +++ b/src/commands/system-setup/2-gaming-setup.sh @@ -64,7 +64,22 @@ install_additional_dependencies() { echo "Lutris Installation complete." echo "Installing steam..." - sudo apt-get install -y steam + + #Install steam on Debian + if (lsb_release -i | grep -qi Debian); then + #Enable i386 repos + sudo dpkg --add-architecture i386 + # Install software-properties-common to be able to add repos + sudo apt-get install -y software-properties-common + # Add repos necessary for installing steam + sudo apt-add-repository contrib -y + sudo apt-add-repository non-free -y + #Install steam + sudo apt-get install steam-installer -y + else + #Install steam on Ubuntu + sudo apt-get install -y steam + fi ;; *zypper) diff --git a/src/list.rs b/src/list.rs index b9d50753..b564bdea 100644 --- a/src/list.rs +++ b/src/list.rs @@ -1,5 +1,3 @@ -use std::usize; - use crate::{float::floating_window, theme::*}; use crossterm::event::{KeyCode, KeyEvent, KeyEventKind}; use ego_tree::{tree, NodeId}; @@ -169,7 +167,10 @@ impl CustomList { // node let list = List::new(items) .highlight_style(Style::default().reversed()) - .block(Block::default().borders(Borders::ALL).title(format!("Linux Toolbox - {}", chrono::Local::now().format("%Y-%m-%d")))) + .block(Block::default().borders(Borders::ALL).title(format!( + "Linux Toolbox - {}", + chrono::Local::now().format("%Y-%m-%d") + ))) .scroll_padding(1); // Render it @@ -251,7 +252,7 @@ impl CustomList { // Get the selected command if let Some(selected_command) = self.get_selected_command() { // If command is a folder, we don't display a preview - if selected_command == "" { + if selected_command.is_empty() { return; } @@ -383,4 +384,4 @@ impl CustomList { fn at_root(&self) -> bool { self.visit_stack.len() == 1 } -} \ No newline at end of file +} diff --git a/src/main.rs b/src/main.rs index 43d2410a..7acfcfb0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -95,6 +95,5 @@ fn run(terminal: &mut Terminal) -> io::Result<()> { } } } - } } diff --git a/src/running_command.rs b/src/running_command.rs index 0bed71c1..9d159ef7 100644 --- a/src/running_command.rs +++ b/src/running_command.rs @@ -30,7 +30,7 @@ pub struct RunningCommand { buffer: Arc>>, /// A handle of the tread where the command is being executed - command_thread: Option>, + command_thread: Option>, /// A handle to kill the running process, it's an option because it can only be used once child_killer: Option>>, @@ -279,4 +279,4 @@ impl RunningCommand { // Send the keycodes to the virtual terminal let _ = self.writer.write_all(&input_bytes); } -} \ No newline at end of file +} diff --git a/src/theme.rs b/src/theme.rs index c741e75b..71413752 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -31,9 +31,9 @@ pub const THEMES: [Theme; 2] = [ ]; pub fn get_theme() -> &'static Theme { - &THEMES[unsafe { THEME_IDX } ] + &THEMES[unsafe { THEME_IDX }] } -pub fn set_theme(idx: usize){ +pub fn set_theme(idx: usize) { unsafe { THEME_IDX = idx }; } diff --git a/start.sh b/start.sh index 2dd32630..2590d9d3 100755 --- a/start.sh +++ b/start.sh @@ -1,31 +1,34 @@ #!/bin/sh -RC='\033[0m' -RED='\033[0;31m' +rc='\033[0m' +red='\033[0;31m' -linutil="https://github.com/ChrisTitusTech/linutil/releases/latest/download/linutil" +binary_url="https://github.com/ChrisTitusTech/linutil/releases/latest/download/linutil" check() { - local exit_code=$1 - local message=$2 + exit_code=$1 + message=$2 - if [ $exit_code -ne 0 ]; then - echo -e "${RED}ERROR: $message${RC}" + if [ "$exit_code" -ne 0 ]; then + printf '%sERROR: %s%s\n' "$red" "$message" "$rc" exit 1 fi + + unset exit_code + unset message } -TMPFILE=$(mktemp) +temp_file=$(mktemp) check $? "Creating the temporary file" -curl -fsL $linutil -o $TMPFILE +curl -fsL "$binary_url" -o "$temp_file" check $? "Downloading linutil" -chmod +x $TMPFILE +chmod +x "$temp_file" check $? "Making linutil executable" -"$TMPFILE" +"$temp_file" check $? "Executing linutil" -rm -f $TMPFILE +rm -f "$temp_file" check $? "Deleting the temporary file"