diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml new file mode 100644 index 00000000..486d1ed9 --- /dev/null +++ b/.github/workflows/github-pages.yml @@ -0,0 +1,22 @@ +name: GitHub Pages Deploy +on: + release: + types: [published, prereleased] + workflow_dispatch: +permissions: + contents: write +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: 3.x + - uses: actions/cache@v4 + with: + key: ${{ github.ref }} + path: .cache + - run: pip install mkdocs-material + - run: pip install pillow cairosvg + - run: mkdocs gh-deploy --force 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/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/common-script.sh b/src/commands/common-script.sh index a6f31515..064bf3c9 100644 --- a/src/commands/common-script.sh +++ b/src/commands/common-script.sh @@ -78,7 +78,8 @@ checkDistro() { checkEnv() { checkCommandRequirements 'curl groups sudo' - checkPackageManager 'apt-get dnf pacman zypper' + checkPackageManager 'apt-get nala dnf pacman zypper yum xbps-install nix-env' + checkCurrentDirectoryWritable checkSuperUser checkDistro } diff --git a/src/commands/dotfiles/alacritty-setup.sh b/src/commands/dotfiles/alacritty-setup.sh index 2e2156d4..2b363e85 100755 --- a/src/commands/dotfiles/alacritty-setup.sh +++ b/src/commands/dotfiles/alacritty-setup.sh @@ -1,12 +1,5 @@ #!/bin/sh -e -checkEnv() { - checkCommandRequirements 'curl groups sudo' - checkPackageManager 'apt-get dnf pacman zypper' - checkSuperUser - checkDistro -} - setupAlacritty() { echo "Install Alacritty if not already installed..." if ! command_exists alacritty; then diff --git a/src/commands/dotfiles/kitty-setup.sh b/src/commands/dotfiles/kitty-setup.sh index 131d1f9a..bad29ac0 100755 --- a/src/commands/dotfiles/kitty-setup.sh +++ b/src/commands/dotfiles/kitty-setup.sh @@ -1,12 +1,5 @@ #!/bin/sh -e -checkEnv() { - checkCommandRequirements 'curl groups sudo' - checkPackageManager 'apt-get dnf pacman zypper' - checkSuperUser - checkDistro -} - setupKitty() { echo "Install Kitty if not already installed..." if ! command_exists kitty; then diff --git a/src/commands/dotfiles/rofi-setup.sh b/src/commands/dotfiles/rofi-setup.sh index aab942ed..ea2be0f2 100755 --- a/src/commands/dotfiles/rofi-setup.sh +++ b/src/commands/dotfiles/rofi-setup.sh @@ -1,12 +1,5 @@ #!/bin/sh -e -checkEnv() { - checkCommandRequirements 'curl groups sudo' - checkPackageManager 'apt-get dnf pacman zypper' - checkSuperUser - checkDistro -} - setupRofi() { echo "Install Rofi if not already installed..." if ! command_exists rofi; then diff --git a/src/commands/system-setup/1-compile-setup.sh b/src/commands/system-setup/1-compile-setup.sh index 0ae78950..345f09c8 100755 --- a/src/commands/system-setup/1-compile-setup.sh +++ b/src/commands/system-setup/1-compile-setup.sh @@ -22,13 +22,6 @@ fi cd "$LINUXTOOLBOXDIR/linutil" || exit -checkEnv() { - checkCommandRequirements 'curl groups sudo' - checkPackageHandler 'apt yum dnf pacman zypper' - checkCurrentDirectoryWritable - checkSuperUser -} - installDepend() { ## Check for dependencies. DEPENDENCIES='tar tree multitail tldr trash-cli unzip cmake make jq' diff --git a/src/commands/system-setup/2-gaming-setup.sh b/src/commands/system-setup/2-gaming-setup.sh index f044162c..1d903105 100755 --- a/src/commands/system-setup/2-gaming-setup.sh +++ b/src/commands/system-setup/2-gaming-setup.sh @@ -1,12 +1,5 @@ #!/bin/sh -e -checkEnv() { - checkCommandRequirements 'curl groups sudo' - checkPackageManager 'apt-get yum dnf pacman zypper' - checkCurrentDirectoryWritable - checkSuperUser -} - installDepend() { ## Check for dependencies. echo -e "${YELLOW}Installing dependencies...${RC}" @@ -71,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/commands/system-setup/3-global-theme.sh b/src/commands/system-setup/3-global-theme.sh index 915684b1..a1ad4824 100644 --- a/src/commands/system-setup/3-global-theme.sh +++ b/src/commands/system-setup/3-global-theme.sh @@ -4,15 +4,15 @@ LINUXTOOLBOXDIR="$HOME/linuxtoolbox" if [ ! -d "$LINUXTOOLBOXDIR" ]; then - echo -e "${YELLOW}Creating linuxtoolbox directory: $LINUXTOOLBOXDIR${RC}" + printf "${YELLOW}Creating linuxtoolbox directory: %s${RC}\n" "$LINUXTOOLBOXDIR" mkdir -p "$LINUXTOOLBOXDIR" - echo -e "${GREEN}linuxtoolbox directory created: $LINUXTOOLBOXDIR${RC}" + printf "${GREEN}linuxtoolbox directory created: %s${RC}\n" "$LINUXTOOLBOXDIR" fi cd "$LINUXTOOLBOXDIR" || exit install_theme_tools() { - echo -e "${YELLOW}Installing theme tools (qt6ct and kvantum)...${RC}" + printf "${YELLOW}Installing theme tools (qt6ct and kvantum)...${RC}\n" case $PACKAGER in apt-get) sudo apt-get update @@ -31,14 +31,14 @@ install_theme_tools() { sudo pacman --noconfirm -S qt6ct kvantum ;; *) - echo -e "${RED}Unsupported package manager. Please install qt6ct and kvantum manually.${RC}" + printf "${RED}Unsupported package manager. Please install qt6ct and kvantum manually.${RC}\n" exit 1 ;; esac } configure_qt6ct() { - echo -e "${YELLOW}Configuring qt6ct...${RC}" + printf "${YELLOW}Configuring qt6ct...${RC}\n" mkdir -p "$HOME/.config/qt6ct" cat < "$HOME/.config/qt6ct/qt6ct.conf" [Appearance] @@ -46,17 +46,26 @@ style=kvantum color_scheme=default icon_theme=breeze EOF - echo -e "${GREEN}qt6ct configured successfully.${RC}" + printf "${GREEN}qt6ct configured successfully.${RC}\n" + + # Add QT_QPA_PLATFORMTHEME to /etc/environment + if ! grep -q "QT_QPA_PLATFORMTHEME=qt6ct" /etc/environment; then + printf "${YELLOW}Adding QT_QPA_PLATFORMTHEME to /etc/environment...${RC}\n" + echo "QT_QPA_PLATFORMTHEME=qt6ct" | sudo tee -a /etc/environment > /dev/null + printf "${GREEN}QT_QPA_PLATFORMTHEME added to /etc/environment.${RC}\n" + else + printf "${GREEN}QT_QPA_PLATFORMTHEME already set in /etc/environment.${RC}\n" + fi } configure_kvantum() { - echo -e "${YELLOW}Configuring Kvantum...${RC}" + printf "${YELLOW}Configuring Kvantum...${RC}\n" mkdir -p "$HOME/.config/Kvantum" cat < "$HOME/.config/Kvantum/kvantum.kvconfig" [General] theme=Breeze EOF - echo -e "${GREEN}Kvantum configured successfully.${RC}" + printf "${GREEN}Kvantum configured successfully.${RC}\n" } checkEnv diff --git a/src/commands/system-update.sh b/src/commands/system-update.sh index 132e617d..b86172b8 100755 --- a/src/commands/system-update.sh +++ b/src/commands/system-update.sh @@ -1,12 +1,5 @@ #!/bin/sh -e -checkEnv() { - checkCommandRequirements 'curl groups sudo' - checkPackageManager 'apt-get nala dnf pacman zypper yum xbps-install' - checkSuperUser - checkDistro -} - fastUpdate() { case ${PACKAGER} in pacman)