Compare commits

...

9 Commits

Author SHA1 Message Date
Jeevitha Kannan K S
b34940dc29
Merge fe6e9fbb7b70237b95199a7ed58656840a20dcc0 into e88020cff09f271af6361c43e60dbfdeaafb975a 2025-03-01 10:00:50 +05:45
Jaredy899
e88020cff0
fix nala remove (#1038) 2025-02-28 15:21:15 -06:00
Jaredy899
24eb977fd4
fix(dwm-titus): Multiple fixes (#1032)
* Update dwmtitus-setup.sh

* Update dwmtitus-setup.sh

* Update dwmtitus-setup.sh

* Update dwmtitus-setup.sh

* Update dwmtitus-setup.sh

* Update dwmtitus-setup.sh

* Update dwmtitus-setup.sh

* Update dwmtitus-setup.sh

* Update dwmtitus-setup.sh

* Update dwmtitus-setup.sh

* Update core/tabs/applications-setup/dwmtitus-setup.sh

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

* Update dwmtitus-setup.sh

* Update dwmtitus-setup.sh

* Update dwmtitus-setup.sh

* Update dwmtitus-setup.sh

* Update dwmtitus-setup.sh

* add apk

* Update dwmtitus-setup.sh

---------

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
2025-02-28 15:20:20 -06:00
Jaredy899
0fc8f07750
fix(compile-setup): dnf compile (#1028)
* fix compile for fedora, rocky, old fedoras

* Update compile-setup.sh

* Update compile-setup.sh

* Update compile-setup.sh

* Update compile-setup.sh

* Update core/tabs/system-setup/compile-setup.sh

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

* Update core/tabs/system-setup/compile-setup.sh

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

* Update compile-setup.sh

---------

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
2025-02-28 15:15:41 -06:00
Andrii
95e6c357d7
perf: increase rendering efficiency (#1017)
* Efficient rendering

* fix unused import

---------

Co-authored-by: Chris Titus <contact@christitus.com>
2025-02-28 15:11:50 -06:00
Sayeed Mahmood Evrenos
5f6e18b2cc
fix: remove redundant AVX2 check for Zen Browser installation (#1014)
This update removes the AVX2-specific logic from the installZenBrowser function. The Zen Browser team discontinued AVX2-optimized releases due to recurring build issues in GitHub workflows, so we now only install zen-browser-bin from AUR. This change streamlines the installation process.
2025-02-28 14:56:39 -06:00
Adam Perkowski
f2f997eb7f
ui: "unselect" the current tab when in search mode (#1003) 2025-02-28 14:53:23 -06:00
mateuszkozako
009c8b079a
feat(fastfetch-setup): shell integration setup (#1002)
* feat: add shell integration setup for fastfetch

* Update fastfetch-setup.sh - improved logic

* Update core/tabs/applications-setup/fastfetch-setup.sh

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

* Update core/tabs/applications-setup/fastfetch-setup.sh

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

* Update core/tabs/applications-setup/fastfetch-setup.sh

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

* Update core/tabs/applications-setup/fastfetch-setup.sh

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

* Update core/tabs/applications-setup/fastfetch-setup.sh

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

* Update fastfetch-setup.sh - added support for other shells

* Update fastfetch-setup.sh - fmt

* Refactor fastfetch-setup.sh for consistent indentation and formatting

---------

Co-authored-by: Adam Perkowski <adas1per@protonmail.com>
2025-02-28 14:50:57 -06:00
Angaddeep Singh
7f82c66475
refact(brave-install): simplify script (#980)
* simplifying Brave install

* Update brave.sh

---------

Co-authored-by: Angaddeep Singh <deepangad14@gmail.com>
2025-02-28 14:47:14 -06:00
9 changed files with 195 additions and 114 deletions

View File

@ -5,44 +5,7 @@
installBrave() { installBrave() {
if ! command_exists com.brave.Browser && ! command_exists brave; then if ! command_exists com.brave.Browser && ! command_exists brave; then
printf "%b\n" "${YELLOW}Installing Brave...${RC}" printf "%b\n" "${YELLOW}Installing Brave...${RC}"
case "$PACKAGER" in curl -fsS https://dl.brave.com/install.sh | sh
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y curl
"$ESCALATION_TOOL" curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main" | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/brave-browser-release.list
"$ESCALATION_TOOL" "$PACKAGER" update
"$ESCALATION_TOOL" "$PACKAGER" install -y brave-browser
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" install -y curl
"$ESCALATION_TOOL" rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
"$ESCALATION_TOOL" "$PACKAGER" addrepo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
"$ESCALATION_TOOL" "$PACKAGER" refresh
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install brave-browser
;;
pacman)
"$AUR_HELPER" -S --needed --noconfirm brave-bin
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y dnf-plugins-core
dnf_version=$(dnf --version | head -n 1 | cut -d '.' -f 1)
if [ "$dnf_version" -eq 4 ]; then
"$ESCALATION_TOOL" "$PACKAGER" config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
else
"$ESCALATION_TOOL" "$PACKAGER" config-manager addrepo --from-repofile=https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
fi
"$ESCALATION_TOOL" rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
"$ESCALATION_TOOL" "$PACKAGER" install -y brave-browser
;;
apk)
checkFlatpak
flatpak install -y flathub com.brave.Browser
;;
*)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1
;;
esac
else else
printf "%b\n" "${GREEN}Brave Browser is already installed.${RC}" printf "%b\n" "${GREEN}Brave Browser is already installed.${RC}"
fi fi
@ -50,5 +13,4 @@ installBrave() {
checkEnv checkEnv
checkEscalationTool checkEscalationTool
checkAURHelper
installBrave installBrave

View File

@ -7,11 +7,7 @@ installZenBrowser() {
printf "%b\n" "${YELLOW}Installing Zen Browser...${RC}" printf "%b\n" "${YELLOW}Installing Zen Browser...${RC}"
case "$PACKAGER" in case "$PACKAGER" in
pacman) pacman)
if grep -q avx2 /proc/cpuinfo; then "$AUR_HELPER" -S --needed --noconfirm zen-browser-bin
"$AUR_HELPER" -S --needed --noconfirm zen-browser-avx2-bin
else
"$AUR_HELPER" -S --needed --noconfirm zen-browser-bin
fi
;; ;;
*) *)
checkFlatpak checkFlatpak

View File

@ -1,20 +1,27 @@
#!/bin/sh -e #!/bin/sh
. ../common-script.sh . ../common-script.sh
. ../common-service-script.sh
setupDWM() { setupDWM() {
printf "%b\n" "${YELLOW}Installing DWM-Titus...${RC}" printf "%b\n" "${YELLOW}Installing DWM-Titus...${RC}"
case "$PACKAGER" in # Install pre-Requisites case "$PACKAGER" in # Install pre-Requisites
pacman) pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm base-devel libx11 libxinerama libxft imlib2 libxcb git unzip flameshot lxappearance feh mate-polkit meson libev uthash libconfig "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm base-devel libx11 libxinerama libxft imlib2 git unzip flameshot lxappearance feh mate-polkit
;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" add build-base libxinerama-dev libxft-dev imlib2-dev font-dejavu dbus-x11 git unzip flameshot feh polkit
;; ;;
apt-get|nala) apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y build-essential libx11-dev libxinerama-dev libxft-dev libimlib2-dev libx11-xcb-dev libfontconfig1 libx11-6 libxft2 libxinerama1 libxcb-res0-dev git unzip flameshot lxappearance feh mate-polkit "$ESCALATION_TOOL" "$PACKAGER" install -y build-essential libx11-dev libxinerama-dev libxft-dev libimlib2-dev libx11-xcb-dev libfontconfig1 libx11-6 libxft2 libxinerama1 libxcb-res0-dev git unzip flameshot lxappearance feh mate-polkit
;; ;;
dnf) dnf)
"$ESCALATION_TOOL" "$PACKAGER" groupinstall -y "Development Tools" "$ESCALATION_TOOL" "$PACKAGER" install -y "@development-tools" || "$ESCALATION_TOOL" "$PACKAGER" group install -y "Development Tools"
"$ESCALATION_TOOL" "$PACKAGER" install -y libX11-devel libXinerama-devel libXft-devel imlib2-devel libxcb-devel unzip flameshot lxappearance feh mate-polkit # no need to include git here as it should be already installed via "Development Tools" "$ESCALATION_TOOL" "$PACKAGER" install -y libX11-devel libXinerama-devel libXft-devel imlib2-devel libxcb-devel unzip flameshot lxappearance feh mate-polkit # no need to include git here as it should be already installed via "Development Tools"
;; ;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" install -y make libX11-devel libXinerama-devel libXft-devel imlib2-devel gcc
;;
*) *)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
exit 1 exit 1
@ -22,6 +29,34 @@ setupDWM() {
esac esac
} }
setupPicomDependencies() {
printf "%b\n" "${YELLOW}Installing Picom dependencies if not already installed${RC}"
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm libxcb meson libev uthash libconfig
;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" add libxcb-dev meson libev-dev uthash-dev libconfig-dev pixman-dev xcb-util-image-dev xcb-util-renderutil-dev pcre2-dev libepoxy-dev dbus-dev xcb-util-dev
;;
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y libxcb1-dev libxcb-res0-dev libconfig-dev libdbus-1-dev libegl-dev libev-dev libgl-dev libepoxy-dev libpcre2-dev libpixman-1-dev libx11-xcb-dev libxcb1-dev libxcb-composite0-dev libxcb-damage0-dev libxcb-dpms0-dev libxcb-glx0-dev libxcb-image0-dev libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-shape0-dev libxcb-util-dev libxcb-xfixes0-dev libxext-dev meson ninja-build uthash-dev
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y libxcb-devel dbus-devel gcc git libconfig-devel libdrm-devel libev-devel libX11-devel libX11-xcb libXext-devel libxcb-devel libGL-devel libEGL-devel libepoxy-devel meson pcre2-devel pixman-devel uthash-devel xcb-util-image-devel xcb-util-renderutil-devel xorg-x11-proto-devel xcb-util-devel
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" install -y libxcb-devel libxcb-devel dbus-1-devel gcc git libconfig-devel libdrm-devel libev-devel libX11-devel libX11-xcb1 libXext-devel libxcb-devel Mesa-libGL-devel Mesa-libEGL-devel libepoxy-devel meson pcre2-devel uthash-devel xcb-util-image-devel libpixman-1-0-devel xcb-util-renderutil-devel xcb-util-devel
;;
*)
printf "%b\n" "${RED}Unsupported package manager: $PACKAGER${RC}"
exit 1
;;
esac
printf "%b\n" "${GREEN}Picom dependencies installed successfully${RC}"
}
makeDWM() { makeDWM() {
cd "$HOME" && git clone https://github.com/ChrisTitusTech/dwm-titus.git # CD to Home directory to install dwm-titus cd "$HOME" && git clone https://github.com/ChrisTitusTech/dwm-titus.git # CD to Home directory to install dwm-titus
# This path can be changed (e.g. to linux-toolbox directory) # This path can be changed (e.g. to linux-toolbox directory)
@ -35,8 +70,7 @@ install_nerd_font() {
FONT_URL="https://github.com/ryanoasis/nerd-fonts/releases/latest/download/Meslo.zip" FONT_URL="https://github.com/ryanoasis/nerd-fonts/releases/latest/download/Meslo.zip"
FONT_INSTALLED=$(fc-list | grep -i "Meslo") FONT_INSTALLED=$(fc-list | grep -i "Meslo")
# Replace -n test with standard test if [ -n "$FONT_INSTALLED" ]; then
if [ ! -z "$FONT_INSTALLED" ]; then
printf "%b\n" "${GREEN}Meslo Nerd-fonts are already installed.${RC}" printf "%b\n" "${GREEN}Meslo Nerd-fonts are already installed.${RC}"
return 0 return 0
fi fi
@ -185,12 +219,18 @@ setupDisplayManager() {
pacman) pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm xorg-xinit xorg-server "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm xorg-xinit xorg-server
;; ;;
apk)
"$ESCALATION_TOOL" setup-xorg-base
;;
apt-get|nala) apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y xorg xinit "$ESCALATION_TOOL" "$PACKAGER" install -y xorg xinit
;; ;;
dnf) dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y xorg-x11-xinit xorg-x11-server-Xorg "$ESCALATION_TOOL" "$PACKAGER" install -y xorg-x11-xinit xorg-x11-server-Xorg
;; ;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" install -y xinit xorg-x11-server
;;
*) *)
printf "%b\n" "${RED}Unsupported package manager: $PACKAGER${RC}" printf "%b\n" "${RED}Unsupported package manager: $PACKAGER${RC}"
exit 1 exit 1
@ -200,44 +240,40 @@ setupDisplayManager() {
printf "%b\n" "${YELLOW}Setting up Display Manager${RC}" printf "%b\n" "${YELLOW}Setting up Display Manager${RC}"
currentdm="none" currentdm="none"
for dm in gdm sddm lightdm; do for dm in gdm sddm lightdm; do
if systemctl is-active --quiet "$dm.service"; then if command -v "$dm" >/dev/null 2>&1 || isServiceActive "$dm"; then
currentdm="$dm" currentdm="$dm"
break break
fi fi
done done
printf "%b\n" "${GREEN}Current display manager: $currentdm${RC}" printf "%b\n" "${GREEN}Current display manager: $currentdm${RC}"
if [ "$currentdm" = "none" ]; then if [ "$currentdm" = "none" ]; then
while : ; do printf "%b\n" "${YELLOW}--------------------------${RC}"
printf "%b\n" "${YELLOW}--------------------------${RC}" printf "%b\n" "${YELLOW}Pick your Display Manager ${RC}"
printf "%b\n" "${YELLOW}Pick your Display Manager ${RC}" printf "%b\n" "${YELLOW}1. SDDM ${RC}"
printf "%b\n" "${YELLOW}1. SDDM ${RC}" printf "%b\n" "${YELLOW}2. LightDM ${RC}"
printf "%b\n" "${YELLOW}2. LightDM ${RC}" printf "%b\n" "${YELLOW}3. GDM ${RC}"
printf "%b\n" "${YELLOW}3. GDM ${RC}" printf "%b\n" "${YELLOW}4. None ${RC}"
printf "%b\n" "${YELLOW}4. None ${RC}" printf "%b" "${YELLOW}Please select one: ${RC}"
printf "%b" "${YELLOW}Please select one: ${RC}" read -r choice
read -r choice case "$choice" in
case "$choice" in 1)
1) DM="sddm"
DM="sddm" ;;
break 2)
;; DM="lightdm"
2) ;;
DM="lightdm" 3)
break DM="gdm"
;; ;;
3) 4)
DM="gdm" printf "%b\n" "${GREEN}No display manager will be installed${RC}"
break return 0
;; ;;
4) *)
printf "%b\n" "${GREEN}No display manager will be installed${RC}" printf "%b\n" "${RED}Invalid selection! Please choose 1, 2, 3, or 4.${RC}"
return 0 return 1
;; ;;
*) esac
printf "%b\n" "${RED}Invalid selection! Please choose 1, 2, 3, or 4.${RC}"
;;
esac
done
case "$PACKAGER" in case "$PACKAGER" in
pacman) pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm "$DM" "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm "$DM"
@ -245,29 +281,41 @@ setupDisplayManager() {
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm lightdm-gtk-greeter "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm lightdm-gtk-greeter
fi fi
;; ;;
apk)
"$ESCALATION_TOOL" "$PACKAGER" add "$DM"
if [ "$DM" = "lightdm" ]; then
"$ESCALATION_TOOL" "$PACKAGER" add lightdm-gtk-greeter
fi
;;
apt-get|nala) apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" install -y "$DM" "$ESCALATION_TOOL" "$PACKAGER" install -y "$DM"
;; ;;
dnf) dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y "$DM" "$ESCALATION_TOOL" "$PACKAGER" install -y "$DM"
;; ;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" install -y "$DM"
;;
*) *)
printf "%b\n" "${RED}Unsupported package manager: $PACKAGER${RC}" printf "%b\n" "${RED}Unsupported package manager: $PACKAGER${RC}"
exit 1 exit 1
;; ;;
esac esac
printf "%b\n" "${GREEN}$DM installed successfully${RC}" printf "%b\n" "${GREEN}$DM installed successfully${RC}"
systemctl enable "$DM" enableService "$DM"
fi fi
} }
install_slstatus() { 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 printf "Do you want to install slstatus? (y/N): "
read -r response # -r flag to prevent backslashes from being interpreted read -r response
if [ "$response" = "y" ] || [ "$response" = "Y" ]; then if [ "$response" = "y" ] || [ "$response" = "Y" ]; then
printf "%b\n" "${YELLOW}Installing slstatus${RC}" printf "%b\n" "${YELLOW}Installing slstatus${RC}"
cd "$HOME/dwm-titus/slstatus" || { printf "%b\n" "${RED}Failed to change directory to slstatus${RC}"; return 1; } cd "$HOME/dwm-titus/slstatus" || {
printf "%b\n" "${RED}Failed to change directory to slstatus${RC}"
return 1
}
if "$ESCALATION_TOOL" make clean install; then if "$ESCALATION_TOOL" make clean install; then
printf "%b\n" "${GREEN}slstatus installed successfully${RC}" printf "%b\n" "${GREEN}slstatus installed successfully${RC}"
else else
@ -284,6 +332,7 @@ checkEnv
checkEscalationTool checkEscalationTool
setupDisplayManager setupDisplayManager
setupDWM setupDWM
setupPicomDependencies
makeDWM makeDWM
install_slstatus install_slstatus
install_nerd_font install_nerd_font

View File

@ -6,20 +6,20 @@ installFastfetch() {
if ! command_exists fastfetch; then if ! command_exists fastfetch; then
printf "%b\n" "${YELLOW}Installing Fastfetch...${RC}" printf "%b\n" "${YELLOW}Installing Fastfetch...${RC}"
case "$PACKAGER" in case "$PACKAGER" in
pacman) pacman)
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm fastfetch "$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm fastfetch
;; ;;
apt-get|nala) apt-get | nala)
curl -sSLo /tmp/fastfetch.deb https://github.com/fastfetch-cli/fastfetch/releases/latest/download/fastfetch-linux-amd64.deb curl -sSLo /tmp/fastfetch.deb https://github.com/fastfetch-cli/fastfetch/releases/latest/download/fastfetch-linux-amd64.deb
"$ESCALATION_TOOL" "$PACKAGER" install -y /tmp/fastfetch.deb "$ESCALATION_TOOL" "$PACKAGER" install -y /tmp/fastfetch.deb
rm /tmp/fastfetch.deb rm /tmp/fastfetch.deb
;; ;;
apk) apk)
"$ESCALATION_TOOL" "$PACKAGER" add fastfetch "$ESCALATION_TOOL" "$PACKAGER" add fastfetch
;; ;;
*) *)
"$ESCALATION_TOOL" "$PACKAGER" install -y fastfetch "$ESCALATION_TOOL" "$PACKAGER" install -y fastfetch
;; ;;
esac esac
else else
printf "%b\n" "${GREEN}Fastfetch is already installed.${RC}" printf "%b\n" "${GREEN}Fastfetch is already installed.${RC}"
@ -35,7 +35,52 @@ setupFastfetchConfig() {
curl -sSLo "${HOME}/.config/fastfetch/config.jsonc" https://raw.githubusercontent.com/ChrisTitusTech/mybash/main/config.jsonc curl -sSLo "${HOME}/.config/fastfetch/config.jsonc" https://raw.githubusercontent.com/ChrisTitusTech/mybash/main/config.jsonc
} }
setupFastfetchShell() {
printf "%b\n" "${YELLOW}Configuring shell integration...${RC}"
current_shell=$(basename "$SHELL")
rc_file=""
case "$current_shell" in
"bash")
rc_file="$HOME/.bashrc"
;;
"zsh")
rc_file="$HOME/.zshrc"
;;
"fish")
rc_file="$HOME/.config/fish/config.fish"
;;
"nu")
rc_file="$HOME/.config/nushell/config.nu"
;;
*)
printf "%b\n" "${RED}$current_shell is not supported. Update your shell configuration manually.${RC}"
;;
esac
if [ ! -f "$rc_file" ]; then
printf "%b\n" "${RED}Shell config file $rc_file not found${RC}"
else
if grep -q "fastfetch" "$rc_file"; then
printf "%b\n" "${YELLOW}Fastfetch is already configured in $rc_file${RC}"
return 0
else
printf "%b" "${GREEN}Would you like to add fastfetch to $rc_file? [y/N] ${RC}"
read -r response
if [ "$response" = "y" ] || [ "$response" = "Y" ]; then
printf "\n# Run fastfetch on shell initialization\nfastfetch\n" >>"$rc_file"
printf "%b\n" "${GREEN}Added fastfetch to $rc_file${RC}"
else
printf "%b\n" "${YELLOW}Skipped adding fastfetch to shell config${RC}"
fi
fi
fi
}
checkEnv checkEnv
checkEscalationTool checkEscalationTool
installFastfetch installFastfetch
setupFastfetchConfig setupFastfetchConfig
setupFastfetchShell

