mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2025-04-20 10:53:06 +01:00
Compare commits
3 Commits
4d2ccc0797
...
046aaceec1
Author | SHA1 | Date | |
---|---|---|---|
|
046aaceec1 | ||
|
efa6ff9cd2 | ||
|
2c0a6ba80e |
@ -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,
|
||||
}
|
||||
|
||||
|
15
core/tabs/system-setup/arch/hyprland-kool.sh
Normal file
15
core/tabs/system-setup/arch/hyprland-kool.sh
Normal 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
|
9
core/tabs/system-setup/debian/hyprland-kool-deb.sh
Normal file
9
core/tabs/system-setup/debian/hyprland-kool-deb.sh
Normal 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
|
10
core/tabs/system-setup/fedora/hyprland-kool-fed.sh
Normal file
10
core/tabs/system-setup/fedora/hyprland-kool-fed.sh
Normal 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
|
@ -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"
|
||||
|
10
core/tabs/system-setup/ubuntu/hyprland-kool-ubuntu24.sh
Normal file
10
core/tabs/system-setup/ubuntu/hyprland-kool-ubuntu24.sh
Normal 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
|
@ -333,16 +333,24 @@ impl AppState {
|
||||
.map(|tab| tab.name.as_str())
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let tab_hl_style = if let Focus::TabList = self.focus {
|
||||
Style::default().reversed().fg(self.theme.tab_color())
|
||||
let (tab_hl_style, highlight_symbol) = if let Focus::TabList = self.focus {
|
||||
(
|
||||
Style::default().reversed().fg(self.theme.tab_color()),
|
||||
self.theme.tab_icon(),
|
||||
)
|
||||
} else if let Focus::Search = self.focus {
|
||||
(Style::reset(), " ")
|
||||
} else {
|
||||
Style::new().fg(self.theme.tab_color())
|
||||
(
|
||||
Style::new().fg(self.theme.tab_color()),
|
||||
self.theme.tab_icon(),
|
||||
)
|
||||
};
|
||||
|
||||
let tab_list = List::new(tabs)
|
||||
.block(Block::bordered().border_set(border::ROUNDED))
|
||||
.highlight_style(tab_hl_style)
|
||||
.highlight_symbol(self.theme.tab_icon());
|
||||
.highlight_symbol(highlight_symbol);
|
||||
frame.render_stateful_widget(tab_list, left_chunks[1], &mut self.current_tab);
|
||||
|
||||
let chunks =
|
||||
|
Loading…
x
Reference in New Issue
Block a user