Compare commits

...

11 Commits

Author SHA1 Message Date
Jaredy899
a8352b0ace
Merge 9b3092687537af20e36d2256a93f008be4396d74 into efa6ff9cd2eb77204028de361be008a68338aeb8 2025-02-06 22:35:16 -05:00
Chris Titus
efa6ff9cd2
allow different os-releases and hyprland setup (#1013)
* allow different os-releases and hypr setup

* Update core/src/inner.rs

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>

* Update core/tabs/system-setup/debian/hyprland-kool-deb.sh

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>

* Update core/tabs/system-setup/arch/hyprland-kool.sh

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>

* Update core/tabs/system-setup/fedora/hyprland-kool-fed.sh

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>

* Update core/tabs/system-setup/tab_data.toml

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>

* Update core/tabs/system-setup/tab_data.toml

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>

* Update core/tabs/system-setup/tab_data.toml

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>

* Update core/tabs/system-setup/tab_data.toml

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>

* Update core/tabs/system-setup/ubuntu/hyprland-kool-ubuntu24.sh

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>

* refactor: Improve File Contains precondition (#1016)

* Update inner.rs (#1021)

* Update inner.rs (#1022)

* revert to liams commit

* Update core/tabs/system-setup/arch/hyprland-kool.sh

Co-authored-by: nyx <nnyyxxxx@protonmail.com>

* Update core/tabs/system-setup/debian/hyprland-kool-deb.sh

Co-authored-by: nyx <nnyyxxxx@protonmail.com>

* Update core/tabs/system-setup/fedora/hyprland-kool-fed.sh

Co-authored-by: nyx <nnyyxxxx@protonmail.com>

* Update core/tabs/system-setup/arch/hyprland-kool.sh

Co-authored-by: nyx <nnyyxxxx@protonmail.com>

* Update core/tabs/system-setup/debian/hyprland-kool-deb.sh

Co-authored-by: nyx <nnyyxxxx@protonmail.com>

* Update core/tabs/system-setup/debian/hyprland-kool-deb.sh

Co-authored-by: nyx <nnyyxxxx@protonmail.com>

* Update core/tabs/system-setup/arch/hyprland-kool.sh

Co-authored-by: nyx <nnyyxxxx@protonmail.com>

* Update core/tabs/system-setup/arch/hyprland-kool.sh

Co-authored-by: nyx <nnyyxxxx@protonmail.com>

* Update core/tabs/system-setup/arch/hyprland-kool.sh

Co-authored-by: nyx <nnyyxxxx@protonmail.com>

* Update core/tabs/system-setup/arch/hyprland-kool.sh

Co-authored-by: nyx <nnyyxxxx@protonmail.com>

* fix bashisms

* Switch to SH from bash

---------

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>
Co-authored-by: nyx <nnyyxxxx@protonmail.com>
2025-02-06 15:14:09 -06:00
Jaredy899
9b30926875
Update common-service-script.sh 2025-01-20 21:28:40 -05:00
Jaredy899
2b27fa217b
replace runit with sv
sv works with runit, and we don't need to sleep command.
2025-01-20 20:18:26 -05:00
Jaredy899
9c71edf061
Update core/tabs/common-service-script.sh
Found it faster than me. Thanks

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
2025-01-11 09:25:40 -05:00
Jaredy899
a669ed338f
Update core/tabs/common-service-script.sh
Cool with me. Thanks

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
2025-01-11 09:19:09 -05:00
Jaredy899
5746748f52
Update common-service-script.sh 2025-01-10 21:32:51 -05:00
Jaredy899
92bef5fe8d
Merge branch 'ChrisTitusTech:main' into service-script 2025-01-10 16:47:37 -05:00
Jaredy899
d44ce3cdb6
sleep for 5 to allow supervise to run 2025-01-10 00:33:45 -05:00
Jaredy899
83fee492b8
Update common-service-script.sh 2024-12-26 22:21:31 -05:00
Jaredy899
dc61abd3bb
Update common-service-script.sh 2024-12-24 07:51:53 -05:00
7 changed files with 124 additions and 18 deletions

View File

@ -111,12 +111,10 @@ fn default_true() -> bool {
}
#[derive(Deserialize)]
#[serde(rename_all = "snake_case")]
enum EntryType {
#[serde(rename = "entries")]
Entries(Vec<Entry>),
#[serde(rename = "command")]
Command(String),
#[serde(rename = "script")]
Script(PathBuf),
}
@ -132,14 +130,16 @@ 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::ContainingFile(file) => std::fs::read_to_string(file)
.is_ok_and(|data| {
values
.iter()
.all(|matching| data.contains(matching) == *matches)
}),
SystemDataType::CommandExists => values
.iter()
.all(|command| which::which(command).is_ok() == *matches),
SystemDataType::FileExists => values.iter().all(|p| Path::new(p).is_file()),
}
},
)
@ -157,12 +157,11 @@ struct Precondition {
}
#[derive(Deserialize)]
#[serde(rename_all = "snake_case")]
enum SystemDataType {
#[serde(rename = "environment")]
Environment(String),
#[serde(rename = "file")]
File(PathBuf),
#[serde(rename = "command_exists")]
ContainingFile(PathBuf),
FileExists,
CommandExists,
}

View File

@ -23,6 +23,9 @@ startService() {
rc-service)
"$ESCALATION_TOOL" "$INIT_MANAGER" "$1" start
;;
sv)
"$ESCALATION_TOOL" sv start "$1"
;;
esac
}
@ -34,6 +37,9 @@ stopService() {
rc-service)
"$ESCALATION_TOOL" "$INIT_MANAGER" "$1" stop
;;
sv)
"$ESCALATION_TOOL" sv stop "$1"
;;
esac
}
@ -45,6 +51,11 @@ enableService() {
rc-service)
"$ESCALATION_TOOL" rc-update add "$1"
;;
sv)
"$ESCALATION_TOOL" ln -sf "/etc/sv/$1" "/var/service/"
printf "%b\n" "${YELLOW}Waiting 5 seconds...${RC}"
sleep 5
;;
esac
}
@ -56,6 +67,9 @@ disableService() {
rc-service)
"$ESCALATION_TOOL" rc-update del "$1"
;;
sv)
"$ESCALATION_TOOL" rm -f "/var/service/$1"
;;
esac
}
@ -64,7 +78,7 @@ startAndEnableService() {
systemctl)
"$ESCALATION_TOOL" "$INIT_MANAGER" enable --now "$1"
;;
rc-service)
rc-service | sv)
enableService "$1"
startService "$1"
;;
@ -79,7 +93,10 @@ isServiceActive() {
rc-service)
"$ESCALATION_TOOL" "$INIT_MANAGER" "$1" status --quiet
;;
sv)
"$ESCALATION_TOOL" sv status "$1" >/dev/null 2>&1
;;
esac
}
checkInitManager 'systemctl rc-service'
checkInitManager 'systemctl rc-service sv'