View File

@ -25,11 +25,16 @@ installDepend() {
"$ESCALATION_TOOL" "$PACKAGER" install -y "$DEPENDENCIES" "$COMPILEDEPS" "$ESCALATION_TOOL" "$PACKAGER" install -y "$DEPENDENCIES" "$COMPILEDEPS"
;; ;;
dnf) dnf)
COMPILEDEPS='@development-tools' "$ESCALATION_TOOL" "$PACKAGER" update -y
"$ESCALATION_TOOL" "$PACKAGER" update if ! "$ESCALATION_TOOL" "$PACKAGER" config-manager --enable powertools 2>/dev/null; then
"$ESCALATION_TOOL" "$PACKAGER" config-manager --set-enabled powertools "$ESCALATION_TOOL" "$PACKAGER" config-manager --enable crb 2>/dev/null || true
"$ESCALATION_TOOL" "$PACKAGER" install -y "$DEPENDENCIES" "$COMPILEDEPS" fi
"$ESCALATION_TOOL" "$PACKAGER" install -y glibc-devel.i686 libgcc.i686 # shellcheck disable=SC2086
"$ESCALATION_TOOL" "$PACKAGER" -y install $DEPENDENCIES
if ! "$ESCALATION_TOOL" "$PACKAGER" -y group install "Development Tools" 2>/dev/null; then
"$ESCALATION_TOOL" "$PACKAGER" -y group install development-tools
fi
"$ESCALATION_TOOL" "$PACKAGER" -y install glibc-devel.i686 libgcc.i686
;; ;;
zypper) zypper)
COMPILEDEPS='patterns-devel-base-devel_basis' COMPILEDEPS='patterns-devel-base-devel_basis'

