From 77962e2a5cea167bd6a932b1da79133bb1f74b70 Mon Sep 17 00:00:00 2001 From: afonsofrancof Date: Mon, 23 Sep 2024 03:31:52 +0100 Subject: [PATCH 01/21] Made popup title generic. Preview title is now the command name --- tui/src/floating_text.rs | 28 +++++++--------------------- tui/src/hint.rs | 8 ++++---- tui/src/running_command.rs | 4 ++-- tui/src/state.rs | 34 ++++++++++++++++------------------ 4 files changed, 29 insertions(+), 45 deletions(-) diff --git a/tui/src/floating_text.rs b/tui/src/floating_text.rs index 2cd63824..772c1c6b 100644 --- a/tui/src/floating_text.rs +++ b/tui/src/floating_text.rs @@ -27,18 +27,12 @@ use tree_sitter_bash as hl_bash; use tree_sitter_highlight::{self as hl, HighlightEvent}; use zips::zip_result; -pub enum FloatingTextMode { - Preview, - Description, - ActionsGuide, -} - pub struct FloatingText { pub src: Vec, max_line_width: usize, v_scroll: usize, h_scroll: usize, - mode_title: &'static str, + mode_title: String, } macro_rules! style { @@ -133,7 +127,7 @@ fn get_lines_owned(s: &str) -> Vec { } impl FloatingText { - pub fn new(text: String, mode: FloatingTextMode) -> Self { + pub fn new(text: String, title: &str) -> Self { let src = get_lines(&text) .into_iter() .map(|s| s.to_string()) @@ -142,14 +136,14 @@ impl FloatingText { let max_line_width = max_width!(src); Self { src, - mode_title: Self::get_mode_title(mode), + mode_title: title.to_string(), max_line_width, v_scroll: 0, h_scroll: 0, } } - pub fn from_command(command: &Command, mode: FloatingTextMode) -> Option { + pub fn from_command(command: &Command, title: String) -> Option { let (max_line_width, src) = match command { Command::Raw(cmd) => { // just apply highlights directly @@ -172,21 +166,13 @@ impl FloatingText { Some(Self { src, - mode_title: Self::get_mode_title(mode), + mode_title: title, max_line_width, h_scroll: 0, v_scroll: 0, }) } - fn get_mode_title(mode: FloatingTextMode) -> &'static str { - match mode { - FloatingTextMode::Preview => "Command Preview", - FloatingTextMode::Description => "Command Description", - FloatingTextMode::ActionsGuide => "Important Actions Guide", - } - } - fn scroll_down(&mut self) { if self.v_scroll + 1 < self.src.len() { self.v_scroll += 1; @@ -217,7 +203,7 @@ impl FloatContent for FloatingText { // Define the Block with a border and background color let block = Block::default() .borders(Borders::ALL) - .title(self.mode_title) + .title(self.mode_title.clone()) .title_alignment(ratatui::layout::Alignment::Center) .title_style(Style::default().reversed()) .style(Style::default()); @@ -295,7 +281,7 @@ impl FloatContent for FloatingText { fn get_shortcut_list(&self) -> ShortcutList { ShortcutList { - scope_name: self.mode_title, + scope_name: self.mode_title.clone(), hints: vec![ Shortcut::new(vec!["j", "Down"], "Scroll down"), Shortcut::new(vec!["k", "Up"], "Scroll up"), diff --git a/tui/src/hint.rs b/tui/src/hint.rs index e59eab5a..a6cbeb35 100644 --- a/tui/src/hint.rs +++ b/tui/src/hint.rs @@ -11,7 +11,7 @@ use crate::state::{AppState, Focus}; pub const SHORTCUT_LINES: usize = 2; pub struct ShortcutList { - pub scope_name: &'static str, + pub scope_name: String, pub hints: Vec, } @@ -114,7 +114,7 @@ fn get_list_item_shortcut(state: &AppState) -> Vec { pub fn draw_shortcuts(state: &AppState, frame: &mut Frame, area: Rect) { match state.focus { Focus::Search => ShortcutList { - scope_name: "Search bar", + scope_name: "Search bar".to_string(), hints: vec![Shortcut::new(vec!["Enter"], "Finish search")], }, @@ -146,13 +146,13 @@ pub fn draw_shortcuts(state: &AppState, frame: &mut Frame, area: Rect) { hints.push(Shortcut::new(vec!["Shift-Tab"], "Previous tab")); hints.push(Shortcut::new(vec!["g"], "Important actions guide")); ShortcutList { - scope_name: "Command list", + scope_name: "Command list".to_string(), hints, } } Focus::TabList => ShortcutList { - scope_name: "Tab list", + scope_name: "Tab list".to_string(), hints: vec![ Shortcut::new(vec!["q", "CTRL-c"], "Exit linutil"), Shortcut::new(vec!["l", "Right", "Enter"], "Focus action list"), diff --git a/tui/src/running_command.rs b/tui/src/running_command.rs index e1d4b0a0..598236cb 100644 --- a/tui/src/running_command.rs +++ b/tui/src/running_command.rs @@ -123,12 +123,12 @@ impl FloatContent for RunningCommand { fn get_shortcut_list(&self) -> ShortcutList { if self.is_finished() { ShortcutList { - scope_name: "Finished command", + scope_name: "Finished command".to_string(), hints: vec![Shortcut::new(vec!["Enter", "q"], "Close window")], } } else { ShortcutList { - scope_name: "Running command", + scope_name: "Running command".to_string(), hints: vec![Shortcut::new(vec!["CTRL-c"], "Kill the command")], } } diff --git a/tui/src/state.rs b/tui/src/state.rs index 4aee0aaa..46238716 100644 --- a/tui/src/state.rs +++ b/tui/src/state.rs @@ -1,7 +1,7 @@ use crate::{ filter::{Filter, SearchAction}, float::{Float, FloatContent}, - floating_text::{FloatingText, FloatingTextMode}, + floating_text::FloatingText, hint::{draw_shortcuts, SHORTCUT_LINES}, running_command::RunningCommand, theme::Theme, @@ -415,11 +415,11 @@ impl AppState { } } fn toggle_selection(&mut self) { - if let Some(command) = self.get_selected_command() { - if self.selected_commands.contains(&command) { - self.selected_commands.retain(|c| c != &command); + if let Some(list_node) = self.get_selected_list_node() { + if self.selected_commands.contains(&list_node.command) { + self.selected_commands.retain(|c| c != &list_node.command); } else { - self.selected_commands.push(command); + self.selected_commands.push(list_node.command); } } } @@ -470,12 +470,8 @@ impl AppState { } None } - pub fn get_selected_command(&self) -> Option { - self.get_selected_node().map(|node| node.command.clone()) - } - fn get_selected_description(&self) -> Option { - self.get_selected_node() - .map(|node| node.description.clone()) + pub fn get_selected_list_node(&self) -> Option { + self.get_selected_node().cloned() } pub fn go_to_selected_dir(&mut self) { let mut selected_index = self.selection.selected().unwrap_or(0); @@ -524,15 +520,17 @@ impl AppState { !self.at_root() && selected_index == 0 } fn enable_preview(&mut self) { - if let Some(command) = self.get_selected_command() { - if let Some(preview) = FloatingText::from_command(&command, FloatingTextMode::Preview) { + if let Some(list_node) = self.get_selected_list_node() { + let mut preview_title = "[Preview] - ".to_string(); + preview_title.push_str(list_node.name.as_str()); + if let Some(preview) = FloatingText::from_command(&list_node.command, preview_title) { self.spawn_float(preview, 80, 80); } } } fn enable_description(&mut self) { - if let Some(command_description) = self.get_selected_description() { - let description = FloatingText::new(command_description, FloatingTextMode::Description); + if let Some(list_node) = self.get_selected_list_node() { + let description = FloatingText::new(list_node.description, "Command Description"); self.spawn_float(description, 80, 80); } } @@ -540,8 +538,8 @@ impl AppState { fn handle_enter(&mut self) { if self.selected_item_is_cmd() { if self.selected_commands.is_empty() { - if let Some(cmd) = self.get_selected_command() { - self.selected_commands.push(cmd); + if let Some(list_node) = self.get_selected_list_node() { + self.selected_commands.push(list_node.command); } } let command = RunningCommand::new(self.selected_commands.clone()); @@ -576,7 +574,7 @@ impl AppState { fn toggle_task_list_guide(&mut self) { self.spawn_float( - FloatingText::new(ACTIONS_GUIDE.to_string(), FloatingTextMode::ActionsGuide), + FloatingText::new(ACTIONS_GUIDE.to_string(), "Important Actions Guide"), 80, 80, ); From 89bbc52712553274f1826889dc9398e654657102 Mon Sep 17 00:00:00 2001 From: JEEVITHA KANNAN K S Date: Sun, 29 Sep 2024 14:17:28 +0530 Subject: [PATCH 02/21] Remove quotes for packages --- core/tabs/system-setup/compile-setup.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/tabs/system-setup/compile-setup.sh b/core/tabs/system-setup/compile-setup.sh index 6345fc97..74a96a41 100755 --- a/core/tabs/system-setup/compile-setup.sh +++ b/core/tabs/system-setup/compile-setup.sh @@ -15,30 +15,30 @@ installDepend() { else printf "%b\n" "${GREEN}Multilib is already enabled.${RC}" fi - "$AUR_HELPER" -S --needed --noconfirm "$DEPENDENCIES" + "$AUR_HELPER" -S --needed --noconfirm $DEPENDENCIES ;; apt-get|nala) COMPILEDEPS='build-essential' "$ESCALATION_TOOL" "$PACKAGER" update "$ESCALATION_TOOL" dpkg --add-architecture i386 "$ESCALATION_TOOL" "$PACKAGER" update - "$ESCALATION_TOOL" "$PACKAGER" install -y "$DEPENDENCIES" "$COMPILEDEPS" + "$ESCALATION_TOOL" "$PACKAGER" install -y $DEPENDENCIES $COMPILEDEPS ;; dnf) COMPILEDEPS='@development-tools' "$ESCALATION_TOOL" "$PACKAGER" update "$ESCALATION_TOOL" "$PACKAGER" config-manager --set-enabled powertools - "$ESCALATION_TOOL" "$PACKAGER" install -y "$DEPENDENCIES" $COMPILEDEPS + "$ESCALATION_TOOL" "$PACKAGER" install -y $DEPENDENCIES $COMPILEDEPS "$ESCALATION_TOOL" "$PACKAGER" install -y glibc-devel.i686 libgcc.i686 ;; zypper) COMPILEDEPS='patterns-devel-base-devel_basis' "$ESCALATION_TOOL" "$PACKAGER" refresh - "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install "$DEPENDENCIES" "$COMPILEDEPS" + "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install $DEPENDENCIES $COMPILEDEPS "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install libgcc_s1-gcc7-32bit glibc-devel-32bit ;; *) - "$ESCALATION_TOOL" "$PACKAGER" install -y "$DEPENDENCIES" + "$ESCALATION_TOOL" "$PACKAGER" install -y $DEPENDENCIES ;; esac } From c3312dcc742775ca85c46ba40683c79776fee9a7 Mon Sep 17 00:00:00 2001 From: JEEVITHA KANNAN K S Date: Mon, 30 Sep 2024 14:36:49 +0530 Subject: [PATCH 03/21] Fix gaming setup deps --- core/tabs/system-setup/gaming-setup.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/tabs/system-setup/gaming-setup.sh b/core/tabs/system-setup/gaming-setup.sh index 86ad21aa..92c666c7 100755 --- a/core/tabs/system-setup/gaming-setup.sh +++ b/core/tabs/system-setup/gaming-setup.sh @@ -23,7 +23,7 @@ installDepend() { ncurses lib32-ncurses vulkan-icd-loader lib32-vulkan-icd-loader ocl-icd lib32-ocl-icd libva lib32-libva \ gst-plugins-base-libs lib32-gst-plugins-base-libs sdl2" - $AUR_HELPER -S --needed --noconfirm "$DEPENDENCIES" "$DISTRO_DEPS" + $AUR_HELPER -S --needed --noconfirm $DEPENDENCIES $DISTRO_DEPS ;; apt-get|nala) DISTRO_DEPS="libasound2 libsdl2 wine64 wine32" @@ -33,24 +33,24 @@ installDepend() { "$ESCALATION_TOOL" "$PACKAGER" install -y software-properties-common "$ESCALATION_TOOL" apt-add-repository contrib -y "$ESCALATION_TOOL" "$PACKAGER" update - "$ESCALATION_TOOL" "$PACKAGER" install -y "$DEPENDENCIES" "$DISTRO_DEPS" + "$ESCALATION_TOOL" "$PACKAGER" install -y $DEPENDENCIES $DISTRO_DEPS ;; dnf) if [ "$(rpm -E %fedora)" -le 41 ]; then "$ESCALATION_TOOL" "$PACKAGER" install ffmpeg ffmpeg-libs -y - "$ESCALATION_TOOL" "$PACKAGER" install -y "$DEPENDENCIES" + "$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" + "$ESCALATION_TOOL" "$PACKAGER" install -y $DEPENDENCIES fi ;; zypper) - "$ESCALATION_TOOL" "$PACKAGER" -n install "$DEPENDENCIES" + "$ESCALATION_TOOL" "$PACKAGER" -n install $DEPENDENCIES ;; *) - "$ESCALATION_TOOL" "$PACKAGER" install -y "$DEPENDENCIES" + "$ESCALATION_TOOL" "$PACKAGER" install -y $DEPENDENCIES ;; esac } @@ -59,7 +59,7 @@ installAdditionalDepend() { case "$PACKAGER" in pacman) DISTRO_DEPS='steam lutris goverlay' - "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm "$DISTRO_DEPS" + "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm $DISTRO_DEPS ;; apt-get|nala) version=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' https://github.com/lutris/lutris | From 05d869ef7491dc034d371bc12b5c1508936d481f Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Thu, 3 Oct 2024 00:05:31 +0200 Subject: [PATCH 04/21] fix: pacman orphan package removal --- core/tabs/system-setup/system-cleanup.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/tabs/system-setup/system-cleanup.sh b/core/tabs/system-setup/system-cleanup.sh index 198a9d68..3d376ba5 100644 --- a/core/tabs/system-setup/system-cleanup.sh +++ b/core/tabs/system-setup/system-cleanup.sh @@ -23,7 +23,8 @@ cleanup_system() { ;; pacman) "$ESCALATION_TOOL" "$PACKAGER" -Sc --noconfirm - "$ESCALATION_TOOL" "$PACKAGER" -Rns "$(pacman -Qtdq)" --noconfirm + # -Rns will return 1 if there are no packages provided + "$PACKAGER" -Qtdq | "$ESCALATION_TOOL" "$PACKAGER" -Rns --noconfirm -- &> /dev/null 2>&1 || true ;; *) printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" From a911fe1c168daff791b9a61d4e261ce423bd2988 Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Thu, 3 Oct 2024 00:14:06 +0200 Subject: [PATCH 05/21] missclick :( --- core/tabs/system-setup/system-cleanup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tabs/system-setup/system-cleanup.sh b/core/tabs/system-setup/system-cleanup.sh index 3d376ba5..cc14d0a4 100644 --- a/core/tabs/system-setup/system-cleanup.sh +++ b/core/tabs/system-setup/system-cleanup.sh @@ -24,7 +24,7 @@ cleanup_system() { pacman) "$ESCALATION_TOOL" "$PACKAGER" -Sc --noconfirm # -Rns will return 1 if there are no packages provided - "$PACKAGER" -Qtdq | "$ESCALATION_TOOL" "$PACKAGER" -Rns --noconfirm -- &> /dev/null 2>&1 || true + "$PACKAGER" -Qtdq | "$ESCALATION_TOOL" "$PACKAGER" -Rns --noconfirm - > /dev/null 2>&1 || true ;; *) printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" From 1c775048cb43733c2200b0f6d7f58767ef787de2 Mon Sep 17 00:00:00 2001 From: JEEVITHA KANNAN K S Date: Thu, 3 Oct 2024 11:43:48 +0530 Subject: [PATCH 06/21] Add vhs github action --- .github/workflows/linutil.yml | 22 ++++++++++++---------- docs/assets/preview.tape | 9 +++++---- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/linutil.yml b/.github/workflows/linutil.yml index e6d464da..4c58a08b 100644 --- a/.github/workflows/linutil.yml +++ b/.github/workflows/linutil.yml @@ -89,22 +89,24 @@ jobs: version: ${{ env.version }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Install vhs + - name: Setup Preview 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' + echo "$(pwd)/build" >> $GITHUB_PATH + + - name: Generate preview + uses: charmbracelet/vhs-action@v2.1.0 + with: + path: "docs/assets/preview.tape" + install-fonts: "true" - - name: Build the preview + - name: Move preview run: | - export PATH="$(pwd)/build:$PATH" - vhs docs/assets/preview.tape -o docs/assets/preview.gif + mv preview.gif docs/assets/preview.gif - - name: Upload the preview + - name: Upload 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() + if: success() \ No newline at end of file diff --git a/docs/assets/preview.tape b/docs/assets/preview.tape index ca2b59d7..66b1c359 100644 --- a/docs/assets/preview.tape +++ b/docs/assets/preview.tape @@ -61,13 +61,14 @@ Require linutil Require sh Set Shell "bash" -Set FontSize 32 -Set Width 3200 -Set Height 1800 +Set FontFamily "JetBrainsMono Nerd Font" +Set FontSize 24 +Set Width 1920 +Set Height 1080 Sleep 1s -Type "linutil -t compatible" Sleep 1s Enter +Type "linutil" Sleep 1s Enter Sleep 5s From e8fbd9e56ec348f3e54aa4a2d21d9bdb2c2983e8 Mon Sep 17 00:00:00 2001 From: Guru Swarupa <112751363+guruswarupa@users.noreply.github.com> Date: Thu, 3 Oct 2024 12:49:23 +0530 Subject: [PATCH 07/21] set resolution fix --- core/tabs/utils/tab_data.toml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/core/tabs/utils/tab_data.toml b/core/tabs/utils/tab_data.toml index 7cfc3ed7..ba7c0e1b 100644 --- a/core/tabs/utils/tab_data.toml +++ b/core/tabs/utils/tab_data.toml @@ -16,60 +16,66 @@ values = [":0", ":1", ":2", ":3", ":4", ":5", ":6", ":7", ":8", ":9"] [[data.entries]] name = "Auto Detect Displays" -description = "This utility is designed to detect and apply recommended configuration for monitors connected with your system" +description = "This script is designed to detect and apply recommended configuration for monitors connected with your system" script = "monitor-control/auto_detect_displays.sh" [[data.entries]] name = "Change Orientation" -description = "This utility is designed to change the orientation of monitors in your system" +description = "This script is designed to change the orientation of monitors in your system" script = "monitor-control/change_orientation.sh" [[data.entries]] name = "Disable Monitor" -description = "This utility is designed to disable a monitor in your system" +description = "This script is designed to disable a monitor in your system" script = "monitor-control/disable_monitor.sh" [[data.entries]] name = "Duplicate Displays" -description = "This utility is designed to duplicate display among multi-monitor setup in your system" +description = "This script is designed to duplicate display among multi-monitor setup in your system" script = "monitor-control/duplicate_displays.sh" [[data.entries]] name = "Enable Monitor" -description = "This utility is designed to enable a monitor in your system" +description = "This script is designed to enable a monitor in your system" script = "monitor-control/enable_monitor.sh" [[data.entries]] name = "Extend Displays" -description = "This utility is designed to extend display among multi-monitor setup in your system" +description = "This script is designed to extend display among multi-monitor setup in your system" script = "monitor-control/extend_displays.sh" [[data.entries]] name = "Manage Arrangement" -description = "This utility is designed to arrange monitors in multi-monitor setup in your system" +description = "This script is designed to arrange monitors in multi-monitor setup in your system" script = "monitor-control/manage_arrangement.sh" [[data.entries]] name = "Reset Scaling" -description = "This utility is designed to reset scaling of a monitor in your system" +description = "This script is designed to reset scaling of a monitor in your system" script = "monitor-control/reset_scaling.sh" matches = true [[data.entries]] name = "Scale Monitors" -description = "This utility is designed to change the scaling of monitors in your system" +description = "This script is designed to change the scaling of monitors in your system" script = "monitor-control/scale_monitor.sh" [[data.entries]] name = "Set Brightness" script = "monitor-control/set_brightness.sh" +description = "This script is designed to change the Brightness of monitors connected to your system" matches = true [[data.entries]] name = "Set Primary Monitor" -description = "This utility is designed to set a Primary monitor in your system" +description = "This script is designed to set a Primary monitor in your system" script = "monitor-control/set_primary_monitor.sh" +[[data.entries]] +name = "Set Resolution" +description = "This script is designed to change the resolution of monitors connected to your system" +script = "monitor-control/set_resolutions.sh" + [[data]] name = "User Account Manager" From 2f4f703fe666add40b5f84db8a501fc95bd755e1 Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Thu, 3 Oct 2024 12:13:46 +0200 Subject: [PATCH 08/21] suggestions by @nnyyxxxx Co-authored-by: nyx --- core/tabs/system-setup/system-cleanup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/tabs/system-setup/system-cleanup.sh b/core/tabs/system-setup/system-cleanup.sh index cc14d0a4..0a625913 100644 --- a/core/tabs/system-setup/system-cleanup.sh +++ b/core/tabs/system-setup/system-cleanup.sh @@ -23,8 +23,7 @@ cleanup_system() { ;; pacman) "$ESCALATION_TOOL" "$PACKAGER" -Sc --noconfirm - # -Rns will return 1 if there are no packages provided - "$PACKAGER" -Qtdq | "$ESCALATION_TOOL" "$PACKAGER" -Rns --noconfirm - > /dev/null 2>&1 || true + "$ESCALATION_TOOL" "$PACKAGER" -Rns $(pacman -Qtdq) --noconfirm > /dev/null 2>&1 ;; *) printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" From ec720050367512889f030d218f0bf07d0af70dc9 Mon Sep 17 00:00:00 2001 From: JEEVITHA KANNAN K S Date: Thu, 3 Oct 2024 23:54:32 +0530 Subject: [PATCH 09/21] Remove install fonts vhs action downloads jetbrains mono nf by default --- .github/workflows/linutil.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/linutil.yml b/.github/workflows/linutil.yml index 4c58a08b..53c43d02 100644 --- a/.github/workflows/linutil.yml +++ b/.github/workflows/linutil.yml @@ -97,7 +97,6 @@ jobs: uses: charmbracelet/vhs-action@v2.1.0 with: path: "docs/assets/preview.tape" - install-fonts: "true" - name: Move preview run: | From 6bec5f82837978a58f476dd6cc602d8aa568c984 Mon Sep 17 00:00:00 2001 From: Carter Canedy Date: Tue, 24 Sep 2024 09:08:05 -0700 Subject: [PATCH 10/21] make shellcheck emit all errors found and check for tab indentation --- .github/workflows/shellcheck.yml | 43 +++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index e91ad941..b8d03ab8 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -14,17 +14,42 @@ jobs: - uses: actions/checkout@v4 - run: git fetch origin ${{ github.base_ref }} - - name: Download and set up shellcheck + - name: Download, setup, and run ShellCheck + shell: bash {0} run : | - wget https://github.com/koalaman/shellcheck/releases/download/v0.10.0/shellcheck-v0.10.0.linux.x86_64.tar.xz - tar -xf shellcheck-v0.10.0.linux.x86_64.tar.xz - cd shellcheck-v0.10.0 - chmod +x shellcheck + SC_URL="https://github.com/koalaman/shellcheck/releases/download/v0.10.0/shellcheck-v0.10.0.linux.x86_64.tar.xz" + curl -fsSL "$SC_URL" | tar -Jx + chmod +x "./shellcheck-v0.10.0/shellcheck" - - name: Run shellcheck - run: | - for file in $(git diff --name-only origin/${{ github.base_ref }} HEAD core/tabs); do + error=0 + files_to_check=$(git diff --name-only origin/${{ github.base_ref }} HEAD core/tabs) + + for file in $files_to_check; do if [[ "$file" == *.sh ]] && [[ -f "$file" ]]; then - ./shellcheck-v0.10.0/shellcheck -S error "$file" + sc_output=$(./shellcheck-v0.10.0/shellcheck -fgcc -Serror "$file") + iter_safe_parsed_errors=$(echo -e "$sc_output" | sed -n 's/\(.\+\)\:\([0-9]\+\)\:\([0-9]\+\)\: \(.*\)/::error file=\1,line=\2,col=\3::\4/p' | sed 's/ /:space:/g') + + for error in $iter_safe_parsed_errors; do + echo "$error" | sed 's/:space:/ /g' + error=1 + done + + tabs_detected=$(grep -nP '^\t+\S+' "$file") + + # fast fail on the action runner would fail immediately if there weren't any tabs found + # this check makes sure that we don't continue if there's something really weird going on + if [ "$?" = "2" ]; then + echo "::error file=$file::There was a critical while grepping $file, aborting" + exit 1 + fi + + iter_safe_parsed_tabs_detected=$(echo "$tabs_detected" | sed -n 's,\([0-9]\+\).*,::error file='"$file"'\,line=\1::Found tab indentations,p' | sed 's/ /:space:/g') + + for error in $iter_safe_parsed_tabs_detected; do + echo "$error" | sed 's/:space:/ /g' + error=1 + done fi done + + exit $error From 73f6e24396e8392bf64f18857f18bbebf696f10f Mon Sep 17 00:00:00 2001 From: Carter Canedy Date: Wed, 2 Oct 2024 12:59:04 -0700 Subject: [PATCH 11/21] expand tabs with spaces --- .../Developer-tools/sublime-setup.sh | 62 +++++++++---------- core/tabs/system-setup/arch/server-setup.sh | 8 +-- start.sh | 4 +- 3 files changed, 37 insertions(+), 37 deletions(-) diff --git a/core/tabs/applications-setup/Developer-tools/sublime-setup.sh b/core/tabs/applications-setup/Developer-tools/sublime-setup.sh index 0bbe87b7..16c03497 100644 --- a/core/tabs/applications-setup/Developer-tools/sublime-setup.sh +++ b/core/tabs/applications-setup/Developer-tools/sublime-setup.sh @@ -3,37 +3,37 @@ . ../../common-script.sh installSublime() { - if ! command_exists sublime; then - printf "%b\n" "${YELLOW}Installing Sublime...${RC}" - case "$PACKAGER" in - apt-get|nala) - curl -fsSL https://download.sublimetext.com/sublimehq-pub.gpg | "$ESCALATION_TOOL" apt-key add - - echo "deb https://download.sublimetext.com/ apt/stable/" | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/sublime-text.list - "$ESCALATION_TOOL" "$PACKAGER" update - "$ESCALATION_TOOL" "$PACKAGER" install -y sublime-text - ;; - zypper) - "$ESCALATION_TOOL" rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg - "$ESCALATION_TOOL" "$PACKAGER" addrepo -g -f https://download.sublimetext.com/rpm/dev/x86_64/sublime-text.repo - "$ESCALATION_TOOL" "$PACKAGER" refresh - "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install sublime-text - ;; - pacman) - "$AUR_HELPER" -S --needed --noconfirm sublime-text-4 - ;; - dnf) - "$ESCALATION_TOOL" rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg - "$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo - "$ESCALATION_TOOL" "$PACKAGER" install -y sublime-text - ;; - *) - printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" - exit 1 - ;; - esac - else - printf "%b\n" "${GREEN}Sublime is already installed.${RC}" - fi + if ! command_exists sublime; then + printf "%b\n" "${YELLOW}Installing Sublime...${RC}" + case "$PACKAGER" in + apt-get|nala) + curl -fsSL https://download.sublimetext.com/sublimehq-pub.gpg | "$ESCALATION_TOOL" apt-key add - + echo "deb https://download.sublimetext.com/ apt/stable/" | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/sublime-text.list + "$ESCALATION_TOOL" "$PACKAGER" update + "$ESCALATION_TOOL" "$PACKAGER" install -y sublime-text + ;; + zypper) + "$ESCALATION_TOOL" rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg + "$ESCALATION_TOOL" "$PACKAGER" addrepo -g -f https://download.sublimetext.com/rpm/dev/x86_64/sublime-text.repo + "$ESCALATION_TOOL" "$PACKAGER" refresh + "$ESCALATION_TOOL" "$PACKAGER" --non-interactive install sublime-text + ;; + pacman) + "$AUR_HELPER" -S --needed --noconfirm sublime-text-4 + ;; + dnf) + "$ESCALATION_TOOL" rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg + "$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo + "$ESCALATION_TOOL" "$PACKAGER" install -y sublime-text + ;; + *) + printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" + exit 1 + ;; + esac + else + printf "%b\n" "${GREEN}Sublime is already installed.${RC}" + fi } diff --git a/core/tabs/system-setup/arch/server-setup.sh b/core/tabs/system-setup/arch/server-setup.sh index 4ae0afd6..e2600205 100755 --- a/core/tabs/system-setup/arch/server-setup.sh +++ b/core/tabs/system-setup/arch/server-setup.sh @@ -466,7 +466,7 @@ if [[ $TOTAL_MEM -lt 8000000 ]]; then mkswap /mnt/opt/swap/swapfile swapon /mnt/opt/swap/swapfile # The line below is written to /mnt/ but doesn't contain /mnt/, since it's just / for the system itself. - echo "/opt/swap/swapfile none swap sw 0 0" >> /mnt/etc/fstab # Add swap to fstab, so it KEEPS working after installation. + echo "/opt/swap/swapfile none swap sw 0 0" >> /mnt/etc/fstab # Add swap to fstab, so it KEEPS working after installation. fi gpu_type=$(lspci | grep -E "VGA|3D|Display") @@ -493,8 +493,8 @@ nc=$(grep -c ^processor /proc/cpuinfo) echo -ne " ------------------------------------------------------------------------- You have " $nc" cores. And - changing the makeflags for " $nc" cores. Aswell as - changing the compression settings. + changing the makeflags for " $nc" cores. Aswell as + changing the compression settings. ------------------------------------------------------------------------- " TOTAL_MEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*') @@ -670,4 +670,4 @@ sed -i 's/^%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: A # Add sudo rights sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers -EOF \ No newline at end of file +EOF diff --git a/start.sh b/start.sh index fd69cbec..3c412fb6 100755 --- a/start.sh +++ b/start.sh @@ -14,8 +14,8 @@ check() { exit 1 fi - unset exit_code - unset message + unset exit_code + unset message } findArch() { From 0e14d3a9dbbbf1291c0ef9956ffb7bd81fe7a7c2 Mon Sep 17 00:00:00 2001 From: JEEVITHA KANNAN K S Date: Fri, 4 Oct 2024 16:09:41 +0530 Subject: [PATCH 12/21] Add command_exists for snap --- core/tabs/system-setup/remove-snaps.sh | 44 ++++++++++++++------------ 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/core/tabs/system-setup/remove-snaps.sh b/core/tabs/system-setup/remove-snaps.sh index 6ea82934..03913ba7 100644 --- a/core/tabs/system-setup/remove-snaps.sh +++ b/core/tabs/system-setup/remove-snaps.sh @@ -3,27 +3,29 @@ . ../common-script.sh removeSnaps() { - case "$PACKAGER" in - pacman) - "$ESCALATION_TOOL" "$PACKAGER" -Rns snapd - ;; - apt-get|nala) - "$ESCALATION_TOOL" "$PACKAGER" autoremove --purge snapd - if [ "$ID" = ubuntu ]; then - "$ESCALATION_TOOL" apt-mark hold snapd - fi - ;; - dnf) - "$ESCALATION_TOOL" "$PACKAGER" remove snapd - ;; - zypper) - "$ESCALATION_TOOL" "$PACKAGER" remove snapd - ;; - *) - printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" - exit 1 - ;; - esac + if command_exists snap; then + case "$PACKAGER" in + pacman) + "$ESCALATION_TOOL" "$PACKAGER" -Rns snapd + ;; + apt-get|nala) + "$ESCALATION_TOOL" "$PACKAGER" autoremove --purge snapd + if [ "$ID" = ubuntu ]; then + "$ESCALATION_TOOL" apt-mark hold snapd + fi + ;; + dnf|zypper) + "$ESCALATION_TOOL" "$PACKAGER" remove snapd + ;; + *) + printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" + exit 1 + ;; + esac + printf "%b\n" "${GREEN}Successfully removed snaps...${RC}" + else + printf "%b\n" "${GREEN}Snap is not installed...${RC}" + fi } checkEnv From d462f41c8cb4a3f6283acb61889b7de85ce9501c Mon Sep 17 00:00:00 2001 From: JEEVITHA KANNAN K S Date: Fri, 4 Oct 2024 16:36:06 +0530 Subject: [PATCH 13/21] Update core/tabs/system-setup/remove-snaps.sh Co-authored-by: Nyx <144965845+nnyyxxxx@users.noreply.github.com> --- core/tabs/system-setup/remove-snaps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tabs/system-setup/remove-snaps.sh b/core/tabs/system-setup/remove-snaps.sh index 03913ba7..871679b5 100644 --- a/core/tabs/system-setup/remove-snaps.sh +++ b/core/tabs/system-setup/remove-snaps.sh @@ -24,7 +24,7 @@ removeSnaps() { esac printf "%b\n" "${GREEN}Successfully removed snaps...${RC}" else - printf "%b\n" "${GREEN}Snap is not installed...${RC}" + printf "%b\n" "${GREEN}Snapd is not installed...${RC}" fi } From 976d708c7f3fa15c23c7561d719913529ddd3e7a Mon Sep 17 00:00:00 2001 From: JEEVITHA KANNAN K S Date: Fri, 4 Oct 2024 22:59:28 +0530 Subject: [PATCH 14/21] Apply suggestions from code review Co-authored-by: Adam Perkowski --- core/tabs/system-setup/remove-snaps.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/tabs/system-setup/remove-snaps.sh b/core/tabs/system-setup/remove-snaps.sh index 871679b5..a46ef323 100644 --- a/core/tabs/system-setup/remove-snaps.sh +++ b/core/tabs/system-setup/remove-snaps.sh @@ -22,9 +22,9 @@ removeSnaps() { exit 1 ;; esac - printf "%b\n" "${GREEN}Successfully removed snaps...${RC}" + printf "%b\n" "${GREEN}Successfully removed snaps.${RC}" else - printf "%b\n" "${GREEN}Snapd is not installed...${RC}" + printf "%b\n" "${GREEN}Snapd is not installed.${RC}" fi } From af9453cc17dcf9bb69335ab1985b3295e7fac0e0 Mon Sep 17 00:00:00 2001 From: cartercanedy <99052281+cartercanedy@users.noreply.github.com> Date: Sat, 5 Oct 2024 19:45:06 -0700 Subject: [PATCH 15/21] fix grammar --- .github/workflows/shellcheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index b8d03ab8..6b1ad429 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -39,7 +39,7 @@ jobs: # fast fail on the action runner would fail immediately if there weren't any tabs found # this check makes sure that we don't continue if there's something really weird going on if [ "$?" = "2" ]; then - echo "::error file=$file::There was a critical while grepping $file, aborting" + echo "::error file=$file::There was a critical error while grepping $file, aborting" exit 1 fi From c02bee8a85288d46c803c64de7d2dc408fa3c2b5 Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Tue, 8 Oct 2024 03:41:32 +0200 Subject: [PATCH 16/21] =?UTF-8?q?=F0=9F=96=A5=EF=B8=8F=20refact(linutil.de?= =?UTF-8?q?sktop):=20executable=20paths=20(#782)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- linutil.desktop | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/linutil.desktop b/linutil.desktop index cb7963a5..877d4cf7 100755 --- a/linutil.desktop +++ b/linutil.desktop @@ -1,7 +1,8 @@ [Desktop Entry] Name=Linutil -Exec=sh -c "$HOME/.local/bin/linutil" +Comment=Distro-agnostic toolbox designed to simplify everyday Linux tasks +Exec=sh -c '/usr/bin/linutil || $HOME/.cargo/bin/linutil || linutil' Icon=utilities-terminal Type=Application Terminal=true -Categories=Utility; \ No newline at end of file +Categories=Utility; From f1ee0569c3cf42b939fe446850945f0bab85d4cf Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Tue, 8 Oct 2024 03:42:03 +0200 Subject: [PATCH 17/21] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20fix:=20ALL=20typos?= =?UTF-8?q?=20(#775)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- core/tabs/security/firewall-baselines.sh | 2 +- core/tabs/system-setup/arch/server-setup.sh | 6 +++--- core/tabs/system-setup/fedora/configure-dnf.sh | 2 +- .../system-setup/fedora/nvidia-proprietary-driver-setup.sh | 4 ++-- tui/src/state.rs | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 3c03bd87..f8aa0ea3 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ makepkg -si Replace `` with your preferred package. -If you use [yay](https://github.com/Jguer/yay), [paru](https://github.com/Morganamilo/paru) or any other [AUR Helper](https://wiki.archlinux.org/title/AUR_helpers), it's even simplier: +If you use [yay](https://github.com/Jguer/yay), [paru](https://github.com/Morganamilo/paru) or any other [AUR Helper](https://wiki.archlinux.org/title/AUR_helpers), it's even simpler: ```bash paru -S linutil diff --git a/core/tabs/security/firewall-baselines.sh b/core/tabs/security/firewall-baselines.sh index 7ddfeeeb..9c0810f4 100644 --- a/core/tabs/security/firewall-baselines.sh +++ b/core/tabs/security/firewall-baselines.sh @@ -30,7 +30,7 @@ configureUFW() { printf "%b\n" "${YELLOW}Allowing port 80/tcp (UFW)${RC}" "$ESCALATION_TOOL" ufw allow 80/tcp - printf "%b\n" "${YELLO}Allowing port 443/tcp (UFW)${RC}" + printf "%b\n" "${YELLOW}Allowing port 443/tcp (UFW)${RC}" "$ESCALATION_TOOL" ufw allow 443/tcp printf "%b\n" "${YELLOW}Denying Incoming Packets by Default(UFW)${RC}" diff --git a/core/tabs/system-setup/arch/server-setup.sh b/core/tabs/system-setup/arch/server-setup.sh index 4ae0afd6..743f6cd6 100755 --- a/core/tabs/system-setup/arch/server-setup.sh +++ b/core/tabs/system-setup/arch/server-setup.sh @@ -216,7 +216,7 @@ echo -ne " ------------------------------------------------------------------------ THIS WILL FORMAT AND DELETE ALL DATA ON THE DISK Please make sure you know what you are doing because - after formating your disk there is no way to get data back + after formatting your disk there is no way to get data back *****BACKUP YOUR DATA BEFORE CONTINUING***** ***I AM NOT RESPONSIBLE FOR ANY DATA LOSS*** ------------------------------------------------------------------------ @@ -328,7 +328,7 @@ echo -ne " pacman -S --noconfirm --needed gptfdisk btrfs-progs glibc echo -ne " ------------------------------------------------------------------------- - Formating Disk + Formatting Disk ------------------------------------------------------------------------- " umount -A --recursive /mnt # make sure everything is unmounted before we start @@ -670,4 +670,4 @@ sed -i 's/^%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: A # Add sudo rights sed -i 's/^# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers sed -i 's/^# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers -EOF \ No newline at end of file +EOF diff --git a/core/tabs/system-setup/fedora/configure-dnf.sh b/core/tabs/system-setup/fedora/configure-dnf.sh index b51c8b4c..977ea6d4 100644 --- a/core/tabs/system-setup/fedora/configure-dnf.sh +++ b/core/tabs/system-setup/fedora/configure-dnf.sh @@ -10,7 +10,7 @@ configureDNF() { echo "fastestmirror=True" | "$ESCALATION_TOOL" tee -a /etc/dnf/dnf.conf > /dev/null echo "defaultyes=True" | "$ESCALATION_TOOL" tee -a /etc/dnf/dnf.conf > /dev/null "$ESCALATION_TOOL" "$PACKAGER" -y install dnf-plugins-core - printf "%b\n" "${GREEN}DNF Configured Succesfully...${RC}" + printf "%b\n" "${GREEN}DNF Configured Successfully.${RC}" ;; *) printf "%b\n" "${RED}Unsupported distribution: $DTYPE${RC}" diff --git a/core/tabs/system-setup/fedora/nvidia-proprietary-driver-setup.sh b/core/tabs/system-setup/fedora/nvidia-proprietary-driver-setup.sh index 1e03a40f..e123e8f0 100755 --- a/core/tabs/system-setup/fedora/nvidia-proprietary-driver-setup.sh +++ b/core/tabs/system-setup/fedora/nvidia-proprietary-driver-setup.sh @@ -3,7 +3,7 @@ . ../../common-script.sh # This script allows user to download proprietary drivers for nvidia in fedora -# It also disables noveau nvidia drivers +# It also disables nouveau nvidia drivers # Installation guide link: https://rpmfusion.org/Howto/NVIDIA @@ -91,4 +91,4 @@ printf "%b\n" "${YELLOW}Warning! This script will enable Nvidia non-free reposit checkEnv checkEscalationTool -userConfirmation \ No newline at end of file +userConfirmation diff --git a/tui/src/state.rs b/tui/src/state.rs index 36865557..146f7f45 100644 --- a/tui/src/state.rs +++ b/tui/src/state.rs @@ -54,7 +54,7 @@ pub struct AppState { /// This stack keeps track of our "current directory". You can think of it as `pwd`. but not /// just the current directory, all paths that took us here, so we can "cd .." visit_stack: Vec, - /// This is the state asociated with the list widget, used to display the selection in the + /// This is the state associated with the list widget, used to display the selection in the /// widget selection: ListState, filter: Filter, From 49379a7edef967d113ea72faedb15ca0597ca1d0 Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Tue, 8 Oct 2024 03:43:47 +0200 Subject: [PATCH 18/21] =?UTF-8?q?=E2=9C=85=20ci:=20add=20a=20spellcheck=20?= =?UTF-8?q?typos=20CI=20(#776)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✅ ci: add a spellcheck typos CI * remove changes files check --- .github/workflows/typos.yml | 15 +++++++++++++++ _typos.toml | 7 +++++++ 2 files changed, 22 insertions(+) create mode 100644 .github/workflows/typos.yml create mode 100644 _typos.toml diff --git a/.github/workflows/typos.yml b/.github/workflows/typos.yml new file mode 100644 index 00000000..901d5e71 --- /dev/null +++ b/.github/workflows/typos.yml @@ -0,0 +1,15 @@ +name: Check for typos + +on: + [push, pull_request, workflow_dispatch] + +jobs: + check-typos: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - run: git fetch origin ${{ github.base_ref }} + + - name: Run spellcheck + uses: crate-ci/typos@v1.25.0 diff --git a/_typos.toml b/_typos.toml new file mode 100644 index 00000000..38770ffe --- /dev/null +++ b/_typos.toml @@ -0,0 +1,7 @@ +[files] +extend-exclude = ["tui/cool_tips.txt"] + +[default] +extend-ignore-identifiers-re = [ + "ratatui", +] From 1e92f48c61be1a0419fee4b0275a92db98d9e359 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 15:59:21 -0500 Subject: [PATCH 19/21] Bump tree-sitter-highlight from 0.23.0 to 0.24.2 (#780) Bumps [tree-sitter-highlight](https://github.com/tree-sitter/tree-sitter) from 0.23.0 to 0.24.2. - [Release notes](https://github.com/tree-sitter/tree-sitter/releases) - [Changelog](https://github.com/tree-sitter/tree-sitter/blob/master/CHANGELOG.md) - [Commits](https://github.com/tree-sitter/tree-sitter/compare/v0.23.0...v0.24.2) --- updated-dependencies: - dependency-name: tree-sitter-highlight dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 28 ++++++++++++++++++---------- tui/Cargo.toml | 2 +- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 81750251..4de535e9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -165,9 +165,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.18" +version = "1.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62ac837cdb5cb22e10a256099b4fc502b1dfe560cb282963a974d7abd80e476" +checksum = "2e80e3b6a3ab07840e1cae9b0666a63970dc28e8ed5ffbcdacbfc760c281bfc1" dependencies = [ "shlex", ] @@ -972,6 +972,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520" + [[package]] name = "strsim" version = "0.11.1" @@ -1028,18 +1034,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", "quote", @@ -1082,13 +1088,14 @@ dependencies = [ [[package]] name = "tree-sitter" -version = "0.23.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20f4cd3642c47a85052a887d86704f4eac272969f61b686bdd3f772122aabaff" +checksum = "23b84f60031bf8245b563a80c92c1034e557a914f7958f474bc0afa2eed78b98" dependencies = [ "cc", "regex", "regex-syntax", + "streaming-iterator", "tree-sitter-language", ] @@ -1104,12 +1111,13 @@ dependencies = [ [[package]] name = "tree-sitter-highlight" -version = "0.23.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395d7a477a4504fd7d5e4d003e0dd41bd5b9c4985d53592a943a8354ec452dae" +checksum = "5c727fb31f816c09fc54dc0e971d101318926866f7261b2acb820e84a61bf52d" dependencies = [ "lazy_static", "regex", + "streaming-iterator", "thiserror", "tree-sitter", ] diff --git a/tui/Cargo.toml b/tui/Cargo.toml index 662b7a17..a7f892b5 100644 --- a/tui/Cargo.toml +++ b/tui/Cargo.toml @@ -26,7 +26,7 @@ temp-dir = "0.1.14" unicode-width = "0.2.0" rand = { version = "0.8.5", optional = true } linutil_core = { path = "../core", version = "24.9.28" } -tree-sitter-highlight = "0.23.0" +tree-sitter-highlight = "0.24.2" tree-sitter-bash = "0.23.1" anstyle = "1.0.8" ansi-to-tui = "6.0.0" From cab73530fefe65a1ddcea4fe0329427f0807b61b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 16:00:01 -0500 Subject: [PATCH 20/21] Bump clap from 4.5.18 to 4.5.19 (#781) Bumps [clap](https://github.com/clap-rs/clap) from 4.5.18 to 4.5.19. - [Release notes](https://github.com/clap-rs/clap/releases) - [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md) - [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.18...clap_complete-v4.5.19) --- updated-dependencies: - dependency-name: clap dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- Cargo.lock | 8 ++++---- tui/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4de535e9..35864b5c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -194,9 +194,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.18" +version = "4.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3" +checksum = "7be5744db7978a28d9df86a214130d106a89ce49644cbc4e3f0c22c3fba30615" dependencies = [ "clap_builder", "clap_derive", @@ -204,9 +204,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.18" +version = "4.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b" +checksum = "a5fbc17d3ef8278f55b282b2a2e75ae6f6c7d4bb70ed3d0382375104bfafdb4b" dependencies = [ "anstream", "anstyle", diff --git a/tui/Cargo.toml b/tui/Cargo.toml index a7f892b5..ea777ffd 100644 --- a/tui/Cargo.toml +++ b/tui/Cargo.toml @@ -15,7 +15,7 @@ default = ["tips"] tips = ["rand"] [dependencies] -clap = { version = "4.5.18", features = ["derive"] } +clap = { version = "4.5.19", features = ["derive"] } crossterm = "0.28.1" ego-tree = { workspace = true } oneshot = "0.1.8" From e6172ccec79f98a39f5985676e7bb7262bea573e Mon Sep 17 00:00:00 2001 From: Adam Perkowski Date: Tue, 8 Oct 2024 23:02:34 +0200 Subject: [PATCH 21/21] =?UTF-8?q?=F0=9F=93=83=20fix(grub-theme):=20theme?= =?UTF-8?q?=20backup=20(#740)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * dir backup * - * suggestions by @nnyyxxxx Co-authored-by: nyx --------- Co-authored-by: nyx --- core/tabs/applications-setup/grub-theme.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/tabs/applications-setup/grub-theme.sh b/core/tabs/applications-setup/grub-theme.sh index d0b35420..9b79b39b 100644 --- a/core/tabs/applications-setup/grub-theme.sh +++ b/core/tabs/applications-setup/grub-theme.sh @@ -4,8 +4,12 @@ themeinstall(){ mkdir -p "$HOME/.local/share" - cd "$HOME/.local/share" && git clone "https://github.com/ChrisTitusTech/Top-5-Bootloader-Themes" - cd "$HOME/.local/share/Top-5-Bootloader-Themes" + cd "$HOME/.local/share" + if [ -d 'Top-5-Bootloader-Themes' ]; then + rm -rf 'Top-5-Bootloader-Themes' + fi + git clone "https://github.com/ChrisTitusTech/Top-5-Bootloader-Themes" + cd "Top-5-Bootloader-Themes" "$ESCALATION_TOOL" ./install.sh }