View File

@ -0,0 +1,15 @@
#!/bin/sh
. ../../common-script.sh
printf "%b\n" "${YELLOW}Starting Hyprland JaKooLit installation${RC}"
if ! pacman -Q base-devel >/dev/null 2>&1; then
printf "%b\n" "${YELLOW}Installing base-devel...${RC}"
"$ESCALATION_TOOL" pacman -S --noconfirm base-devel
fi
git clone --depth=1 https://github.com/JaKooLit/Arch-Hyprland.git "$HOME/Arch-Hyprland" || { printf "%b\n" "${RED}Failed to clone Jakoolits Arch-Hyprland repo${RC}"; exit 1; }
cd "$HOME/Arch-Hyprland" || { printf "%b\n" "${RED}Failed to navigate to Arch-Hyprland directory${RC}"; exit 1; }
chmod +x install.sh
./install.sh

View File

@ -0,0 +1,9 @@
#!/bin/sh
. ../../common-script.sh
printf "%b\n" "${YELLOW}Starting Hyprland JaKooLit installation${RC}"
git clone --depth=1 https://github.com/JaKooLit/Debian-Hyprland.git "$HOME/Debian-Hyprland" || { printf "%b\n" "${RED}Failed to clone Jakoolits Debian-Hyprland repo${RC}"; exit 1; }
cd "$HOME/Debian-Hyprland" || { printf "%b\n" "${RED}Failed to navigate to Debian-Hyprland directory${RC}"; exit 1; }
chmod +x install.sh
./install.sh