View File

@ -6,16 +6,17 @@ removeSnaps() {
if command_exists snap; then if command_exists snap; then
case "$PACKAGER" in case "$PACKAGER" in
pacman) pacman)
"$ESCALATION_TOOL" "$PACKAGER" -Rns snapd "$ESCALATION_TOOL" "$PACKAGER" -Rns snapd --noconfirm
;; ;;
apt-get|nala) apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" autoremove --purge snapd "$ESCALATION_TOOL" "$PACKAGER" remove --purge -y snapd
"$ESCALATION_TOOL" "$PACKAGER" autoremove -y
if [ "$ID" = ubuntu ]; then if [ "$ID" = ubuntu ]; then
"$ESCALATION_TOOL" apt-mark hold snapd "$ESCALATION_TOOL" apt-mark hold snapd
fi fi
;; ;;
dnf|zypper) dnf|zypper)
"$ESCALATION_TOOL" "$PACKAGER" remove snapd "$ESCALATION_TOOL" "$PACKAGER" remove -y snapd
;; ;;
*) *)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"

View File

@ -24,9 +24,11 @@ use ratatui::{
}, },
Terminal, Terminal,
}; };
use running_command::TERMINAL_UPDATED;
use state::AppState; use state::AppState;
use std::{ use std::{
io::{stdout, Result, Stdout}, io::{stdout, Result, Stdout},
sync::atomic::Ordering,
time::Duration, time::Duration,
}; };
@ -59,9 +61,14 @@ fn main() -> Result<()> {
fn run(terminal: &mut Terminal<CrosstermBackend<Stdout>>, state: &mut AppState) -> Result<()> { fn run(terminal: &mut Terminal<CrosstermBackend<Stdout>>, state: &mut AppState) -> Result<()> {
loop { loop {
terminal.draw(|frame| state.draw(frame)).unwrap();
// Wait for an event // Wait for an event
if !event::poll(Duration::from_millis(10))? { if !event::poll(Duration::from_millis(10))? {
if TERMINAL_UPDATED
.compare_exchange(true, false, Ordering::AcqRel, Ordering::Acquire)
.is_ok()
{
terminal.draw(|frame| state.draw(frame)).unwrap();
}
continue; continue;
} }
@ -84,5 +91,6 @@ fn run(terminal: &mut Terminal<CrosstermBackend<Stdout>>, state: &mut AppState)
} }
_ => {} _ => {}
} }
terminal.draw(|frame| state.draw(frame)).unwrap();
} }
} }

