mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2025-03-03 21:37:12 +00:00
allow different os-releases and hypr setup
This commit is contained in:
parent
a6ccaf4a4e
commit
e009ef066c
|
@ -132,14 +132,15 @@ impl Entry {
|
|||
match data {
|
||||
SystemDataType::Environment(var_name) => std::env::var(var_name)
|
||||
.is_ok_and(|var| values.contains(&var) == *matches),
|
||||
SystemDataType::File(path) => {
|
||||
std::fs::read_to_string(path).is_ok_and(|data| {
|
||||
values.iter().all(|matching| data.contains(matching)) == *matches
|
||||
})
|
||||
}
|
||||
SystemDataType::File(path) => path.exists() == *matches,
|
||||
SystemDataType::CommandExists => values
|
||||
.iter()
|
||||
.all(|command| which::which(command).is_ok() == *matches),
|
||||
SystemDataType::FileContains { file, contains } => {
|
||||
std::fs::read_to_string(file)
|
||||
.map(|content| content.contains(contains) == *matches)
|
||||
.unwrap_or(false)
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
|
@ -164,6 +165,11 @@ enum SystemDataType {
|
|||
File(PathBuf),
|
||||
#[serde(rename = "command_exists")]
|
||||
CommandExists,
|
||||
#[serde(untagged)]
|
||||
FileContains {
|
||||
file: PathBuf,
|
||||
contains: String,
|
||||
},
|
||||
}
|
||||
|
||||
fn filter_entries(entries: &mut Vec<Entry>) {
|
||||
|
|
12
core/tabs/system-setup/arch/hyprland-kool.sh
Normal file
12
core/tabs/system-setup/arch/hyprland-kool.sh
Normal file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Check if base-devel is installed, install if not
|
||||
if ! pacman -Q base-devel &>/dev/null; then
|
||||
echo "Installing base-devel..."
|
||||
sudo pacman -S --noconfirm base-devel
|
||||
fi
|
||||
|
||||
git clone --depth=1 https://github.com/JaKooLit/Arch-Hyprland.git ~/Arch-Hyprland
|
||||
cd ~/Arch-Hyprland
|
||||
chmod +x install.sh
|
||||
./install.sh
|
7
core/tabs/system-setup/debian/hyprland-kool-deb.sh
Normal file
7
core/tabs/system-setup/debian/hyprland-kool-deb.sh
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Hyprland Kool"
|
||||
git clone --depth=1 https://github.com/JaKooLit/Debian-Hyprland.git ~/Debian-Hyprland
|
||||
cd ~/Debian-Hyprland
|
||||
chmod +x install.sh
|
||||
./install.sh
|
6
core/tabs/system-setup/fedora/hyprland-kool-fed.sh
Normal file
6
core/tabs/system-setup/fedora/hyprland-kool-fed.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
git clone --depth=1 https://github.com/JaKooLit/Fedora-Hyprland.git ~/Fedora-Hyprland
|
||||
cd ~/Fedora-Hyprland
|
||||
chmod +x install.sh
|
||||
./install.sh
|
|
@ -15,6 +15,13 @@ script = "arch/server-setup.sh"
|
|||
task_list = "SI D"
|
||||
multi_select = false
|
||||
|
||||
[[data.entries]]
|
||||
name = "Hyprland Kool"
|
||||
description = "This script is designed to handle the installation and configuration of Hyprland Kool"
|
||||
script = "arch/hyprland-kool.sh"
|
||||
task_list = "I MP"
|
||||
multi_select = false
|
||||
|
||||
[[data.entries]]
|
||||
name ="Linux Neptune for SteamDeck"
|
||||
description = "Valve's fork of Linux Kernel for the SteamDeck"
|
||||
|
@ -50,6 +57,20 @@ description = "Yet Another Yogurt - An AUR Helper Written in Go. To know more ab
|
|||
script = "arch/yay-setup.sh"
|
||||
task_list = "I"
|
||||
|
||||
[[data]]
|
||||
name = "Debian"
|
||||
|
||||
[[data.preconditions]]
|
||||
matches = true
|
||||
data = { file = "/etc/os-release", contains = "ID=debian" }
|
||||
values = []
|
||||
|
||||
[[data.entries]]
|
||||
name = "Hyprland Kool"
|
||||
description = "This script is designed to handle the installation and configuration of Hyprland Kool"
|
||||
script = "debian/hyprland-kool-deb.sh"
|
||||
task_list = "I MP"
|
||||
|
||||
[[data]]
|
||||
name = "Fedora"
|
||||
|
||||
|
@ -64,6 +85,12 @@ description = "Optimizes DNF for parallel downloads"
|
|||
script = "fedora/configure-dnf.sh"
|
||||
task_list = "PFM"
|
||||
|
||||
[[data.entries]]
|
||||
name = "Hyprland Kool"
|
||||
description = "This script is designed to handle the installation and configuration of Hyprland Kool"
|
||||
script = "fedora/hyprland-kool-fed.sh"
|
||||
task_list = "I MP"
|
||||
|
||||
[[data.entries]]
|
||||
name = "Multimedia Codecs"
|
||||
description = "This script is designed to install multimedia codecs, and to ensure RPM Fusion repositories are installed."
|
||||
|
@ -105,6 +132,25 @@ matches = true
|
|||
data = "command_exists"
|
||||
values = [ "btrfs" ]
|
||||
|
||||
[[data]]
|
||||
name = "Ubuntu"
|
||||
|
||||
[[data.preconditions]]
|
||||
matches = true
|
||||
data = { file = "/etc/os-release", contains = "ID=ubuntu" }
|
||||
values = []
|
||||
|
||||
[[data.entries]]
|
||||
name = "Hyprland Kool"
|
||||
description = "This script is designed to handle the installation and configuration of Hyprland Kool"
|
||||
script = "ubuntu/hyprland-kool-ubuntu24.sh"
|
||||
task_list = "I MP"
|
||||
|
||||
[[data.preconditions]]
|
||||
matches = true
|
||||
data = { file = "/etc/os-release", contains = 'VERSION_ID="24.04"' }
|
||||
values = []
|
||||
|
||||
[[data]]
|
||||
name = "Build Prerequisites"
|
||||
description = "This script is designed to handle the installation of various software dependencies across different Linux distributions"
|
||||
|
|
7
core/tabs/system-setup/ubuntu/hyprland-kool-ubuntu24.sh
Normal file
7
core/tabs/system-setup/ubuntu/hyprland-kool-ubuntu24.sh
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "Hyprland Kool"
|
||||
git clone -b 24.04 --depth=1 https://github.com/JaKooLit/Ubuntu-Hyprland.git ~/Ubuntu-Hyprland-24.04
|
||||
cd ~/Ubuntu-Hyprland-24.04
|
||||
chmod +x install.sh
|
||||
./install.sh
|
Loading…
Reference in New Issue
Block a user