diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml deleted file mode 100644 index b94fa633..00000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -1,66 +0,0 @@ -tag-prefix: "" -categories: - - title: '🚀 Features' - labels: - - 'feature' - - 'enhancement' - - title: '🐛 Bug Fixes' - labels: - - 'fix' - - 'bugfix' - - 'bug' - - title: '📚 Documentation' - label: 'documentation' - - title: '🔒 Security' - label: 'security' - - title: '🧰 GitHub Actions' - label: 'github actions' -change-template: '- $TITLE @$AUTHOR (#$NUMBER)' -template: | - ## Changes - - $CHANGES - -change-title-escapes: '\<*_&"''' -autolabeler: - - label: 'documentation' - files: - - '*.md' - branch: - - '/docs{0,1}\/.+/' - - label: 'bug' - branch: - - '/fix\/.+/' - title: - - '/fix/i' - - label: 'enhancement' - branch: - - '/feature\/.+/' - body: - - '/[A-Z]+-[0-9]+/' - - label: 'documentation' - files: - - '**/*.md' - - 'docs/**/*' - - label: 'security' - branch: - - '/security\/.+/' - -include-labels: - - 'documentation' - - 'bug' - - 'enhancement' - - 'security' - - 'github actions' - -replacers: - - search: /"/g - replace: '' - - search: /'/g - replace: '' - - search: /`/g - replace: '' -exclude-labels: - - 'skip-changelog' - -filter-by-commitish: false \ No newline at end of file diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 00000000..51218dc9 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,20 @@ +changelog: + categories: + - title: '🚀 Features' + labels: + - 'feature' + - 'enhancement' + - title: '🐛 Bug Fixes' + labels: + - 'fix' + - 'bugfix' + - 'bug' + - title: '📚 Documentation' + label: 'documentation' + - title: '🔒 Security' + label: 'security' + - title: '🧰 GitHub Actions' + label: 'github actions' + exclude: + labels: + - 'skip-changelog' \ No newline at end of file diff --git a/.github/workflows/bashisms.yml b/.github/workflows/bashisms.yml index 7226bb5c..7ce39ef1 100644 --- a/.github/workflows/bashisms.yml +++ b/.github/workflows/bashisms.yml @@ -19,17 +19,27 @@ jobs: id: get_sh_files run: | sh_files=$(git diff --name-only origin/${{ github.base_ref }} HEAD core/tabs | grep '\.sh$' || true) - echo "::set-output name=sh_files::$sh_files" + if [ -n "$sh_files" ]; then + echo "$sh_files" > changed_files + echo "changed=1" >> $GITHUB_OUTPUT + else + echo "changed=0" >> $GITHUB_OUTPUT + fi - name: Install devscripts - if: steps.get_sh_files.outputs.sh_files != '' + if: steps.get_sh_files.outputs.changed == 1 run: sudo apt-get update && sudo apt-get install devscripts - name: Check for bashisms - if: steps.get_sh_files.outputs.sh_files != '' + if: steps.get_sh_files.outputs.changed == 1 run: | - for file in ${{ steps.get_sh_files.outputs.sh_files }}; do - if [[ -f "$file" ]]; then - checkbashisms "$file" - fi + echo "Running for:\n$(cat changed_files)\n" + for file in $(cat changed_files); do + if [[ -f "$file" ]]; then + checkbashisms "$file" + fi done + + - name: Remove the created file + if: steps.get_sh_files.outputs.changed == 1 + run: rm changed_files diff --git a/.github/workflows/linutil.yml b/.github/workflows/linutil.yml index f7f369e8..e6d464da 100644 --- a/.github/workflows/linutil.yml +++ b/.github/workflows/linutil.yml @@ -1,8 +1,6 @@ name: LinUtil Release on: - push: - branches: ["main"] workflow_dispatch: permissions: @@ -55,12 +53,6 @@ jobs: mv build/x86_64-unknown-linux-musl/release/linutil build/linutil mv build/aarch64-unknown-linux-musl/release/linutil build/linutil-aarch64 - - name: Pull latest changes - run: | - git config --global user.email "github-actions@github.com" - git config --global user.name "GitHub Actions" - git pull origin main - - uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: Commit Linutil @@ -75,15 +67,6 @@ jobs: echo "version=$version" >> $GITHUB_ENV shell: bash - - name: Generate Release Notes - id: generate_notes - uses: release-drafter/release-drafter@v6 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - config-name: release-drafter.yml - version: ${{ env.version }} - - name: Create and Upload Release id: create_release uses: softprops/action-gh-release@v2 @@ -91,12 +74,11 @@ jobs: tag_name: ${{ env.version }} name: Pre-Release ${{ env.version }} body: | - ${{ steps.generate_notes.outputs.body }} - ![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/linutil/${{ env.version }}/linutil) ![GitHub Downloads (specific asset, specific tag)](https://img.shields.io/github/downloads/ChrisTitusTech/linutil/${{ env.version }}/linutil-aarch64) - append_body: false + append_body: true + generate_release_notes: true files: | ./build/linutil ./build/linutil-aarch64 @@ -106,3 +88,23 @@ jobs: env: version: ${{ env.version }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Install vhs + run: | + wget 'https://github.com/charmbracelet/vhs/releases/download/v0.8.0/vhs_0.8.0_amd64.deb' + sudo apt install -y ffmpeg + sudo snap install ttyd --classic + sudo dpkg -i 'vhs_0.8.0_amd64.deb' + + - name: Build the preview + run: | + export PATH="$(pwd)/build:$PATH" + vhs docs/assets/preview.tape -o docs/assets/preview.gif + + - name: Upload the preview + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: Preview for ${{ env.version }} + file_pattern: "docs/assets/preview.gif" + add_options: "--force" + if: success() diff --git a/Cargo.lock b/Cargo.lock index 158fff57..81750251 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -194,9 +194,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.17" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e5a21b8495e732f1b3c364c9949b201ca7bae518c502c80256c96ad79eaf6ac" +checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3" dependencies = [ "clap_builder", "clap_derive", @@ -204,9 +204,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.17" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cf2dd12af7a047ad9d6da2b6b249759a22a7abc0f474c1dae1777afa4b21a73" +checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b" dependencies = [ "anstream", "anstyle", @@ -216,9 +216,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.13" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck", "proc-macro2", @@ -328,12 +328,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - [[package]] name = "getrandom" version = "0.2.15" @@ -491,19 +485,19 @@ checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "linutil_core" -version = "24.9.22" +version = "24.9.28" dependencies = [ "ego-tree", "include_dir", "serde", - "tempdir", + "temp-dir", "toml", "which", ] [[package]] name = "linutil_tui" -version = "24.9.22" +version = "24.9.28" dependencies = [ "ansi-to-tui", "anstyle", @@ -514,12 +508,13 @@ dependencies = [ "linutil_core", "oneshot", "portable-pty", - "rand 0.8.5", + "rand", "ratatui", + "temp-dir", "tree-sitter-bash", "tree-sitter-highlight", "tui-term", - "unicode-width", + "unicode-width 0.2.0", "zips", ] @@ -716,19 +711,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -dependencies = [ - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "rdrand", - "winapi", -] - [[package]] name = "rand" version = "0.8.5" @@ -737,7 +719,7 @@ checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", "rand_chacha", - "rand_core 0.6.4", + "rand_core", ] [[package]] @@ -747,24 +729,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.4", + "rand_core", ] -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - [[package]] name = "rand_core" version = "0.6.4" @@ -792,16 +759,7 @@ dependencies = [ "strum_macros", "unicode-segmentation", "unicode-truncate", - "unicode-width", -] - -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", + "unicode-width 0.1.14", ] [[package]] @@ -842,15 +800,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] - [[package]] name = "rustix" version = "0.38.37" @@ -1063,14 +1012,10 @@ dependencies = [ ] [[package]] -name = "tempdir" -version = "0.3.7" +name = "temp-dir" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" -dependencies = [ - "rand 0.4.6", - "remove_dir_all", -] +checksum = "bc1ee6eef34f12f765cb94725905c6312b6610ab2b0940889cfe58dae7bc3c72" [[package]] name = "termios" @@ -1205,14 +1150,20 @@ checksum = "b3644627a5af5fa321c95b9b235a72fd24cd29c648c2c379431e6628655627bf" dependencies = [ "itertools", "unicode-segmentation", - "unicode-width", + "unicode-width 0.1.14", ] [[package]] name = "unicode-width" -version = "0.1.13" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" [[package]] name = "utf8parse" @@ -1229,12 +1180,11 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "vt100" version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84cd863bf0db7e392ba3bd04994be3473491b31e66340672af5d11943c6274de" +source = "git+https://github.com/ChrisTitusTech/vt100-rust#e41fb3d8fb5fd01dd2d076c9a25823a31656012f" dependencies = [ "itoa", "log", - "unicode-width", + "unicode-width 0.1.14", "vte", ] diff --git a/Cargo.toml b/Cargo.toml index d437d76d..cf43a012 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace.package] license = "MIT" -version = "24.9.22" +version = "24.9.28" [workspace.dependencies] ego-tree = "0.6.2" @@ -9,6 +9,9 @@ ego-tree = "0.6.2" members = ["tui", "core"] resolver = "2" +[patch.crates-io] +vt100 = { git = "https://github.com/ChrisTitusTech/vt100-rust" } + [profile.release] opt-level = "z" debug = false diff --git a/README.md b/README.md index b2f33406..3c03bd87 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![Crates.io Version](https://img.shields.io/crates/v/linutil_tui?style=for-the-badge&color=%23af3a03)](https://crates.io/crates/linutil_tui) [![linutil AUR Version](https://img.shields.io/aur/version/linutil?style=for-the-badge&label=%5BAUR%5D%20linutil&color=%23230567ff)](https://aur.archlinux.org/packages/linutil) [![linutil-bin AUR Version](https://img.shields.io/aur/version/linutil-bin?style=for-the-badge&label=%5BAUR%5D%20linutil-bin&color=%23230567ff)](https://aur.archlinux.org/packages/linutil-bin) -![Preview](docs/assets/preview.png) +![Preview](docs/assets/preview.gif) **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. diff --git a/cargo-lock-merge.txt b/cargo-lock-merge.txt deleted file mode 100644 index 649a99cf..00000000 --- a/cargo-lock-merge.txt +++ /dev/null @@ -1,5 +0,0 @@ -What to do when you have a Cargo.lock merge conflict? -1. `git checkout origin/main -- Cargo.lock` to get the original Cargo.lock -2. `cargo build` to update Cargo.lock -3. `git add Cargo.lock` -4. continue the merge as normal \ No newline at end of file diff --git a/core/Cargo.toml b/core/Cargo.toml index 8605c94c..d3f42011 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -13,7 +13,7 @@ include = [ [dependencies] include_dir = "0.7.4" -tempdir = "0.3.7" +temp-dir = "0.1.14" serde = { version = "1.0.205", features = ["derive"], default-features = false } toml = { version = "0.8.19", features = ["parse"], default-features = false } which = "6.0.3" diff --git a/core/src/inner.rs b/core/src/inner.rs index 2e34954e..a2274dfa 100644 --- a/core/src/inner.rs +++ b/core/src/inner.rs @@ -1,31 +1,38 @@ -use crate::{Command, ListNode, Tab}; -use ego_tree::{NodeMut, Tree}; -use include_dir::{include_dir, Dir}; -use serde::Deserialize; use std::{ fs::File, io::{BufRead, BufReader, Read}, os::unix::fs::PermissionsExt, path::{Path, PathBuf}, + rc::Rc, }; -use tempdir::TempDir; + +use crate::{Command, ListNode, Tab}; +use ego_tree::{NodeMut, Tree}; +use include_dir::{include_dir, Dir}; +use serde::Deserialize; +use temp_dir::TempDir; const TAB_DATA: Dir = include_dir!("$CARGO_MANIFEST_DIR/tabs"); -pub fn get_tabs(validate: bool) -> Vec { - let tab_files = TabList::get_tabs(); - let tabs = tab_files.into_iter().map(|path| { - let directory = path.parent().unwrap().to_owned(); - let data = std::fs::read_to_string(path).expect("Failed to read tab data"); - let mut tab_data: TabEntry = toml::from_str(&data).expect("Failed to parse tab data"); +pub fn get_tabs(validate: bool) -> (TempDir, Vec) { + let (temp_dir, tab_files) = TabList::get_tabs(); - if validate { - filter_entries(&mut tab_data.data); - } - (tab_data, directory) - }); + let tabs: Vec<_> = tab_files + .into_iter() + .map(|path| { + let directory = path.parent().unwrap().to_owned(); + let data = std::fs::read_to_string(path).expect("Failed to read tab data"); + let mut tab_data: TabEntry = toml::from_str(&data).expect("Failed to parse tab data"); + + if validate { + filter_entries(&mut tab_data.data); + } + (tab_data, directory) + }) + .collect(); let tabs: Vec = tabs + .into_iter() .map( |( TabEntry { @@ -35,12 +42,12 @@ pub fn get_tabs(validate: bool) -> Vec { }, directory, )| { - let mut tree = Tree::new(ListNode { + let mut tree = Tree::new(Rc::new(ListNode { name: "root".to_string(), description: String::new(), command: Command::None, task_list: String::new(), - }); + })); let mut root = tree.root_mut(); create_directory(data, &mut root, &directory, validate); Tab { @@ -55,7 +62,7 @@ pub fn get_tabs(validate: bool) -> Vec { if tabs.is_empty() { panic!("No tabs found"); } - tabs + (temp_dir, tabs) } #[derive(Deserialize)] @@ -164,28 +171,28 @@ fn filter_entries(entries: &mut Vec) { fn create_directory( data: Vec, - node: &mut NodeMut, + node: &mut NodeMut>, command_dir: &Path, validate: bool, ) { for entry in data { match entry.entry_type { EntryType::Entries(entries) => { - let mut node = node.append(ListNode { + let mut node = node.append(Rc::new(ListNode { name: entry.name, description: entry.description, command: Command::None, task_list: String::new(), - }); + })); create_directory(entries, &mut node, command_dir, validate); } EntryType::Command(command) => { - node.append(ListNode { + node.append(Rc::new(ListNode { name: entry.name, description: entry.description, command: Command::Raw(command), task_list: String::new(), - }); + })); } EntryType::Script(script) => { let script = command_dir.join(script); @@ -194,7 +201,7 @@ fn create_directory( } if let Some((executable, args)) = get_shebang(&script, validate) { - node.append(ListNode { + node.append(Rc::new(ListNode { name: entry.name, description: entry.description, command: Command::LocalFile { @@ -203,7 +210,7 @@ fn create_directory( file: script, }, task_list: entry.task_list, - }); + })); } } } @@ -246,19 +253,20 @@ fn is_executable(path: &Path) -> bool { } impl TabList { - fn get_tabs() -> Vec { - let temp_dir = TempDir::new("linutil_scripts").unwrap().into_path(); + fn get_tabs() -> (TempDir, Vec) { + let temp_dir = TempDir::new().unwrap(); TAB_DATA .extract(&temp_dir) .expect("Failed to extract the saved directory"); - let tab_files = - std::fs::read_to_string(temp_dir.join("tabs.toml")).expect("Failed to read tabs.toml"); + let tab_files = std::fs::read_to_string(temp_dir.path().join("tabs.toml")) + .expect("Failed to read tabs.toml"); let data: Self = toml::from_str(&tab_files).expect("Failed to parse tabs.toml"); - - data.directories + let tab_paths = data + .directories .iter() - .map(|path| temp_dir.join(path).join("tab_data.toml")) - .collect() + .map(|path| temp_dir.path().join(path).join("tab_data.toml")) + .collect(); + (temp_dir, tab_paths) } } diff --git a/core/src/lib.rs b/core/src/lib.rs index 22ef602b..b7cd631e 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -1,5 +1,7 @@ mod inner; +use std::rc::Rc; + use ego_tree::Tree; use std::path::PathBuf; @@ -20,7 +22,7 @@ pub enum Command { #[derive(Clone, Hash, Eq, PartialEq)] pub struct Tab { pub name: String, - pub tree: Tree, + pub tree: Tree>, pub multi_selectable: bool, } diff --git a/core/tabs/applications-setup/Developer-tools/meld-setup.sh b/core/tabs/applications-setup/Developer-tools/meld-setup.sh index 8881ba1f..bd0bb3c2 100644 --- a/core/tabs/applications-setup/Developer-tools/meld-setup.sh +++ b/core/tabs/applications-setup/Developer-tools/meld-setup.sh @@ -3,10 +3,25 @@ . ../../common-script.sh installMeld() { - cd "$HOME" && git clone https://gitlab.gnome.org/GNOME/meld.git - echo "PATH=\$PATH:$HOME/meld/bin" | "$ESCALATION_TOOL" tee -a /etc/environment + if ! command_exists meld; then + printf "%b\n" "${YELLOW}Installing Meld...${RC}" + case "$PACKAGER" in + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm meld + ;; + apt-get|nala) + "$ESCALATION_TOOL" "$PACKAGER" -y install meld + ;; + *) + . ../setup-flatpak.sh + flatpak install -y flathub org.gnome.meld + ;; + esac + else + printf "%b\n" "${GREEN}Meld is already installed.${RC}" + fi } checkEnv checkEscalationTool -installMeld +installMeld \ No newline at end of file diff --git a/core/tabs/applications-setup/Developer-tools/neovim-setup.sh b/core/tabs/applications-setup/Developer-tools/neovim-setup.sh index 04cfdb9e..ac0d2637 100755 --- a/core/tabs/applications-setup/Developer-tools/neovim-setup.sh +++ b/core/tabs/applications-setup/Developer-tools/neovim-setup.sh @@ -4,15 +4,6 @@ gitpath="$HOME/.local/share/neovim" -checkNeovimVer() { - # lazy.nvim requires nvim >= 0.8.0 - nvim_version=$(nvim --version | head -n 1 | awk '{print $2}') - if [ "$(printf "%s\n" "$nvim_version" "0.8.0" | sort -V | head -n 1)" != "0.8.0" ]; then - printf "%b\n" "${RED}Neovim version $nvim_version not supported.${RC}" - exit 1 - fi -} - cloneNeovim() { # Check if the dir exists before attempting to clone into it. if [ -d "$gitpath" ]; then @@ -30,7 +21,10 @@ installNeovim() { "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm neovim ripgrep fzf python-virtualenv luarocks go shellcheck git ;; apt-get|nala) - "$ESCALATION_TOOL" "$PACKAGER" install -y neovim ripgrep fd-find python3-venv luarocks golang-go shellcheck git + "$ESCALATION_TOOL" "$PACKAGER" install -y ripgrep fd-find python3-venv luarocks golang-go shellcheck git + curl -sSLo /tmp/nvim.appimage https://github.com/neovim/neovim/releases/latest/download/nvim.appimage + chmod u+x /tmp/nvim.appimage + "$ESCALATION_TOOL" mv /tmp/nvim.appimage /usr/local/bin/nvim ;; dnf|zypper) "$ESCALATION_TOOL" "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck git @@ -60,7 +54,6 @@ linkNeovimConfig() { checkEnv checkEscalationTool installNeovim -checkNeovimVer cloneNeovim backupNeovimConfig linkNeovimConfig diff --git a/core/tabs/applications-setup/Developer-tools/vscode-setup.sh b/core/tabs/applications-setup/Developer-tools/vscode-setup.sh index 539aac45..018616a6 100644 --- a/core/tabs/applications-setup/Developer-tools/vscode-setup.sh +++ b/core/tabs/applications-setup/Developer-tools/vscode-setup.sh @@ -21,7 +21,7 @@ installVsCode() { "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install code ;; pacman) - "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm code + "$AUR_HELPER" -S --needed --noconfirm visual-studio-code-bin ;; dnf) "$ESCALATION_TOOL" rpm --import https://packages.microsoft.com/keys/microsoft.asc @@ -40,4 +40,5 @@ installVsCode() { checkEnv checkEscalationTool +checkAURHelper installVsCode diff --git a/core/tabs/applications-setup/Developer-tools/vscodium-setup.sh b/core/tabs/applications-setup/Developer-tools/vscodium-setup.sh index 6e3ef18d..5b5615ca 100644 --- a/core/tabs/applications-setup/Developer-tools/vscodium-setup.sh +++ b/core/tabs/applications-setup/Developer-tools/vscodium-setup.sh @@ -17,7 +17,6 @@ installVsCodium() { printf "%b\n" "[gitlab.com_paulcarroty_vscodium_repo]\nname=gitlab.com_paulcarroty_vscodium_repo\nbaseurl=https://download.vscodium.com/rpms/\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg\nmetadata_expire=1h" | "$ESCALATION_TOOL" tee -a /etc/zypp/repos.d/vscodium.repo "$ESCALATION_TOOL" "$PACKAGER" refresh "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install codium - ;; pacman) "$AUR_HELPER" -S --noconfirm vscodium-bin diff --git a/core/tabs/applications-setup/browser-setup.sh b/core/tabs/applications-setup/browser-setup.sh deleted file mode 100755 index dcd58c0a..00000000 --- a/core/tabs/applications-setup/browser-setup.sh +++ /dev/null @@ -1,246 +0,0 @@ -#!/bin/sh -e - -. ../common-script.sh - -install_chrome() { - if ! command_exists google-chrome; then - printf "%b\n" "${YELLOW}Installing Google Chrome..${RC}." - case "$PACKAGER" in - apt-get|nala) - curl -O https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb - "$ESCALATION_TOOL" "$PACKAGER" install -y ./google-chrome-stable_current_amd64.deb - ;; - zypper) - "$ESCALATION_TOOL" "$PACKAGER" addrepo http://dl.google.com/linux/chrome/rpm/stable/x86_64 Google-Chrome - "$ESCALATION_TOOL" "$PACKAGER" refresh - "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install google-chrome-stable - ;; - pacman) - "$AUR_HELPER" -S --noconfirm google-chrome - ;; - dnf) - "$ESCALATION_TOOL" "$PACKAGER" install -y fedora-workstation-repositories - "$ESCALATION_TOOL" "$PACKAGER" config-manager --set-enabled google-chrome - "$ESCALATION_TOOL" "$PACKAGER" install -y google-chrome-stable - ;; - *) - printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" - ;; - esac - else - printf "%b\n" "${GREEN}Google Chrome Browser is already installed.${RC}" - fi -} - -install_thorium() { - if ! command_exists thorium-browser; then - printf "%b\n" "${YELLOW}Installing Thorium Browser...${RC}" - case "$PACKAGER" in - apt-get|nala) - "$ESCALATION_TOOL" rm -fv /etc/apt/sources.list.d/thorium.list - "$ESCALATION_TOOL" curl http://dl.thorium.rocks/debian/dists/stable/thorium.list -o /etc/apt/sources.list.d/thorium.list - "$ESCALATION_TOOL" "$PACKAGER" update - "$ESCALATION_TOOL" "$PACKAGER" install -y thorium-browser - ;; - zypper|dnf) - url=$(curl -s https://api.github.com/repos/Alex313031/Thorium/releases/latest | grep -oP '(?<=browser_download_url": ")[^"]*\.rpm') - echo "$url" && curl -L "$url" -o thorium-latest.rpm - "$ESCALATION_TOOL" "$PACKAGER" install -y thorium-latest.rpm && rm thorium-latest.rpm - ;; - pacman) - "$AUR_HELPER" -S --needed --noconfirm thorium-browser-bin - ;; - *) - printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" - ;; - esac - else - printf "%b\n" "${GREEN}Thorium Browser is already installed.${RC}" - fi -} - -install_firefox() { - if ! command_exists firefox; then - printf "%b\n" "${YELLOW}Installing Mozilla Firefox...${RC}" - case "$PACKAGER" in - apt-get|nala) - "$ESCALATION_TOOL" "$PACKAGER" install -y firefox-esr - ;; - zypper) - "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install MozillaFirefox - ;; - pacman) - "$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm firefox - ;; - dnf) - "$ESCALATION_TOOL" "$PACKAGER" install -y firefox - ;; - *) - printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" - exit 1 - ;; - esac - else - printf "%b\n" "${GREEN}Firefox Browser is already installed.${RC}" - fi -} - -install_librewolf() { - if ! command_exists librewolf; then - printf "%b\n" "${YELLOW}Installing Librewolf...${RC}" - case "$PACKAGER" in - apt-get|nala) - "$ESCALATION_TOOL" "$PACKAGER" install -y gnupg lsb-release apt-transport-https ca-certificates - distro=`if echo " una bookworm vanessa focal jammy bullseye vera uma " | grep -q " $(lsb_release -sc) "; then lsb_release -sc; else echo focal; fi` - curl -fsSL https://deb.librewolf.net/keyring.gpg | "$ESCALATION_TOOL" gpg --dearmor -o /usr/share/keyrings/librewolf.gpg - echo "Types: deb -URIs: https://deb.librewolf.net -Suites: $distro -Components: main -Architectures: amd64 -Signed-By: /usr/share/keyrings/librewolf.gpg" | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/librewolf.sources > /dev/null - "$ESCALATION_TOOL" "$PACKAGER" update - "$ESCALATION_TOOL" "$PACKAGER" install -y librewolf - ;; - dnf) - curl -fsSL https://rpm.librewolf.net/librewolf-repo.repo | pkexec tee /etc/yum.repos.d/librewolf.repo > /dev/null - "$ESCALATION_TOOL" "$PACKAGER" install -y librewolf - ;; - zypper) - "$ESCALATION_TOOL" rpm --import https://rpm.librewolf.net/pubkey.gpg - "$ESCALATION_TOOL" zypper ar -ef https://rpm.librewolf.net librewolf - "$ESCALATION_TOOL" zypper refresh - "$ESCALATION_TOOL" zypper --non-interactive install librewolf - ;; - pacman) - "$AUR_HELPER" -S --needed --noconfirm librewolf-bin - ;; - *) - printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" - exit 1 - ;; - esac - else - printf "%b\n" "${GREEN}LibreWolf Browser is already installed.${RC}" - fi -} - -install_brave() { - if ! command_exists brave; then - printf "%b\n" "${YELLOW}Installing Brave...${RC}" - case "$PACKAGER" in - apt-get|nala) - "$ESCALATION_TOOL" "$PACKAGER" install -y curl - "$ESCALATION_TOOL" curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg - echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main"| "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/brave-browser-release.list - "$ESCALATION_TOOL" "$PACKAGER" update - "$ESCALATION_TOOL" "$PACKAGER" install -y brave-browser - ;; - zypper) - "$ESCALATION_TOOL" "$PACKAGER" install -y curl - "$ESCALATION_TOOL" rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc - "$ESCALATION_TOOL" "$PACKAGER" addrepo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo - "$ESCALATION_TOOL" "$PACKAGER" refresh - "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install brave-browser - ;; - pacman) - "$AUR_HELPER" -S --noconfirm brave-bin - ;; - dnf) - "$ESCALATION_TOOL" "$PACKAGER" install -y dnf-plugins-core - "$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo - "$ESCALATION_TOOL" rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc - "$ESCALATION_TOOL" "$PACKAGER" install -y brave-browser - ;; - *) - printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" - exit 1 - ;; - esac - else - printf "%b\n" "${GREEN}Brave Browser is already installed.${RC}" - fi -} - -install_vivaldi() { - if ! command_exists vivaldi; then - printf "%b\n" "${YELLOW}Installing Vivaldi...${RC}" - curl -fsSL https://downloads.vivaldi.com/snapshot/install-vivaldi.sh | sh - if [ $? -eq 0 ]; then - printf "%b\n" "${GREEN}Vivaldi installed successfully!${RC}" - else - printf "%b\n" "${RED}Vivaldi installation failed!${RC}" - fi - else - printf "%b\n" "${GREEN}Vivaldi Browser is already installed.${RC}" - fi -} - -install_chromium() { - if ! command_exists chromium; then - printf "%b\n" "${YELLOW}Installing Chromium...${RC}" - case "$PACKAGER" in - pacman) - "$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm chromium - ;; - *) - "$ESCALATION_TOOL" "$PACKAGER" install -y chromium - ;; - esac - else - printf "%b\n" "${GREEN}Chromium Browser is already installed.${RC}" - fi -} - -install_lynx() { - if ! command_exists lynx; then - printf "%b\n" "${YELLOW}Installing Lynx...${RC}" - case "$PACKAGER" in - pacman) - "$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm lynx - ;; - *) - "$ESCALATION_TOOL" "$PACKAGER" install -y lynx - ;; - esac - else - printf "%b\n" "${GREEN}Lynx TUI Browser is already installed.${RC}" - fi -} - -browserSetup() { - clear - printf "%b\n" "Browser Installation Script" - printf "%b\n" "----------------------------" - printf "%b\n" "Select the browsers you want to install:" - printf "%b\n" "1. Google Chrome" - printf "%b\n" "2. Mozilla Firefox" - printf "%b\n" "3. Librewolf" - printf "%b\n" "4. Brave" - printf "%b\n" "5. Vivaldi" - printf "%b\n" "6. Chromium" - printf "%b\n" "7. Thorium" - printf "%b\n" "8. Lynx" - printf "%b\n" "----------------------------" - printf "%b" "Enter your choices (e.g. 1 3 5): " - read -r choice - for ch in $choice; do - case $ch in - 1) install_chrome ;; - 2) install_firefox ;; - 3) install_librewolf ;; - 4) install_brave ;; - 5) install_vivaldi ;; - 6) install_chromium ;; - 7) install_thorium ;; - 8) install_lynx;; - *) printf "%b\n" "${RED}Invalid option: $ch ${RC}" ;; - esac - done - printf "%b\n" "${GREEN}Installation complete!${RC}" -} - -checkEnv -checkEscalationTool -checkAURHelper -browserSetup diff --git a/core/tabs/applications-setup/browsers/brave.sh b/core/tabs/applications-setup/browsers/brave.sh new file mode 100644 index 00000000..8a7eab40 --- /dev/null +++ b/core/tabs/applications-setup/browsers/brave.sh @@ -0,0 +1,45 @@ +#!/bin/sh -e + +. ../../common-script.sh + +installBrave() { + if ! command_exists brave; then + printf "%b\n" "${YELLOW}Installing Brave...${RC}" + case "$PACKAGER" in + apt-get|nala) + "$ESCALATION_TOOL" "$PACKAGER" install -y curl + "$ESCALATION_TOOL" curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg + echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main" | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/brave-browser-release.list + "$ESCALATION_TOOL" "$PACKAGER" update + "$ESCALATION_TOOL" "$PACKAGER" install -y brave-browser + ;; + zypper) + "$ESCALATION_TOOL" "$PACKAGER" install -y curl + "$ESCALATION_TOOL" rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc + "$ESCALATION_TOOL" "$PACKAGER" addrepo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo + "$ESCALATION_TOOL" "$PACKAGER" refresh + "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install brave-browser + ;; + pacman) + "$AUR_HELPER" -S --needed --noconfirm brave-bin + ;; + dnf) + "$ESCALATION_TOOL" "$PACKAGER" install -y dnf-plugins-core + "$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo + "$ESCALATION_TOOL" rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc + "$ESCALATION_TOOL" "$PACKAGER" install -y brave-browser + ;; + *) + printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" + exit 1 + ;; + esac + else + printf "%b\n" "${GREEN}Brave Browser is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +checkAURHelper +installBrave \ No newline at end of file diff --git a/core/tabs/applications-setup/browsers/chromium.sh b/core/tabs/applications-setup/browsers/chromium.sh new file mode 100644 index 00000000..e929dbc9 --- /dev/null +++ b/core/tabs/applications-setup/browsers/chromium.sh @@ -0,0 +1,23 @@ +#!/bin/sh -e + +. ../../common-script.sh + +installChromium() { +if ! command_exists chromium; then + printf "%b\n" "${YELLOW}Installing Chromium...${RC}" + case "$PACKAGER" in + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm chromium + ;; + *) + "$ESCALATION_TOOL" "$PACKAGER" install -y chromium + ;; + esac +else + printf "%b\n" "${GREEN}Chromium Browser is already installed.${RC}" +fi +} + +checkEnv +checkEscalationTool +installChromium \ No newline at end of file diff --git a/core/tabs/applications-setup/browsers/firefox.sh b/core/tabs/applications-setup/browsers/firefox.sh new file mode 100644 index 00000000..67980858 --- /dev/null +++ b/core/tabs/applications-setup/browsers/firefox.sh @@ -0,0 +1,33 @@ +#!/bin/sh -e + +. ../../common-script.sh + +installFirefox() { + if ! command_exists firefox; then + printf "%b\n" "${YELLOW}Installing Mozilla Firefox...${RC}" + case "$PACKAGER" in + apt-get|nala) + "$ESCALATION_TOOL" "$PACKAGER" install -y firefox-esr + ;; + zypper) + "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install MozillaFirefox + ;; + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm firefox + ;; + dnf) + "$ESCALATION_TOOL" "$PACKAGER" install -y firefox + ;; + *) + printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" + exit 1 + ;; + esac + else + printf "%b\n" "${GREEN}Firefox Browser is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +installFirefox diff --git a/core/tabs/applications-setup/browsers/google-chrome.sh b/core/tabs/applications-setup/browsers/google-chrome.sh new file mode 100644 index 00000000..d66ec9a5 --- /dev/null +++ b/core/tabs/applications-setup/browsers/google-chrome.sh @@ -0,0 +1,39 @@ +#!/bin/sh -e + +. ../../common-script.sh + +installChrome() { + if ! command_exists google-chrome; then + printf "%b\n" "${YELLOW}Installing Google Chrome...${RC}" + case "$PACKAGER" in + apt-get|nala) + curl -O https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb + "$ESCALATION_TOOL" "$PACKAGER" install -y ./google-chrome-stable_current_amd64.deb + ;; + zypper) + "$ESCALATION_TOOL" "$PACKAGER" addrepo http://dl.google.com/linux/chrome/rpm/stable/x86_64 Google-Chrome + "$ESCALATION_TOOL" "$PACKAGER" refresh + "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install google-chrome-stable + ;; + pacman) + "$AUR_HELPER" -S --needed --noconfirm google-chrome + ;; + dnf) + "$ESCALATION_TOOL" "$PACKAGER" install -y fedora-workstation-repositories + "$ESCALATION_TOOL" "$PACKAGER" config-manager --set-enabled google-chrome + "$ESCALATION_TOOL" "$PACKAGER" install -y google-chrome-stable + ;; + *) + printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" + exit 1 + ;; + esac + else + printf "%b\n" "${GREEN}Google Chrome Browser is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +checkAURHelper +installChrome \ No newline at end of file diff --git a/core/tabs/applications-setup/browsers/librewolf.sh b/core/tabs/applications-setup/browsers/librewolf.sh new file mode 100644 index 00000000..a630b9c7 --- /dev/null +++ b/core/tabs/applications-setup/browsers/librewolf.sh @@ -0,0 +1,48 @@ +#!/bin/sh -e + +. ../../common-script.sh + +installLibreWolf() { + if ! command_exists librewolf; then + printf "%b\n" "${YELLOW}Installing Librewolf...${RC}" + case "$PACKAGER" in + apt-get|nala) + "$ESCALATION_TOOL" "$PACKAGER" install -y gnupg lsb-release apt-transport-https ca-certificates + distro=`if echo " una bookworm vanessa focal jammy bullseye vera uma " | grep -q " $(lsb_release -sc) "; then lsb_release -sc; else echo focal; fi` + curl -fsSL https://deb.librewolf.net/keyring.gpg | "$ESCALATION_TOOL" gpg --dearmor -o /usr/share/keyrings/librewolf.gpg + echo "Types: deb +URIs: https://deb.librewolf.net +Suites: $distro +Components: main +Architectures: amd64 +Signed-By: /usr/share/keyrings/librewolf.gpg" | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/librewolf.sources > /dev/null + "$ESCALATION_TOOL" "$PACKAGER" update + "$ESCALATION_TOOL" "$PACKAGER" install -y librewolf + ;; + dnf) + curl -fsSL https://rpm.librewolf.net/librewolf-repo.repo | pkexec tee /etc/yum.repos.d/librewolf.repo > /dev/null + "$ESCALATION_TOOL" "$PACKAGER" install -y librewolf + ;; + zypper) + "$ESCALATION_TOOL" rpm --import https://rpm.librewolf.net/pubkey.gpg + "$ESCALATION_TOOL" zypper ar -ef https://rpm.librewolf.net librewolf + "$ESCALATION_TOOL" zypper refresh + "$ESCALATION_TOOL" zypper --non-interactive install librewolf + ;; + pacman) + "$AUR_HELPER" -S --needed --noconfirm librewolf-bin + ;; + *) + printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" + exit 1 + ;; + esac + else + printf "%b\n" "${GREEN}LibreWolf Browser is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +checkAURHelper +installLibreWolf \ No newline at end of file diff --git a/core/tabs/applications-setup/browsers/lynx.sh b/core/tabs/applications-setup/browsers/lynx.sh new file mode 100644 index 00000000..002ff7e3 --- /dev/null +++ b/core/tabs/applications-setup/browsers/lynx.sh @@ -0,0 +1,23 @@ +#!/bin/sh -e + +. ../../common-script.sh + +installLynx() { + if ! command_exists lynx; then + printf "%b\n" "${YELLOW}Installing Lynx...${RC}" + case "$PACKAGER" in + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm lynx + ;; + *) + "$ESCALATION_TOOL" "$PACKAGER" install -y lynx + ;; + esac + else + printf "%b\n" "${GREEN}Lynx TUI Browser is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +installLynx \ No newline at end of file diff --git a/core/tabs/applications-setup/browsers/thorium.sh b/core/tabs/applications-setup/browsers/thorium.sh new file mode 100644 index 00000000..c45ebc80 --- /dev/null +++ b/core/tabs/applications-setup/browsers/thorium.sh @@ -0,0 +1,35 @@ +#!/bin/sh -e + +. ../../common-script.sh + +installThrorium() { + if ! command_exists thorium-browser; then + printf "%b\n" "${YELLOW}Installing Thorium Browser...${RC}" + case "$PACKAGER" in + apt-get|nala) + "$ESCALATION_TOOL" rm -fv /etc/apt/sources.list.d/thorium.list + "$ESCALATION_TOOL" curl http://dl.thorium.rocks/debian/dists/stable/thorium.list -o /etc/apt/sources.list.d/thorium.list + "$ESCALATION_TOOL" "$PACKAGER" update + "$ESCALATION_TOOL" "$PACKAGER" install -y thorium-browser + ;; + zypper|dnf) + url=$(curl -s https://api.github.com/repos/Alex313031/Thorium/releases/latest | grep -oP '(?<=browser_download_url": ")[^"]*\.rpm') + echo "$url" && curl -L "$url" -o thorium-latest.rpm + "$ESCALATION_TOOL" "$PACKAGER" install -y thorium-latest.rpm && rm thorium-latest.rpm + ;; + pacman) + "$AUR_HELPER" -S --needed --noconfirm thorium-browser-bin + ;; + *) + printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" + ;; + esac + else + printf "%b\n" "${GREEN}Thorium Browser is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +checkAURHelper +installThrorium \ No newline at end of file diff --git a/core/tabs/applications-setup/browsers/vivaldi.sh b/core/tabs/applications-setup/browsers/vivaldi.sh new file mode 100644 index 00000000..002ff7e3 --- /dev/null +++ b/core/tabs/applications-setup/browsers/vivaldi.sh @@ -0,0 +1,23 @@ +#!/bin/sh -e + +. ../../common-script.sh + +installLynx() { + if ! command_exists lynx; then + printf "%b\n" "${YELLOW}Installing Lynx...${RC}" + case "$PACKAGER" in + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm lynx + ;; + *) + "$ESCALATION_TOOL" "$PACKAGER" install -y lynx + ;; + esac + else + printf "%b\n" "${GREEN}Lynx TUI Browser is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +installLynx \ No newline at end of file diff --git a/core/tabs/applications-setup/communication-apps/slack-setup.sh b/core/tabs/applications-setup/communication-apps/slack-setup.sh index 5ecdd27f..e4bf3719 100644 --- a/core/tabs/applications-setup/communication-apps/slack-setup.sh +++ b/core/tabs/applications-setup/communication-apps/slack-setup.sh @@ -10,7 +10,7 @@ installSlack() { "$AUR_HELPER" -S --needed --noconfirm slack-desktop ;; *) - . ./setup-flatpak.sh + . ../setup-flatpak.sh flatpak install -y flathub com.slack.Slack ;; esac diff --git a/core/tabs/applications-setup/communication-apps/zoom-setup.sh b/core/tabs/applications-setup/communication-apps/zoom-setup.sh index 4b50013a..acd5b180 100644 --- a/core/tabs/applications-setup/communication-apps/zoom-setup.sh +++ b/core/tabs/applications-setup/communication-apps/zoom-setup.sh @@ -10,7 +10,7 @@ installZoom() { "$AUR_HELPER" -S --needed --noconfirm zoom ;; *) - . ./setup-flatpak.sh + . ../setup-flatpak.sh flatpak install -y flathub us.zoom.Zoom ;; esac diff --git a/core/tabs/applications-setup/dwmtitus-setup.sh b/core/tabs/applications-setup/dwmtitus-setup.sh index 40f66d53..01ec0ef1 100755 --- a/core/tabs/applications-setup/dwmtitus-setup.sh +++ b/core/tabs/applications-setup/dwmtitus-setup.sh @@ -6,14 +6,14 @@ setupDWM() { printf "%b\n" "${YELLOW}Installing DWM-Titus...${RC}" case "$PACKAGER" in # Install pre-Requisites pacman) - "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm base-devel libx11 libxinerama libxft imlib2 libxcb git unzip flameshot lxappearance feh + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm base-devel libx11 libxinerama libxft imlib2 libxcb git unzip flameshot lxappearance feh mate-polkit ;; apt-get|nala) - "$ESCALATION_TOOL" "$PACKAGER" install -y build-essential libx11-dev libxinerama-dev libxft-dev libimlib2-dev libx11-xcb-dev libfontconfig1 libx11-6 libxft2 libxinerama1 libxcb-res0-dev git unzip flameshot lxappearance feh + "$ESCALATION_TOOL" "$PACKAGER" install -y build-essential libx11-dev libxinerama-dev libxft-dev libimlib2-dev libx11-xcb-dev libfontconfig1 libx11-6 libxft2 libxinerama1 libxcb-res0-dev git unzip flameshot lxappearance feh mate-polkit ;; dnf) "$ESCALATION_TOOL" "$PACKAGER" groupinstall -y "Development Tools" - "$ESCALATION_TOOL" "$PACKAGER" install -y libX11-devel libXinerama-devel libXft-devel imlib2-devel libxcb-devel unzip flameshot lxappearance feh # no need to include git here as it should be already installed via "Development Tools" + "$ESCALATION_TOOL" "$PACKAGER" install -y libX11-devel libXinerama-devel libXft-devel imlib2-devel libxcb-devel unzip flameshot lxappearance feh mate-polkit # no need to include git here as it should be already installed via "Development Tools" ;; *) printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" @@ -66,6 +66,10 @@ install_nerd_font() { # Unzip the font file if it hasn't been unzipped yet if [ ! -d "$FONT_DIR/Meslo" ]; then + mkdir -p "$FONT_DIR/Meslo" || { + printf "%b\n" "${RED}Failed to create directory: $FONT_DIR/Meslo${RC}" + return 1 + } unzip "$FONT_ZIP" -d "$FONT_DIR" || { printf "%b\n" "${RED}Failed to unzip $FONT_ZIP${RC}" return 1 @@ -203,8 +207,14 @@ setupDisplayManager() { done printf "%b\n" "${GREEN}Current display manager: $currentdm${RC}" if [ "$currentdm" = "none" ]; then - DM="sddm" - printf "%b\n" "${YELLOW}No display manager found, installing $DM${RC}" + printf "%b\n" "${YELLOW}--------------------------${RC}" + printf "%b\n" "${YELLOW}Pick your Display Manager ${RC}" + printf "%b\n" "${YELLOW}1. SDDM ${RC}" + printf "%b\n" "${YELLOW}2. LightDM ${RC}" + printf "%b\n" "${YELLOW}3. GDM ${RC}" + printf "%b\n" "${YELLOW} ${RC}" + printf "%b" "${YELLOW}Please select one: ${RC}" + read -r DM case "$PACKAGER" in pacman) "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm "$DM" @@ -222,47 +232,7 @@ setupDisplayManager() { esac printf "%b\n" "${GREEN}$DM installed successfully${RC}" systemctl enable "$DM" - - # Prompt user for auto-login - # Using printf instead of echo -n as It's more posix-compliant. - printf "Do you want to enable auto-login? (Y/n) " - read -r answer - case "$answer" in - [Yy]*) - printf "%b\n" "${YELLOW}Configuring SDDM for autologin${RC}" - SDDM_CONF="/etc/sddm.conf" - if [ ! -f "$SDDM_CONF" ]; then - echo "[Autologin]" | "$ESCALATION_TOOL" tee -a "$SDDM_CONF" - echo "User=$USER" | "$ESCALATION_TOOL" tee -a "$SDDM_CONF" - echo "Session=dwm" | "$ESCALATION_TOOL" tee -a "$SDDM_CONF" - else - "$ESCALATION_TOOL" sed -i '/^\[Autologin\]/d' "$SDDM_CONF" - "$ESCALATION_TOOL" sed -i '/^User=/d' "$SDDM_CONF" - "$ESCALATION_TOOL" sed -i '/^Session=/d' "$SDDM_CONF" - echo "[Autologin]" | "$ESCALATION_TOOL" tee -a "$SDDM_CONF" - echo "User=$USER" | "$ESCALATION_TOOL" tee -a "$SDDM_CONF" - echo "Session=dwm" | "$ESCALATION_TOOL" tee -a "$SDDM_CONF" - fi - printf "%b\n" "{YELLOW}Checking if autologin group exists${RC}" - if ! getent group autologin > /dev/null; then - printf "%b\n" "${YELLOW}Creating autologin group${RC}" - "$ESCALATION_TOOL" groupadd autologin - else - printf "%b\n" "${GREEN}Autologin group already exists${RC}" - fi - printf "%b\n" "${YELLOW}Adding user with UID 1000 to autologin group${RC}" - USER_UID_1000=$(getent passwd 1000 | cut -d: -f1) - if [ -n "$USER_UID_1000" ]; then - "$ESCALATION_TOOL" usermod -aG autologin "$USER_UID_1000" - printf "%b\n" "${GREEN}User $USER_UID_1000 added to autologin group${RC}" - else - printf "%b\n" "${RED}No user with UID 1000 found - Auto login not possible${RC}" - fi - ;; - *) - printf "%b\n" "${GREEN}Auto-login configuration skipped${RC}" - ;; - esac + fi } @@ -291,5 +261,6 @@ setupDWM makeDWM install_slstatus install_nerd_font +picom_animations clone_config_folders configure_backgrounds diff --git a/core/tabs/applications-setup/linutil-installer.sh b/core/tabs/applications-setup/linutil-installer.sh index 63f9f836..4bb241db 100755 --- a/core/tabs/applications-setup/linutil-installer.sh +++ b/core/tabs/applications-setup/linutil-installer.sh @@ -15,9 +15,9 @@ installLinutil() { printf "%b" "Enter your choice: " read -r choice case $choice in - 1) "$AUR_HELPER" -S --noconfirm linutil ;; - 2) "$AUR_HELPER" -S --noconfirm linutil-bin ;; - 3) "$AUR_HELPER" -S --noconfirm linutil-git ;; + 1) "$AUR_HELPER" -S --needed --noconfirm linutil ;; + 2) "$AUR_HELPER" -S --needed --noconfirm linutil-bin ;; + 3) "$AUR_HELPER" -S --needed --noconfirm linutil-git ;; *) printf "%b\n" "${RED}Invalid choice:${RC} $choice" exit 1 @@ -37,13 +37,17 @@ installLinutil() { pacman) "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm rustup ;; + dnf) + "$ESCALATION_TOOL" "$PACKAGER" install -y rustup + ;; zypper) "$ESCALATION_TOOL" "$PACKAGER" install -n curl gcc make - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y . $HOME/.cargo/env ;; *) - "$ESCALATION_TOOL" "$PACKAGER" install -y rustup + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + . $HOME/.cargo/env ;; esac fi @@ -59,4 +63,4 @@ installLinutil() { checkEnv checkEscalationTool checkAURHelper -installLinutil \ No newline at end of file +installLinutil diff --git a/core/tabs/applications-setup/office-suite-setup.sh b/core/tabs/applications-setup/office-suite-setup.sh deleted file mode 100644 index 61a08ebd..00000000 --- a/core/tabs/applications-setup/office-suite-setup.sh +++ /dev/null @@ -1,203 +0,0 @@ -#!/bin/sh -e - -. ../common-script.sh - -install_onlyoffice() { - if ! command_exists onlyoffice-desktopeditors; then - printf "%b\n" "${YELLOW}Installing Only Office..${RC}." - case "$PACKAGER" in - apt-get|nala) - curl -O https://download.onlyoffice.com/install/desktop/editors/linux/onlyoffice-desktopeditors_amd64.deb - "$ESCALATION_TOOL" "$PACKAGER" install -y ./onlyoffice-desktopeditors_amd64.deb - ;; - zypper|dnf) - . ./setup-flatpak.sh - flatpak install -y flathub org.onlyoffice.desktopeditors - ;; - pacman) - "$AUR_HELPER" -S --needed --noconfirm onlyoffice - ;; - *) - printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" - exit 1 - ;; - esac - else - printf "%b\n" "${GREEN}Only Office is already installed.${RC}" - fi -} - -install_libreoffice() { - if ! command_exists libreoffice; then - printf "%b\n" "${YELLOW}Installing Libre Office...${RC}" - case "$PACKAGER" in - apt-get|nala) - "$ESCALATION_TOOL" "$PACKAGER" install -y libreoffice-core - ;; - zypper|dnf) - . ./setup-flatpak.sh - flatpak install -y flathub org.libreoffice.LibreOffice - ;; - pacman) - "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm libreoffice-fresh - ;; - *) - printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" - exit 1 - ;; - esac - else - printf "%b\n" "${GREEN}Libre Office is already installed.${RC}" - fi -} - -install_wpsoffice() { - if ! command_exists com.wps.Office; then - printf "%b\n" "${YELLOW}Installing WPS Office...${RC}" - case "$PACKAGER" in - pacman) - "$AUR_HELPER" -S --noconfirm wps-office - ;; - *) - . ./setup-flatpak.sh - flatpak install flathub com.wps.Office - ;; - esac - else - printf "%b\n" "${GREEN}WPS Office is already installed.${RC}" - fi -} - -# needs to be updated every year for latest version -install_freeoffice() { - if ! command_exists softmaker-freeoffice-2024 freeoffice softmaker; then - printf "%b\n" "${YELLOW}Installing Free Office...${RC}" - case "$PACKAGER" in - apt-get|nala) - curl -O https://www.softmaker.net/down/softmaker-freeoffice-2024_1218-01_amd64.deb - "$ESCALATION_TOOL" "$PACKAGER" install -y ./softmaker-freeoffice-2024_1218-01_amd64.deb - ;; - zypper) - "$ESCALATION_TOOL" "$PACKAGER" addrepo -f https://shop.softmaker.com/repo/rpm SoftMaker - "$ESCALATION_TOOL" "$PACKAGER" --gpg-auto-import-keys refresh - "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install softmaker-freeoffice-2024 - ;; - pacman) - "$AUR_HELPER" -S --noconfirm freeoffice - ;; - dnf) - "$ESCALATION_TOOL" curl -O -qO /etc/yum.repos.d/softmaker.repo https://shop.softmaker.com/repo/softmaker.repo - "$ESCALATION_TOOL" "$PACKAGER" install -y softmaker-freeoffice-2024 - ;; - *) - printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" - exit 1 - ;; - esac - else - printf "%b\n" "${GREEN}Free Office is already installed.${RC}" - fi -} - -install_evince() { - if ! command_exists evince; then - printf "%b\n" "${YELLOW}Installing Evince...${RC}" - case "$PACKAGER" in - pacman) - "$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm evince - ;; - *) - "$ESCALATION_TOOL" "$PACKAGER" install -y evince - ;; - esac - else - printf "%b\n" "${GREEN}Evince is already installed.${RC}" - fi -} - -install_okular() { - if ! command_exists okular; then - printf "%b\n" "${YELLOW}Installing Okular...${RC}" - case "$PACKAGER" in - pacman) - "$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm okular - ;; - *) - "$ESCALATION_TOOL" "$PACKAGER" install -y okular - ;; - esac - else - printf "%b\n" "${GREEN}Okular is already installed.${RC}" - fi -} - -install_pdfstudioviewer() { - if ! command_exists pdfstudioviewer2024/pdfstudioviewer2024; then - printf "%b\n" "${YELLOW}Installing PDF Studio Viewer...${RC}" - curl -O https://download.qoppa.com/pdfstudioviewer/PDFStudioViewer_linux64.sh - "$ESCALATION_TOOL" chmod +x PDFStudioViewer_linux64.sh - if sh PDFStudioViewer_linux64.sh; then - printf "%b\n" "${GREEN}PDF Studio Viewer installed successfully!${RC}" - else - printf "%b\n" "${RED}Installation failed!${RC}" - fi - rm PDFStudioViewer_linux64.sh - else - printf "%b\n" "${GREEN}PDF Studio Viewer is already installed.${RC}" - fi -} - -install_pdfstudio() { - if ! command_exists pdfstudio2024/pdfstudio2024; then - printf "%b\n" "${YELLOW}Installing PDF Studio...${RC}" - curl -O https://download.qoppa.com/pdfstudio/PDFStudio_linux64.sh - "$ESCALATION_TOOL" chmod +x PDFStudio_linux64.sh - if sh PDFStudio_linux64.sh; then - printf "%b\n" "${GREEN}PDF Studio installed successfully!${RC}" - else - printf "%b\n" "${RED}PDF Studio installation failed!${RC}" - fi - rm PDFStudio_linux64.sh - else - printf "%b\n" "${GREEN}PDF Studio is already installed.${RC}" - fi -} - -officeSuiteSetup() { - clear - printf "%b\n" "Office Suite Setup Script" - printf "%b\n" "----------------------------" - printf "%b\n" "Select the suite you want to install:" - printf "%b\n" "1. OnlyOffice" - printf "%b\n" "2. LibreOffice" - printf "%b\n" "3. WPS Office" - printf "%b\n" "4. Free Office" - printf "%b\n" "Select the PDF Suite you want to install:" - printf "%b\n" "----------------------------" - printf "%b\n" "5. Evince" - printf "%b\n" "6. Okular" - printf "%b\n" "7. PDF Studio Viewer" - printf "%b\n" "8. PDF Studio (Paid Software)" - printf "%b\n" "----------------------------" - printf "%b" "Enter your choices (e.g., 1 3 5): " - read -r choice - for ch in $choice; do - case $ch in - 1) install_onlyoffice ;; - 2) install_libreoffice ;; - 3) install_wpsoffice ;; - 4) install_freeoffice ;; - 5) install_evince ;; - 6) install_okular ;; - 7) install_pdfstudioviewer ;; - 8) install_pdfstudio ;; - *) printf "%b\n" "${RED}Invalid option: $ch ${RC}" ;; - esac - done - printf "%b\n" "${GREEN}Installation complete!${RC}" -} - -checkEnv -checkEscalationTool -checkAURHelper -officeSuiteSetup diff --git a/core/tabs/applications-setup/office-suites/freeoffice.sh b/core/tabs/applications-setup/office-suites/freeoffice.sh new file mode 100644 index 00000000..7effa3fb --- /dev/null +++ b/core/tabs/applications-setup/office-suites/freeoffice.sh @@ -0,0 +1,38 @@ +#!/bin/sh -e + +. ../common-script.sh + +installFreeOffice() { + if ! command_exists softmaker-freeoffice-2024 freeoffice softmaker; then + printf "%b\n" "${YELLOW}Installing Free Office...${RC}" + case "$PACKAGER" in + apt-get|nala) + curl -O https://www.softmaker.net/down/softmaker-freeoffice-2024_1218-01_amd64.deb + "$ESCALATION_TOOL" "$PACKAGER" install -y ./softmaker-freeoffice-2024_1218-01_amd64.deb + ;; + zypper) + "$ESCALATION_TOOL" "$PACKAGER" addrepo -f https://shop.softmaker.com/repo/rpm SoftMaker + "$ESCALATION_TOOL" "$PACKAGER" --gpg-auto-import-keys refresh + "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install softmaker-freeoffice-2024 + ;; + pacman) + "$AUR_HELPER" -S --needed --noconfirm freeoffice + ;; + dnf) + "$ESCALATION_TOOL" curl -O -qO /etc/yum.repos.d/softmaker.repo https://shop.softmaker.com/repo/softmaker.repo + "$ESCALATION_TOOL" "$PACKAGER" install -y softmaker-freeoffice-2024 + ;; + *) + printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" + exit 1 + ;; + esac + else + printf "%b\n" "${GREEN}Free Office is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +checkAurHelper +installFreeOffice \ No newline at end of file diff --git a/core/tabs/applications-setup/office-suites/libreoffice.sh b/core/tabs/applications-setup/office-suites/libreoffice.sh new file mode 100644 index 00000000..a9850fdc --- /dev/null +++ b/core/tabs/applications-setup/office-suites/libreoffice.sh @@ -0,0 +1,31 @@ +#!/bin/sh -e + +. ../common-script.sh + +installLibreOffice() { + if ! command_exists libreoffice; then + printf "%b\n" "${YELLOW}Installing Libre Office...${RC}" + case "$PACKAGER" in + apt-get|nala) + "$ESCALATION_TOOL" "$PACKAGER" install -y libreoffice-core + ;; + zypper|dnf) + . ./setup-flatpak.sh + flatpak install -y flathub org.libreoffice.LibreOffice + ;; + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm libreoffice-fresh + ;; + *) + printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" + exit 1 + ;; + esac + else + printf "%b\n" "${GREEN}Libre Office is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +installLibreOffice \ No newline at end of file diff --git a/core/tabs/applications-setup/office-suites/onlyoffice.sh b/core/tabs/applications-setup/office-suites/onlyoffice.sh new file mode 100644 index 00000000..aaea7547 --- /dev/null +++ b/core/tabs/applications-setup/office-suites/onlyoffice.sh @@ -0,0 +1,33 @@ +#!/bin/sh -e + +. ../common-script.sh + +installOnlyOffice() { + if ! command_exists onlyoffice-desktopeditors; then + printf "%b\n" "${YELLOW}Installing Only Office..${RC}." + case "$PACKAGER" in + apt-get|nala) + curl -O https://download.onlyoffice.com/install/desktop/editors/linux/onlyoffice-desktopeditors_amd64.deb + "$ESCALATION_TOOL" "$PACKAGER" install -y ./onlyoffice-desktopeditors_amd64.deb + ;; + zypper|dnf) + . ./setup-flatpak.sh + flatpak install -y flathub org.onlyoffice.desktopeditors + ;; + pacman) + "$AUR_HELPER" -S --needed --noconfirm onlyoffice + ;; + *) + printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" + exit 1 + ;; + esac + else + printf "%b\n" "${GREEN}Only Office is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +checkAurHelper +installOnlyOffice \ No newline at end of file diff --git a/core/tabs/applications-setup/office-suites/wpsoffice.sh b/core/tabs/applications-setup/office-suites/wpsoffice.sh new file mode 100644 index 00000000..ce1bbc72 --- /dev/null +++ b/core/tabs/applications-setup/office-suites/wpsoffice.sh @@ -0,0 +1,25 @@ +#!/bin/sh -e + +. ../common-script.sh + +installWpsOffice() { + if ! command_exists com.wps.Office; then + printf "%b\n" "${YELLOW}Installing WPS Office...${RC}" + case "$PACKAGER" in + pacman) + "$AUR_HELPER" -S --needed --noconfirm wps-office + ;; + *) + . ./setup-flatpak.sh + flatpak install flathub com.wps.Office + ;; + esac + else + printf "%b\n" "${GREEN}WPS Office is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +checkAurHelper +installWpsOffice \ No newline at end of file diff --git a/core/tabs/applications-setup/pdf-suites/evince.sh b/core/tabs/applications-setup/pdf-suites/evince.sh new file mode 100644 index 00000000..9e0d8da0 --- /dev/null +++ b/core/tabs/applications-setup/pdf-suites/evince.sh @@ -0,0 +1,23 @@ +#!/bin/sh -e + +. ../common-script.sh + +installEvince() { + if ! command_exists evince; then + printf "%b\n" "${YELLOW}Installing Evince...${RC}" + case "$PACKAGER" in + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm evince + ;; + *) + "$ESCALATION_TOOL" "$PACKAGER" install -y evince + ;; + esac + else + printf "%b\n" "${GREEN}Evince is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +installEvince \ No newline at end of file diff --git a/core/tabs/applications-setup/pdf-suites/okular.sh b/core/tabs/applications-setup/pdf-suites/okular.sh new file mode 100644 index 00000000..6ed8d4d1 --- /dev/null +++ b/core/tabs/applications-setup/pdf-suites/okular.sh @@ -0,0 +1,23 @@ +#!/bin/sh -e + +. ../common-script.sh + +installOkular() { + if ! command_exists okular; then + printf "%b\n" "${YELLOW}Installing Okular...${RC}" + case "$PACKAGER" in + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm okular + ;; + *) + "$ESCALATION_TOOL" "$PACKAGER" install -y okular + ;; + esac + else + printf "%b\n" "${GREEN}Okular is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +installOkular \ No newline at end of file diff --git a/core/tabs/applications-setup/pdf-suites/pdfstudio.sh b/core/tabs/applications-setup/pdf-suites/pdfstudio.sh new file mode 100644 index 00000000..03ba05f4 --- /dev/null +++ b/core/tabs/applications-setup/pdf-suites/pdfstudio.sh @@ -0,0 +1,23 @@ +#!/bin/sh -e + +. ../common-script.sh + +installPdfstudio() { + if ! command_exists pdfstudio2024; then + printf "%b\n" "${YELLOW}Installing PDF Studio...${RC}" + curl -O https://download.qoppa.com/pdfstudio/PDFStudio_linux64.sh + "$ESCALATION_TOOL" chmod +x PDFStudio_linux64.sh + if sh PDFStudio_linux64.sh; then + printf "%b\n" "${GREEN}PDF Studio installed successfully!${RC}" + else + printf "%b\n" "${RED}PDF Studio installation failed!${RC}" + fi + rm PDFStudio_linux64.sh + else + printf "%b\n" "${GREEN}PDF Studio is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +installPdfstudio diff --git a/core/tabs/applications-setup/pdf-suites/pdfstudioviewer.sh b/core/tabs/applications-setup/pdf-suites/pdfstudioviewer.sh new file mode 100644 index 00000000..72013a11 --- /dev/null +++ b/core/tabs/applications-setup/pdf-suites/pdfstudioviewer.sh @@ -0,0 +1,23 @@ +#!/bin/sh -e + +. ../common-script.sh + +installPdfstudioviewer() { + if ! command_exists pdfstudioviewer2024; then + printf "%b\n" "${YELLOW}Installing PDF Studio Viewer...${RC}" + curl -O https://download.qoppa.com/pdfstudioviewer/PDFStudioViewer_linux64.sh + "$ESCALATION_TOOL" chmod +x PDFStudioViewer_linux64.sh + if sh PDFStudioViewer_linux64.sh; then + printf "%b\n" "${GREEN}PDF Studio Viewer installed successfully!${RC}" + else + printf "%b\n" "${RED}Installation failed!${RC}" + fi + rm PDFStudioViewer_linux64.sh + else + printf "%b\n" "${GREEN}PDF Studio Viewer is already installed.${RC}" + fi +} + +checkEnv +checkEscalationTool +installPdfstudioviewer diff --git a/core/tabs/applications-setup/tab_data.toml b/core/tabs/applications-setup/tab_data.toml index f5ed12e5..ef6af7de 100644 --- a/core/tabs/applications-setup/tab_data.toml +++ b/core/tabs/applications-setup/tab_data.toml @@ -37,7 +37,7 @@ task_list = "I" name = "Meld" description = "Meld is a visual diff and merge tool that helps compare files, directories, and version-controlled projects." script = "Developer-tools/meld-setup.sh" -task_list = "I" +task_list = "I FI" [[data.entries]] name = "Ngrok" @@ -90,6 +90,102 @@ description = "Thunderbird is a free, open-source email client that offers power script = "communication-apps/thunderbird-setup.sh" task_list = "I" +[[data]] +name = "Office Suites" + +[[data.entries]] +name = "LibreOffice" +script = "office-suites/libreoffice.sh" +task_list = "I" + +[[data.entries]] +name = "OnlyOffice" +script = "office-suites/onlyoffice.sh" +task_list = "I" + +[[data.entries]] +name = "FreeOffice" +script = "office-suites/freeoffice.sh" +task_list = "I" + +[[data.entries]] +name = "WPS Office" +script = "office-suites/wpsoffice.sh" +task_list = "I" + +[[data]] +name = "PDF Suites" + +[[data.entries]] +name = "Evince" +script = "pdf-suites/evince.sh" +task_list = "I" + +[[data.entries]] +name = "Okular" +script = "pdf-suites/okular.sh" +task_list = "I" + +[[data.entries]] +name = "PDF Studio" +script = "pdf-suites/pdfstudio.sh" +task_list = "I" + +[[data.entries]] +name = "PDF Studio Viewer" +script = "pdf-suites/pdfstudioviewer.sh" + +[[data]] +name = "Web Browsers" + +[[data.entries]] +name = "Brave" +description = "Brave is a free and open-source web browser developed by Brave Software, Inc. based on the Chromium web browser." +script = "browsers/brave.sh" +task_list = "I" + +[[data.entries]] +name = "Chromium" +description = "Chromium is an open-source web browser project started by Google, to provide the source code for the proprietary Google Chrome browser." +script = "browsers/chromium.sh" +task_list = "I" + +[[data.entries]] +name = "Google Chrome" +description = "Google Chrome is a fast, secure, and free web browser, built for the modern web." +script = "browsers/google-chrome.sh" +task_list = "I" + +[[data.entries]] +name = "LibreWolf" +description = "LibreWolf is a fork of Firefox, focused on privacy, security, and freedom." +script = "browsers/librewolf.sh" +task_list = "I" + +[[data.entries]] +name = "Lynx" +description = "Lynx is a highly configurable text-based web browser for use on cursor-addressable character cell terminals." +script = "browsers/lynx.sh" +task_list = "I" + +[[data.entries]] +name = "Mozilla Firefox" +description = "Mozilla Firefox is a free and open-source web browser developed by the Mozilla Foundation." +script = "browsers/firefox.sh" +task_list = "I" + +[[data.entries]] +name = "Thorium" +description = "Thorium is a Chromium-based browser focused on privacy and performance." +script = "browsers/thorium.sh" +task_list = "I" + +[[data.entries]] +name = "Vivaldi" +description = "Vivaldi is a freeware, cross-platform web browser developed by Vivaldi Technologies." +script = "browsers/vivaldi.sh" +task_list = "I" + [[data]] name = "Alacritty" description = "Alacritty is a modern terminal emulator that comes with sensible defaults, but allows for extensive configuration. By integrating with other applications, rather than reimplementing their functionality, it manages to provide a flexible set of features with high performance. The supported platforms currently consist of BSD, Linux, macOS and Windows.\nThis command installs and condifures alacritty terminal emulator." @@ -110,15 +206,10 @@ task_list = "I FM" [[data]] name = "Bottles" +description = "Bottles allows Windows software, like applications and games, to run on Linux.\nBottles also provides tools to categorize, organize and optimize your applications." script = "bottles-setup.sh" task_list = "FI" -[[data]] -name = "Web Browsers" -description = "An interactive script to install popular browsers." -script = "browser-setup.sh" -task_list = "I" - [[data]] name = "DWM-Titus" description = "DWM is a dynamic window manager for X.\nIt manages windows in tiled, monocle and floating layouts.\nAll of the layouts can be applied dynamically, optimising the environment for the application in use and the task performed.\nThis command installs and configures DWM and a desktop manager.\nThe list of patches applied can be found in CTT's DWM repository\nhttps://github.com/ChrisTitusTech/dwm-titus" @@ -127,6 +218,7 @@ task_list = "I PFM SS" [[data]] name = "Docker" +description = "Docker is an open platform that uses OS-level virtualization to deliver software in packages called containers." script = "docker-setup.sh" task_list = "I SS" @@ -144,6 +236,7 @@ task_list = "I" [[data]] name = "Grub Theme" +description = "Installs ChrisTitusTech's Top 5 Bootloader Themes script to allow for easy customization of GRUB." script = "grub-theme.sh" task_list = "PFM" @@ -175,12 +268,6 @@ matches = true data = "command_exists" values = [ "linutil" ] -[[data]] -name = "Office Suite" -description = "An office suite installer is a software package that installs productivity tools such as word processing, spreadsheets, presentations, and pdf viewers for business and personal use." -script = "office-suite-setup.sh" -task_list = "I" - [[data]] name = "Rofi" description = "Rofi is a window switcher, run dialog, ssh-launcher and dmenu replacement that started as a clone of simpleswitcher, written by Sean Pringle and later expanded by Dave Davenport.\nThis command installs and configures rofi with configuration from CTT's DWM repo.\nhttps://github.com/ChrisTitusTech/dwm-titus" diff --git a/core/tabs/common-script.sh b/core/tabs/common-script.sh index 25c5a71f..12ab1146 100644 --- a/core/tabs/common-script.sh +++ b/core/tabs/common-script.sh @@ -27,7 +27,7 @@ checkAURHelper() { done printf "%b\n" "${YELLOW}Installing yay as AUR helper...${RC}" - "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm base-devel + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm base-devel git cd /opt && "$ESCALATION_TOOL" git clone https://aur.archlinux.org/yay-bin.git && "$ESCALATION_TOOL" chown -R "$USER":"$USER" ./yay-bin cd yay-bin && makepkg --noconfirm -si @@ -125,11 +125,11 @@ checkDistro() { } checkEnv() { - checkCommandRequirements 'curl groups sudo' + checkEscalationTool + checkCommandRequirements "curl groups $ESCALATION_TOOL" checkPackageManager 'nala apt-get dnf pacman zypper' checkCurrentDirectoryWritable checkSuperUser checkDistro - checkEscalationTool checkAURHelper } diff --git a/core/tabs/system-setup/arch/paru-setup.sh b/core/tabs/system-setup/arch/paru-setup.sh index 54cc695a..fba445ef 100755 --- a/core/tabs/system-setup/arch/paru-setup.sh +++ b/core/tabs/system-setup/arch/paru-setup.sh @@ -7,7 +7,7 @@ installDepend() { pacman) if ! command_exists paru; then printf "%b\n" "${YELLOW}Installing paru as AUR helper...${RC}" - "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm base-devel + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm base-devel git cd /opt && "$ESCALATION_TOOL" git clone https://aur.archlinux.org/paru.git && "$ESCALATION_TOOL" chown -R "$USER": ./paru cd paru && makepkg --noconfirm -si printf "%b\n" "${GREEN}Paru installed${RC}" diff --git a/core/tabs/system-setup/arch/yay-setup.sh b/core/tabs/system-setup/arch/yay-setup.sh index 77b68429..fd80f1f2 100755 --- a/core/tabs/system-setup/arch/yay-setup.sh +++ b/core/tabs/system-setup/arch/yay-setup.sh @@ -7,7 +7,7 @@ installDepend() { pacman) if ! command_exists yay; then printf "%b\n" "${YELLOW}Installing yay as AUR helper...${RC}" - "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm base-devel + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm base-devel git cd /opt && "$ESCALATION_TOOL" git clone https://aur.archlinux.org/yay-bin.git && "$ESCALATION_TOOL" chown -R "$USER": ./yay-bin cd yay-bin && makepkg --noconfirm -si printf "%b\n" "${GREEN}Yay installed${RC}" diff --git a/core/tabs/system-setup/gaming-setup.sh b/core/tabs/system-setup/gaming-setup.sh index 0e2782b8..86ad21aa 100755 --- a/core/tabs/system-setup/gaming-setup.sh +++ b/core/tabs/system-setup/gaming-setup.sh @@ -9,7 +9,7 @@ installDepend() { case "$PACKAGER" in pacman) #Check for multilib - if ! grep -q "^\s*$$multilib$$" /etc/pacman.conf; then + if ! grep -q "^\s*\[multilib\]" /etc/pacman.conf; then echo "[multilib]" | "$ESCALATION_TOOL" tee -a /etc/pacman.conf echo "Include = /etc/pacman.d/mirrorlist" | "$ESCALATION_TOOL" tee -a /etc/pacman.conf "$ESCALATION_TOOL" "$PACKAGER" -Syu @@ -36,9 +36,15 @@ installDepend() { "$ESCALATION_TOOL" "$PACKAGER" install -y "$DEPENDENCIES" "$DISTRO_DEPS" ;; dnf) - "$ESCALATION_TOOL" "$PACKAGER" install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm -y - "$ESCALATION_TOOL" "$PACKAGER" config-manager --enable fedora-cisco-openh264 -y - "$ESCALATION_TOOL" "$PACKAGER" install -y "$DEPENDENCIES" + if [ "$(rpm -E %fedora)" -le 41 ]; then + "$ESCALATION_TOOL" "$PACKAGER" install ffmpeg ffmpeg-libs -y + "$ESCALATION_TOOL" "$PACKAGER" install -y "$DEPENDENCIES" + else + printf "%b\n" "${CYAN}Fedora < 41 detected. Installing rpmfusion repos.${RC}" + "$ESCALATION_TOOL" "$PACKAGER" install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-"$(rpm -E %fedora)".noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-"$(rpm -E %fedora)".noarch.rpm -y + "$ESCALATION_TOOL" "$PACKAGER" config-manager --enable fedora-cisco-openh264 -y + "$ESCALATION_TOOL" "$PACKAGER" install -y "$DEPENDENCIES" + fi ;; zypper) "$ESCALATION_TOOL" "$PACKAGER" -n install "$DEPENDENCIES" diff --git a/core/tabs/system-setup/system-update.sh b/core/tabs/system-setup/system-update.sh index 930fd810..c213156a 100755 --- a/core/tabs/system-setup/system-update.sh +++ b/core/tabs/system-setup/system-update.sh @@ -59,7 +59,7 @@ updateSystem() { printf "%b\n" "${GREEN}Updating system${RC}" case "$PACKAGER" in apt-get|nala) - "$ESCALATION_TOOL" "$PACKAGER" update -y + "$ESCALATION_TOOL" "$PACKAGER" update "$ESCALATION_TOOL" "$PACKAGER" upgrade -y ;; dnf) diff --git a/core/tabs/system-setup/tab_data.toml b/core/tabs/system-setup/tab_data.toml index a68d2fdf..080c06d9 100644 --- a/core/tabs/system-setup/tab_data.toml +++ b/core/tabs/system-setup/tab_data.toml @@ -43,11 +43,13 @@ task_list = "PFM" [[data.entries]] name = "Multimedia Codecs" +description = "This script is designed to install multimedia codecs, and to ensure RPM Fusion repositories are installed." script = "fedora/multimedia-codecs.sh" task_list = "I" [[data.entries]] name = "Nvidia Proprietary Drivers" +description = "This script is designed to download the proprietary NVIDIA drivers in Fedora." script = "fedora/nvidia-proprietary-driver-setup.sh" task_list = "I" @@ -71,6 +73,7 @@ task_list = "I" [[data]] name = "Full System Cleanup" +description = "This script is designed to remove unnecessary packages, clean old cache files, remove temporary files, and to empty the trash." script = "system-cleanup.sh" task_list = "RP PFM" @@ -97,3 +100,9 @@ name = "Remove Snaps" description = "This script is designed to remove snap" script = "remove-snaps.sh" task_list = "RP" + +[[data]] +name = "TTY Fonts" +description = "This Script will set the default TTY font to Terminus size 32 Bold" +script = "terminus-tty.sh" +task_list = "I PFM" diff --git a/core/tabs/system-setup/terminus-tty.sh b/core/tabs/system-setup/terminus-tty.sh new file mode 100755 index 00000000..2c1deaa0 --- /dev/null +++ b/core/tabs/system-setup/terminus-tty.sh @@ -0,0 +1,66 @@ +#!/bin/sh -e + +. ../common-script.sh +InstallTermiusFonts() { + if [ ! -f "/usr/share/kbd/consolefonts/ter-c18b.psf.gz" ] && + [ ! -f "/usr/share/consolefonts/Uni3-TerminusBold18x10.psf.gz" ] && + [ ! -f "/usr/lib/kbd/consolefonts/ter-p32n.psf.gz" ]; then + printf "%b\n" "${YELLOW}Installing Terminus Fonts...${RC}" + case "$PACKAGER" in + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm terminus-font + ;; + apt-get|nala) + "$ESCALATION_TOOL" "$PACKAGER" install -y fonts-terminus + ;; + dnf) + "$ESCALATION_TOOL" "$PACKAGER" install -y terminus-fonts-console + ;; + *) + printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" + exit 1 + ;; + esac + else + printf "%b\n" "${GREEN}Terminus Fonts is already installed.${RC}" + fi +} + +SetTermiusFonts() { + case "$DTYPE" in + arch) + printf "%b\n" "${YELLOW}Updating FONT= line in /etc/vconsole.conf...${RC}" + "$ESCALATION_TOOL" sed -i 's/^FONT=.*/FONT=ter-v32b/' /etc/vconsole.conf + if [ -z "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ]; then + "$ESCALATION_TOOL" setfont -C /dev/tty1 ter-v32b + fi + printf "%b\n" "${GREEN}Terminus font set for TTY.${RC}" + ;; + debian) + + printf "%b\n" "${YELLOW}Updating console-setup configuration...${RC}" + "$ESCALATION_TOOL" sed -i 's/^CODESET=.*/CODESET="guess"/' /etc/default/console-setup + "$ESCALATION_TOOL" sed -i 's/^FONTFACE=.*/FONTFACE="TerminusBold"/' /etc/default/console-setup + "$ESCALATION_TOOL" sed -i 's/^FONTSIZE=.*/FONTSIZE="16x32"/' /etc/default/console-setup + printf "%b\n" "${GREEN}Console-setup configuration updated for Terminus font.${RC}" + # Editing console-setup requires initramfs to be regenerated + "$ESCALATION_TOOL" update-initramfs -u + if [ -z "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ]; then + "$ESCALATION_TOOL" setfont -C /dev/tty1 /usr/share/consolefonts/Uni3-TerminusBold32x16.psf.gz + fi + printf "%b\n" "${GREEN}Terminus font has been set for TTY.${RC}" + ;; + fedora) + printf "%b\n" "${YELLOW}Updating FONT= line in /etc/vconsole.conf...${RC}" + "$ESCALATION_TOOL" sed -i 's/^FONT=.*/FONT=ter-v32b/' /etc/vconsole.conf + if [ -z "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ]; then + "$ESCALATION_TOOL" setfont -C /dev/tty1 ter-v32b + fi + printf "%b\n" "${GREEN}Terminus font has been set for TTY.${RC}" + ;; + esac +} + +checkEnv +InstallTermiusFonts +SetTermiusFonts diff --git a/core/tabs/utils/auto-login.sh b/core/tabs/utils/auto-login.sh index 3337bbf4..561250d5 100644 --- a/core/tabs/utils/auto-login.sh +++ b/core/tabs/utils/auto-login.sh @@ -29,7 +29,7 @@ list_sessions() { 8) session="openbox.desktop" ;; 9) session="i3.desktop" ;; 10) - printf "%b" "Enter custom session name (e.g., mysession.desktop): " + printf "%b" "Enter custom session name (e.g., mysession): " read -r session ;; *) printf "%b\n" "Invalid option selected." @@ -43,9 +43,9 @@ configure_lightdm() { printf "%b" "Enter username for LightDM autologin: " read -r user - "$ESCALATION_TOOL" "printf '[Seat:*]' > /etc/lightdm/lightdm.conf.d/50-autologin.conf" - "$ESCALATION_TOOL" "printf 'autologin-user=$user' >> /etc/lightdm/lightdm.conf.d/50-autologin.conf" - "$ESCALATION_TOOL" "printf 'autologin-user-timeout=0' >> /etc/lightdm/lightdm.conf.d/50-autologin.conf" + printf "%b\n" '[Seat:*]' | "$ESCALATION_TOOL" tee -a /etc/lightdm/lightdm.conf + printf "%s\n" "autologin-user=$user" | "$ESCALATION_TOOL" tee -a /etc/lightdm/lightdm.conf + printf "%b\n" 'autologin-user-timeout=0' | "$ESCALATION_TOOL" tee -a /etc/lightdm/lightdm.conf printf "%b\n" "LightDM has been configured for autologin." } @@ -53,7 +53,8 @@ configure_lightdm() { # Function to remove LightDM autologin remove_lightdm_autologin() { printf "%b\n" "Removing LightDM autologin configuration..." - "$ESCALATION_TOOL" rm -f /etc/lightdm/lightdm.conf.d/50-autologin.conf + "$ESCALATION_TOOL" sed -i'' '/^\[Seat:\*]/d' /etc/lightdm/lightdm.conf + "$ESCALATION_TOOL" sed -i'' '/^autologin-/d' /etc/lightdm/lightdm.conf printf "%b\n" "LightDM autologin configuration has been removed." } @@ -63,9 +64,9 @@ configure_gdm() { printf "%b" "Enter username for GDM autologin: " read -r user - "$ESCALATION_TOOL" "printf '[daemon]' > /etc/gdm/custom.conf" - "$ESCALATION_TOOL" "printf 'AutomaticLoginEnable = true' >> /etc/gdm/custom.conf" - "$ESCALATION_TOOL" "printf 'AutomaticLogin = $user' >> /etc/gdm/custom.conf" + printf "%b\n" '[daemon]' | "$ESCALATION_TOOL" tee -a /etc/gdm/custom.conf + printf "%b\n" 'AutomaticLoginEnable = true' | "$ESCALATION_TOOL" tee -a /etc/gdm/custom.conf + printf "%s\n" "AutomaticLogin = $user" | "$ESCALATION_TOOL" tee -a /etc/gdm/custom.conf printf "%b\n" "GDM has been configured for autologin." } @@ -73,8 +74,8 @@ configure_gdm() { # Function to remove GDM autologin remove_gdm_autologin() { printf "%b\n" "Removing GDM autologin configuration..." - "$ESCALATION_TOOL" sed -i '/AutomaticLoginEnable/d' /etc/gdm/custom.conf - "$ESCALATION_TOOL" sed -i '/AutomaticLogin/d' /etc/gdm/custom.conf + "$ESCALATION_TOOL" sed -i'' '/AutomaticLoginEnable/d' /etc/gdm/custom.conf + "$ESCALATION_TOOL" sed -i'' '/AutomaticLogin/d' /etc/gdm/custom.conf printf "%b\n" "GDM autologin configuration has been removed." } @@ -85,9 +86,9 @@ configure_sddm() { read -r user list_sessions # Show session options - "$ESCALATION_TOOL" "printf '[Autologin]' > /etc/sddm.conf" - "$ESCALATION_TOOL" "printf 'User=$user' >> /etc/sddm.conf" - "$ESCALATION_TOOL" "printf 'Session=$session' >> /etc/sddm.conf" + printf "%b\n" '[Autologin]' | "$ESCALATION_TOOL" tee -a /etc/sddm.conf + printf "%s\n" "User=$user" | "$ESCALATION_TOOL" tee -a /etc/sddm.conf + printf "%s\n" "Session=$session" | "$ESCALATION_TOOL" tee -a /etc/sddm.conf printf "%b\n" "SDDM has been configured for autologin." } @@ -95,7 +96,7 @@ configure_sddm() { # Function to remove SDDM autologin remove_sddm_autologin() { printf "%b\n" "Removing SDDM autologin configuration..." - "$ESCALATION_TOOL" sed -i '/\[Autologin\]/,+2d' /etc/sddm.conf + "$ESCALATION_TOOL" sed -i'' '/\[Autologin\]/,+2d' /etc/sddm.conf printf "%b\n" "SDDM autologin configuration has been removed." } @@ -106,8 +107,8 @@ configure_lxdm() { read -r user list_sessions # Show session options - "$ESCALATION_TOOL" sed -i "s/^#.*autologin=.*$/autologin=${user}/" /etc/lxdm/lxdm.conf - "$ESCALATION_TOOL" sed -i "s|^#.*session=.*$|session=/usr/bin/${session}|; s|^session=.*$|session=/usr/bin/${session}|" /etc/lxdm/lxdm.conf + "$ESCALATION_TOOL" sed -i'' "s/^#.*autologin=.*$/autologin=${user}/" /etc/lxdm/lxdm.conf + "$ESCALATION_TOOL" sed -i'' "s|^#.*session=.*$|session=/usr/bin/${session}|; s|^session=.*$|session=/usr/bin/${session}|" /etc/lxdm/lxdm.conf printf "%b\n" "LXDM has been configured for autologin." } @@ -115,8 +116,8 @@ configure_lxdm() { # Function to remove LXDM autologin remove_lxdm_autologin() { printf "%b\n" "Removing LXDM autologin configuration..." - "$ESCALATION_TOOL" sed -i "s/^autologin=.*$/#autologin=/" /etc/lxdm/lxdm.conf - "$ESCALATION_TOOL" sed -i "s/^session=.*$/#session=/" /etc/lxdm/lxdm.conf + "$ESCALATION_TOOL" sed -i'' "s/^autologin=.*$/#autologin=/" /etc/lxdm/lxdm.conf + "$ESCALATION_TOOL" sed -i'' "s/^session=.*$/#session=/" /etc/lxdm/lxdm.conf printf "%b\n" "LXDM autologin configuration has been removed." } diff --git a/core/tabs/utils/auto-mount.sh b/core/tabs/utils/auto-mount.sh index 7293f26a..f4eb59b2 100644 --- a/core/tabs/utils/auto-mount.sh +++ b/core/tabs/utils/auto-mount.sh @@ -21,7 +21,7 @@ select_drive() { # Function to get UUID and FSTYPE of the selected drive get_uuid_fstype() { - UUID=$(blkid -s UUID -o value "${partition}") + UUID=$("$ESCALATION_TOOL" blkid -s UUID -o value "${partition}") FSTYPE=$(lsblk -no FSTYPE "${partition}") NAME=$(lsblk -no NAME "${partition}") diff --git a/core/tabs/utils/power-profile.sh b/core/tabs/utils/power-profile.sh index 996db704..536f7c69 100644 --- a/core/tabs/utils/power-profile.sh +++ b/core/tabs/utils/power-profile.sh @@ -34,6 +34,7 @@ installAutoCpufreq() { cd auto-cpufreq printf "%b\n" "${YELLOW}Running auto-cpufreq installer...${RC}" "$ESCALATION_TOOL" ./auto-cpufreq-installer + "$ESCALATION_TOOL" auto-cpufreq --install cd .. fi @@ -94,4 +95,4 @@ apply_or_remove_auto_cpufreq() { checkEnv checkEscalationTool installAutoCpufreq -apply_or_remove_auto_cpufreq \ No newline at end of file +apply_or_remove_auto_cpufreq diff --git a/core/tabs/utils/tab_data.toml b/core/tabs/utils/tab_data.toml index 4b641147..7cfc3ed7 100644 --- a/core/tabs/utils/tab_data.toml +++ b/core/tabs/utils/tab_data.toml @@ -95,6 +95,7 @@ script = "user-account-manager/remove_from_group.sh" [[data]] name = "Auto Mount Drive" +description = "This utility is designed to help with automating the process of mounting a drive on to your system." script = "auto-mount.sh" task_list = "PFM" diff --git a/docs/assets/preview.gif b/docs/assets/preview.gif new file mode 100644 index 00000000..c8e49da1 Binary files /dev/null and b/docs/assets/preview.gif differ diff --git a/docs/assets/preview.png b/docs/assets/preview.png deleted file mode 100644 index bb8b7037..00000000 Binary files a/docs/assets/preview.png and /dev/null differ diff --git a/docs/assets/preview.tape b/docs/assets/preview.tape new file mode 100644 index 00000000..ca2b59d7 --- /dev/null +++ b/docs/assets/preview.tape @@ -0,0 +1,88 @@ +# VHS documentation +# +# Output: +# Output .gif Create a GIF output at the given +# Output .mp4 Create an MP4 output at the given +# Output .webm Create a WebM output at the given +# +# Require: +# Require Ensure a program is on the $PATH to proceed +# +# Settings: +# Set FontSize Set the font size of the terminal +# Set FontFamily Set the font family of the terminal +# Set Height Set the height of the terminal +# Set Width Set the width of the terminal +# Set LetterSpacing Set the font letter spacing (tracking) +# Set LineHeight Set the font line height +# Set LoopOffset % Set the starting frame offset for the GIF loop +# Set Theme Set the theme of the terminal +# Set Padding Set the padding of the terminal +# Set Framerate Set the framerate of the recording +# Set PlaybackSpeed Set the playback speed of the recording +# Set MarginFill Set the file or color the margin will be filled with. +# Set Margin Set the size of the margin. Has no effect if MarginFill isn't set. +# Set BorderRadius Set terminal border radius, in pixels. +# Set WindowBar Set window bar type. (one of: Rings, RingsRight, Colorful, ColorfulRight) +# Set WindowBarSize Set window bar size, in pixels. Default is 40. +# Set TypingSpeed