View File

@ -0,0 +1,10 @@
#!/bin/sh
. ../../common-script.sh
printf "%b\n" "${YELLOW}Starting Hyprland JaKooLit installation${RC}"
git clone --depth=1 https://github.com/JaKooLit/Fedora-Hyprland.git "$HOME/Fedora-Hyprland" || { printf "%b\n" "${RED}Failed to clone Jakoolits Fedora-Hyprland repo${RC}"; exit 1; }
cd "$HOME/Fedora-Hyprland" || { printf "%b\n" "${RED}Failed to navigate to Fedora-Hyprland directory${RC}"; exit 1; }
chmod +x install.sh
./install.sh

View File

@ -16,15 +16,22 @@ task_list = "SI D"
multi_select = false
[[data.entries]]
name ="Linux Neptune for SteamDeck"
name = "Hyprland JaKooLit"
description = "Install JaKooLit's Hyprland configuration"
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"
script = "arch/linux-neptune.sh"
task_list = "I PFM K"
[[data.entries.preconditions]]
matches = true
data = { file = "/sys/devices/virtual/dmi/id/board_vendor" }
values = [ "Valve" ]
data = { containing_file = "/sys/devices/virtual/dmi/id/board_vendor" }
values = ["Valve"]
[[data.entries]]
name = "Nvidia Drivers && Hardware Acceleration"
@ -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 = { containing_file = "/etc/os-release" }
values = ["ID=debian"]
[[data.entries]]
name = "Hyprland JaKooLit"
description = "Install JaKooLit's Hyprland configuration"
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 JaKooLit"
description = "Install JaKooLit's Hyprland configuration"
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."
@ -103,7 +130,26 @@ task_list = "I PFM SS"
[[data.preconditions]]
matches = true
data = "command_exists"
values = [ "btrfs" ]
values = ["btrfs"]
[[data]]
name = "Ubuntu"
[[data.preconditions]]
matches = true
data = { containing_file = "/etc/os-release" }
values = ["ID=ubuntu"]
[[data.entries]]
name = "Hyprland JaKooLit"
description = "Install JaKooLit's Hyprland configuration"
script = "ubuntu/hyprland-kool-ubuntu24.sh"
task_list = "I MP"
[[data.preconditions]]
matches = true
data = { containing_file = "/etc/os-release" }
values = ['VERSION_ID="24.04"']
[[data]]
name = "Build Prerequisites"

View File

@ -0,0 +1,10 @@
#!/bin/sh
. ../../common-script.sh
printf "%b\n" "${YELLOW}Starting Hyprland JaKooLit installation${RC}"
git clone -b 24.04 --depth=1 https://github.com/JaKooLit/Ubuntu-Hyprland.git "$HOME/Ubuntu-Hyprland-24.04" || { printf "%b\n" "${RED}Failed to clone Jakoolits Ubuntu-Hyprland repo${RC}"; exit 1; }
cd "$HOME/Ubuntu-Hyprland-24.04" || { printf "%b\n" "${RED}Failed to navigate to Ubuntu-Hyprland-24.04 directory${RC}"; exit 1; }
chmod +x install.sh
./install.sh