From 65f26795bb4361e1c00c3b1e9422a045bebee1f3 Mon Sep 17 00:00:00 2001 From: Mayur Raut <95993675+RazoBeckett@users.noreply.github.com> Date: Sun, 15 Sep 2024 14:15:27 +0530 Subject: [PATCH] feat(dwmtitus-setup): add slstatus installation option Compiles and Installs slstatus --- tabs/applications-setup/dwmtitus-setup.sh | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+) mode change 100644 => 100755 tabs/applications-setup/dwmtitus-setup.sh diff --git a/tabs/applications-setup/dwmtitus-setup.sh b/tabs/applications-setup/dwmtitus-setup.sh old mode 100644 new mode 100755 index 8c0fc97a..743c8781 --- a/tabs/applications-setup/dwmtitus-setup.sh +++ b/tabs/applications-setup/dwmtitus-setup.sh @@ -295,11 +295,37 @@ setupDisplayManager() { } +install_slstatus() { + printf "Do you want to install slstatus? (y/n): " # using printf instead of 'echo' to avoid newline, -n flag for 'echo' is not supported in POSIX + read -r response # -r flag to prevent backslashes from being interpreted + case "$response" in + [Yy] | [Yy][Ee][Ss]) # Matches: Y, y, Yes, yes, YES, yEs, yeS, etc. + echo "Installing slstatus" + cd slstatus/ || { echo "Failed to change directory to slstatus"; return 1; } + if $ESCALATION_TOOL make clean install; then + echo "slstatus installed successfully" + else + echo "Failed to install slstatus" + return 1 + fi + ;; + [Nn] | [Nn][Oo]) # same logic as above, but for No + echo "Skipping slstatus installation" + ;; + *) + echo "Invalid input. Please enter y/yes or n/no." + install_slstatus + ;; + esac + cd .. +} + checkEnv checkEscalationTool setupDisplayManager setupDWM makeDWM +install_slstatus install_nerd_font clone_config_folders configure_backgrounds