Update dwmtitus-setup.sh

This commit is contained in:
Jaredy899 2025-02-15 00:04:18 -05:00 committed by GitHub
parent bb11a12bad
commit edf5ccdd93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,7 +13,7 @@ setupDWM() {
;; ;;
dnf) dnf)
"$ESCALATION_TOOL" "$PACKAGER" install -y "@development-tools" || "$ESCALATION_TOOL" "$PACKAGER" group install -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 meson # no need to include git here as it should be already installed via "Development Tools"
;; ;;
*) *)
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}" printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
@ -22,6 +22,31 @@ 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
;;
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,7 +60,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 # Check if Meslo Nerd-font is already installed
if [ -n "$FONT_INSTALLED" ]; then if [ -n "$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
@ -207,37 +232,29 @@ setupDisplayManager() {
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} ${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) *)
DM="gdm" printf "%b\n" "${RED}Invalid selection! Please choose 1, 2, or 3.${RC}"
break exit 1
;; ;;
4) esac
printf "%b\n" "${GREEN}No display manager will be installed${RC}"
return 0
;;
*)
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"
@ -284,6 +301,7 @@ checkEnv
checkEscalationTool checkEscalationTool
setupDisplayManager setupDisplayManager
setupDWM setupDWM
setupPicomDependencies
makeDWM makeDWM
install_slstatus install_slstatus
install_nerd_font install_nerd_font