View File

@ -13,7 +13,10 @@ use ratatui::{
use std::{ use std::{
fs::File, fs::File,
io::{Result, Write}, io::{Result, Write},
sync::{Arc, Mutex}, sync::{
atomic::{AtomicBool, Ordering},
Arc, Mutex,
},
thread::JoinHandle, thread::JoinHandle,
}; };
use time::{macros::format_description, OffsetDateTime}; use time::{macros::format_description, OffsetDateTime};
@ -158,6 +161,7 @@ impl FloatContent for RunningCommand {
} }
} }
} }
pub static TERMINAL_UPDATED: AtomicBool = AtomicBool::new(true);
impl RunningCommand { impl RunningCommand {
pub fn new(commands: &[&Command]) -> Self { pub fn new(commands: &[&Command]) -> Self {
@ -217,6 +221,7 @@ impl RunningCommand {
// A buffer, shared between the thread that reads the command output, and the main tread. // A buffer, shared between the thread that reads the command output, and the main tread.
// The main thread only reads the contents // The main thread only reads the contents
let command_buffer: Arc<Mutex<Vec<u8>>> = Arc::new(Mutex::new(Vec::new())); let command_buffer: Arc<Mutex<Vec<u8>>> = Arc::new(Mutex::new(Vec::new()));
TERMINAL_UPDATED.store(true, Ordering::Release);
let reader_handle = { let reader_handle = {
// Arc is just a reference, so we can create an owned copy without any problem // Arc is just a reference, so we can create an owned copy without any problem
let command_buffer = command_buffer.clone(); let command_buffer = command_buffer.clone();
@ -233,8 +238,10 @@ impl RunningCommand {
// done, to minimise the time it is opened // done, to minimise the time it is opened
let command_buffer = mutex.as_mut().unwrap(); let command_buffer = mutex.as_mut().unwrap();
command_buffer.extend_from_slice(&buf[0..size]); command_buffer.extend_from_slice(&buf[0..size]);
TERMINAL_UPDATED.store(true, Ordering::Release);
// The mutex is closed here automatically // The mutex is closed here automatically
} }
TERMINAL_UPDATED.store(true, Ordering::Release);
}) })
}; };

View File

@ -345,16 +345,24 @@ impl AppState {
.map(|tab| tab.name.as_str()) .map(|tab| tab.name.as_str())
.collect::<Vec<_>>(); .collect::<Vec<_>>();
let tab_hl_style = if let Focus::TabList = self.focus { let (tab_hl_style, highlight_symbol) = if let Focus::TabList = self.focus {
Style::default().reversed().fg(self.theme.tab_color()) (
Style::default().reversed().fg(self.theme.tab_color()),
self.theme.tab_icon(),
)
} else if let Focus::Search = self.focus {
(Style::reset(), " ")
} else { } 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) let tab_list = List::new(tabs)
.block(Block::bordered().border_set(border::ROUNDED)) .block(Block::bordered().border_set(border::ROUNDED))
.highlight_style(tab_hl_style) .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); frame.render_stateful_widget(tab_list, left_chunks[1], &mut self.current_tab);
let chunks = let chunks =