Skip to content

Commit

Permalink
Merge branch 'main' into automation
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisTitusTech authored Nov 7, 2024
2 parents 4f5030c + e8e1a36 commit 82199ec
Show file tree
Hide file tree
Showing 66 changed files with 489 additions and 112 deletions.
3 changes: 2 additions & 1 deletion .shellcheckrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
external-sources=true
source=core/tabs/common-script.sh
source=core/tabs/common-script.sh
source=core/tabs/common-service-script.sh
5 changes: 2 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ license = "MIT"
version = "24.9.28"
edition = "2021"

[workspace.dependencies]
ego-tree = "0.6.2"

[workspace]
members = ["tui", "core", "xtask"]
default-members = ["tui", "core"]
Expand Down
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,26 @@ curl -fsSL https://christitus.com/linux | sh
```bash
curl -fsSL https://christitus.com/linuxdev | sh
```
<details>
<summary>CLI arguments</summary>

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

- `-t, --theme <THEME>` : Set the theme to use in the application [default: default] [possible values: default, compatible].
- `--override-validation` : Show all available options, disregarding compatibility checks (UNSAFE).
- `-h, --help` : Print help.

For more detailed usage, run:

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

```bash
linutil --help
```
</details>

## ⬇️ Installation

Linutil is also available as a package in various repositories:
Expand Down Expand Up @@ -58,7 +78,15 @@ paru -S linutil
Replace `paru` with your preferred helper and `linutil` with your preferred package.

</details>
<details>
<summary>OpenSUSE</summary>

Linutil can be installed on OpenSUSE with:
```bash
sudo zypper install linutil
```

</details>
<details>
<summary>Cargo</summary>

Expand Down
8 changes: 2 additions & 6 deletions core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@ repository = "https://github.com/ChrisTitusTech/linutil/tree/main/core"
edition = "2021"
version.workspace = true
license.workspace = true
include = [
"src/*.rs",
"Cargo.toml",
"tabs/**",
]
include = ["src/*.rs", "Cargo.toml", "tabs/**"]

[dependencies]
include_dir = "0.7.4"
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"
ego-tree = { workspace = true }
ego-tree = "0.9.0"
1 change: 1 addition & 0 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ mod inner;

use std::rc::Rc;

pub use ego_tree;
use ego_tree::Tree;
use std::path::PathBuf;

Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/Developer-tools/meld-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ installMeld() {
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" -y install meld
;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" add meld
;;
*)
checkFlatpak
flatpak install -y flathub org.gnome.meld
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/Developer-tools/neovim-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ installNeovim() {
dnf|zypper)
"$ESCALATION_TOOL" "$PACKAGER" install -y neovim ripgrep fzf python3-virtualenv luarocks golang ShellCheck git
;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" add neovim ripgrep fzf py3-virtualenv luarocks go shellcheck git
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
Expand Down
6 changes: 5 additions & 1 deletion core/tabs/applications-setup/Developer-tools/vscode-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
. ../../common-script.sh

installVsCode() {
if ! command_exists code; then
if ! command_exists com.visualstudio.code && ! command_exists code; then
printf "%b\n" "${YELLOW}Installing VS Code..${RC}."
case "$PACKAGER" in
apt-get|nala)
Expand All @@ -28,6 +28,10 @@ installVsCode() {
printf "%b\n" '[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc' | "$ESCALATION_TOOL" tee /etc/yum.repos.d/vscode.repo > /dev/null
"$ESCALATION_TOOL" "$PACKAGER" install -y code
;;
apk)
checkFlatpak
flatpak install -y flathub com.visualstudio.code
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
. ../../common-script.sh

installVsCodium() {
if ! command_exists codium; then
if ! command_exists com.vscodium.codium && ! command_exists codium; then
printf "%b\n" "${YELLOW}Installing VS Codium...${RC}"
case "$PACKAGER" in
apt-get|nala)
Expand All @@ -26,6 +26,10 @@ installVsCodium() {
printf "%b\n" "[gitlab.com_paulcarroty_vscodium_repo]\nname=download.vscodium.com\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/yum.repos.d/vscodium.repo
"$ESCALATION_TOOL" "$PACKAGER" install -y codium
;;
apk)
checkFlatpak
flatpak install -y flathub com.vscodium.codium
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/alacritty-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ installAlacritty() {
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm alacritty
;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" add alacritty
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y alacritty
;;
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/android-debloat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ install_adb() {
dnf|zypper)
"$ESCALATION_TOOL" "$PACKAGER" install -y android-tools
;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" add android-tools
;;
*)
printf "%b\n" "${RED}Unsupported package manager: "$PACKAGER"${RC}"
exit 1
Expand Down
6 changes: 5 additions & 1 deletion core/tabs/applications-setup/browsers/brave.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
. ../../common-script.sh

installBrave() {
if ! command_exists brave; then
if ! command_exists com.brave.Browser && ! command_exists brave; then
printf "%b\n" "${YELLOW}Installing Brave...${RC}"
case "$PACKAGER" in
apt-get|nala)
Expand All @@ -29,6 +29,10 @@ installBrave() {
"$ESCALATION_TOOL" rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
"$ESCALATION_TOOL" "$PACKAGER" install -y brave-browser
;;
apk)
checkFlatpak
flatpak install -y flathub com.brave.Browser
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/browsers/chromium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ if ! command_exists chromium; then
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm chromium
;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" add chromium
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y chromium
;;
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/browsers/firefox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ installFirefox() {
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y firefox
;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" add firefox
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
Expand Down
6 changes: 5 additions & 1 deletion core/tabs/applications-setup/browsers/librewolf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
. ../../common-script.sh

installLibreWolf() {
if ! command_exists librewolf; then
if ! command_exists io.gitlab.librewolf-community && ! command_exists librewolf; then
printf "%b\n" "${YELLOW}Installing Librewolf...${RC}"
case "$PACKAGER" in
apt-get|nala)
Expand Down Expand Up @@ -32,6 +32,10 @@ Signed-By: /usr/share/keyrings/librewolf.gpg" | "$ESCALATION_TOOL" tee /etc/apt/
pacman)
"$AUR_HELPER" -S --needed --noconfirm librewolf-bin
;;
apk)
checkFlatpak
flatpak install flathub io.gitlab.librewolf-community
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
Expand Down
3 changes: 3 additions & 0 deletions core/tabs/applications-setup/browsers/lynx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ installLynx() {
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm lynx
;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" add lynx
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y lynx
;;
Expand Down
1 change: 1 addition & 0 deletions core/tabs/applications-setup/browsers/thorium.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ installThrorium() {
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else
Expand Down
6 changes: 3 additions & 3 deletions core/tabs/applications-setup/browsers/waterfox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
. ../../common-script.sh

installWaterfox() {
if ! command_exists waterfox; then
if ! command_exists net.waterfox.waterfox && ! command_exists waterfox; then
printf "%b\n" "${YELLOW}Installing waterfox...${RC}"
case "$PACKAGER" in
pacman)
"$AUR_HELPER" -S --needed --noconfirm waterfox-bin
"$AUR_HELPER" -S --needed --noconfirm waterfox-bin
;;
*)
. ../setup-flatpak.sh
checkFlatpak
flatpak install -y flathub net.waterfox.waterfox
;;
esac
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
. ../../common-script.sh

installDiscord() {
if ! command_exists discord; then
if ! command_exists com.discordapp.Discord && ! command_exists discord; then
printf "%b\n" "${YELLOW}Installing Discord...${RC}"
case "$PACKAGER" in
apt-get|nala)
Expand All @@ -20,6 +20,10 @@ installDiscord() {
"$ESCALATION_TOOL" "$PACKAGER" install -y https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
"$ESCALATION_TOOL" "$PACKAGER" install -y discord
;;
apk)
checkFlatpak
flatpak install -y flathub com.discordapp.Discord
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
. ../../common-script.sh

installJitsi() {
if ! command_exists jitsi-meet; then
if ! command_exists org.jitsi.jitsi-meet && ! command_exists jitsi-meet; then
printf "%b\n" "${YELLOW}Installing Jitsi meet...${RC}"
case "$PACKAGER" in
apt-get|nala)
Expand All @@ -21,6 +21,10 @@ installJitsi() {
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y jitsi-meet
;;
apk)
checkFlatpak
flatpak install flathub org.jitsi.jitsi-meet
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ installSignal() {
checkFlatpak
flatpak install -y flathub org.signal.Signal
;;
apk)
checkFlatpak
flatpak install -y flathub org.signal.Signal
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ installTelegram() {
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm telegram-desktop
;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" add telegram-desktop
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y telegram-desktop
;;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ installThunderBird() {
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm thunderbird
;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" add thunderbird
;;
*)
"$ESCALATION_TOOL" "$PACKAGER" install -y thunderbird
;;
Expand Down
Loading

0 comments on commit 82199ec

Please sign in to comment.