@@ -7,70 +7,15 @@ setupDWM() {
7
7
printf " %b\n" " ${YELLOW} Installing DWM-Titus...${RC} "
8
8
case " $PACKAGER " in # Install pre-Requisites
9
9
pacman)
10
- " $ESCALATION_TOOL " " $PACKAGER " -S --needed --noconfirm base-devel libx11 libxinerama libxft imlib2 git unzip flameshot nwg-look feh mate-polkit alsa-utils ghostty rofi xclip xarchiver thunar tumbler tldr gvfs thunar-archive-plugin dunst feh nwg-look
11
-
12
- ;;
13
- apk)
14
- " $ESCALATION_TOOL " " $PACKAGER " add build-base libxinerama-dev libxft-dev imlib2-dev font-dejavu dbus-x11 git unzip flameshot feh polkit
15
- ;;
16
- apt-get|nala)
17
- " $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 nwg-look feh mate-polkit
18
- ;;
19
- dnf)
20
- " $ESCALATION_TOOL " " $PACKAGER " install -y " @development-tools" || " $ESCALATION_TOOL " " $PACKAGER " group install -y " Development Tools"
21
- " $ESCALATION_TOOL " " $PACKAGER " install -y libX11-devel libXinerama-devel libXft-devel imlib2-devel libxcb-devel unzip flameshot nwg-look feh mate-polkit # no need to include git here as it should be already installed via "Development Tools"
10
+ " $ESCALATION_TOOL " " $PACKAGER " -S --needed --noconfirm base-devel libx11 libxinerama libxft imlib2 git unzip flameshot nwg-look feh mate-polkit alsa-utils ghostty rofi xclip xarchiver thunar tumbler tldr gvfs thunar-archive-plugin dunst feh nwg-look dex xscreensaver xorg-xprop polybar picom xdg-user-dirs xdg-desktop-portal-gtk pipewire pavucontrol gnome-keyring flatpak
22
11
;;
23
- zypper)
24
- " $ESCALATION_TOOL " " $PACKAGER " install -y make libX11-devel libXinerama-devel libXft-devel imlib2-devel gcc
25
- ;;
26
- xbps-install)
27
- " $ESCALATION_TOOL " " $PACKAGER " -Sy base-devel freetype-devel fontconfig-devel imlib2-devel libXft-devel libXinerama-devel git unzip flameshot nwg-look feh mate-polkit
28
- ;;
29
- eopkg)
30
- " $ESCALATION_TOOL " " $PACKAGER " install -y -c system.devel
31
- " $ESCALATION_TOOL " " $PACKAGER " install -y libxcb-devel libxinerama-devel libxft-devel imlib2-devel git unzip flameshot nwg-look feh mate-polkit xcb-util-devel
32
- ;;
33
12
* )
34
13
printf " %b\n" " ${RED} Unsupported package manager: " " $PACKAGER " " ${RC} "
35
14
exit 1
36
15
;;
37
16
esac
38
17
}
39
18
40
- setupPicomDependencies () {
41
- printf " %b\n" " ${YELLOW} Installing Picom dependencies if not already installed${RC} "
42
-
43
- case " $PACKAGER " in
44
- pacman)
45
- " $ESCALATION_TOOL " " $PACKAGER " -S --needed --noconfirm libxcb meson libev uthash libconfig
46
- ;;
47
- apk)
48
- " $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
49
- ;;
50
- apt-get|nala)
51
- " $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
52
- ;;
53
- dnf)
54
- " $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
55
- ;;
56
- zypper)
57
- " $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
58
- ;;
59
- xbps-install)
60
- " $ESCALATION_TOOL " " $PACKAGER " -Sy meson libev-devel uthash libconfig-devel pixman-devel xcb-util-image-devel xcb-util-renderutil-devel pcre2-devel libepoxy-devel dbus-devel
61
- ;;
62
- eopkg)
63
- " $ESCALATION_TOOL " " $PACKAGER " install -y libxcb-devel meson libev-devel uthash-devel libconfig-devel pixman-devel xcb-util-image-devel xcb-util-renderutil-devel pcre2-devel libepoxy-devel dbus-devel xcb-util-devel
64
- ;;
65
- * )
66
- printf " %b\n" " ${RED} Unsupported package manager: $PACKAGER ${RC} "
67
- exit 1
68
- ;;
69
- esac
70
-
71
- printf " %b\n" " ${GREEN} Picom dependencies installed successfully${RC} "
72
- }
73
-
74
19
makeDWM () {
75
20
[ ! -d " $HOME /.local/share" ] && mkdir -p " $HOME /.local/share/"
76
21
if [ ! -d " $HOME /.local/share/dwm-titus" ]; then
@@ -119,40 +64,6 @@ install_nerd_font() {
119
64
printf " %b\n" " ${GREEN} '$FONT_NAME ' installed successfully.${RC} "
120
65
}
121
66
122
- picom_animations () {
123
- # clone the repo into .local/share & use the -p flag to avoid overwriting that dir
124
- [ ! -d " $HOME /.local/share" ] && mkdir -p " $HOME /.local/share/"
125
- if [ ! -d " $HOME /.local/share/ftlabs-picom" ]; then
126
- if ! git clone https://github.com/FT-Labs/picom.git " $HOME /.local/share/ftlabs-picom" ; then
127
- printf " %b\n" " ${RED} Failed to clone the repository${RC} "
128
- return 1
129
- fi
130
- else
131
- printf " %b\n" " ${GREEN} Repository already exists, skipping clone${RC} "
132
- fi
133
-
134
- cd " $HOME /.local/share/ftlabs-picom" || { printf " %b\n" " ${RED} Failed to change directory to picom${RC} " ; return 1; }
135
-
136
- # Build the project
137
- if ! meson setup --buildtype=release build; then
138
- printf " %b\n" " ${RED} Meson setup failed${RC} "
139
- return 1
140
- fi
141
-
142
- if ! ninja -C build; then
143
- printf " %b\n" " ${RED} Ninja build failed${RC} "
144
- return 1
145
- fi
146
-
147
- # Install the built binary
148
- if ! " $ESCALATION_TOOL " ninja -C build install; then
149
- printf " %b\n" " ${RED} Failed to install the built binary${RC} "
150
- return 1
151
- fi
152
-
153
- printf " %b\n" " ${GREEN} Picom animations installed successfully${RC} "
154
- }
155
-
156
67
clone_config_folders () {
157
68
# Ensure the target directory exists
158
69
[ ! -d ~ /.config ] && mkdir -p ~ /.config
@@ -193,13 +104,11 @@ configure_backgrounds() {
193
104
# Check if the backgrounds directory (BG_DIR) exists
194
105
if [ ! -d " $BG_DIR " ]; then
195
106
# If the backgrounds directory doesn't exist, attempt to clone a repository containing backgrounds
196
- if ! git clone https://github.com/ChrisTitusTech/nord-background.git " $PIC_DIR /nord-background " ; then
107
+ if ! git clone https://github.com/ChrisTitusTech/nord-background.git " $PIC_DIR /backgrounds " ; then
197
108
# If the git clone command fails, print an error message and return with a status of 1
198
109
printf " %b\n" " ${RED} Failed to clone the repository${RC} "
199
110
return 1
200
111
fi
201
- # Rename the cloned directory to 'backgrounds'
202
- mv " $PIC_DIR /nord-background" " $PIC_DIR /backgrounds"
203
112
# Print a success message indicating that the backgrounds have been downloaded
204
113
printf " %b\n" " ${GREEN} Downloaded desktop backgrounds to $BG_DIR ${RC} "
205
114
else
@@ -214,24 +123,6 @@ setupDisplayManager() {
214
123
pacman)
215
124
" $ESCALATION_TOOL " " $PACKAGER " -S --needed --noconfirm xorg-xinit xorg-server
216
125
;;
217
- apk)
218
- " $ESCALATION_TOOL " setup-xorg-base
219
- ;;
220
- apt-get|nala)
221
- " $ESCALATION_TOOL " " $PACKAGER " install -y xorg xinit
222
- ;;
223
- dnf)
224
- " $ESCALATION_TOOL " " $PACKAGER " install -y xorg-x11-xinit xorg-x11-server-Xorg
225
- ;;
226
- zypper)
227
- " $ESCALATION_TOOL " " $PACKAGER " install -y xinit xorg-x11-server
228
- ;;
229
- xbps-install)
230
- " $ESCALATION_TOOL " " $PACKAGER " -Sy xorg-minimal
231
- ;;
232
- eopkg)
233
- " $ESCALATION_TOOL " " $PACKAGER " install -y xorg-server xinit
234
- ;;
235
126
* )
236
127
printf " %b\n" " ${RED} Unsupported package manager: $PACKAGER ${RC} "
237
128
exit 1
@@ -259,30 +150,6 @@ setupDisplayManager() {
259
150
sh -c " $( curl -fsSL https://raw.githubusercontent.com/keyitdev/sddm-astronaut-theme/master/setup.sh) "
260
151
fi
261
152
;;
262
- apk)
263
- " $ESCALATION_TOOL " " $PACKAGER " add " $DM "
264
- if [ " $DM " = " lightdm" ]; then
265
- " $ESCALATION_TOOL " " $PACKAGER " add lightdm-gtk-greeter
266
- fi
267
- ;;
268
- apt-get|nala)
269
- " $ESCALATION_TOOL " " $PACKAGER " install -y " $DM "
270
- ;;
271
- dnf)
272
- " $ESCALATION_TOOL " " $PACKAGER " install -y " $DM "
273
- ;;
274
- zypper)
275
- " $ESCALATION_TOOL " " $PACKAGER " install -y " $DM "
276
- ;;
277
- xbps-install)
278
- " $ESCALATION_TOOL " " $PACKAGER " -Sy " $DM "
279
- if [ " $DM " = " lightdm" ]; then
280
- " $ESCALATION_TOOL " " $PACKAGER " -Sy lightdm-gtk-greeter
281
- fi
282
- ;;
283
- eopkg)
284
- " $ESCALATION_TOOL " " $PACKAGER " install -y " $DM "
285
- ;;
286
153
* )
287
154
printf " %b\n" " ${RED} Unsupported package manager: $PACKAGER ${RC} "
288
155
exit 1
@@ -294,35 +161,11 @@ setupDisplayManager() {
294
161
fi
295
162
}
296
163
297
- install_slstatus () {
298
- printf " Do you want to install slstatus? (y/N): "
299
- read -r response
300
- if [ " $response " = " y" ] || [ " $response " = " Y" ]; then
301
- printf " %b\n" " ${YELLOW} Installing slstatus${RC} "
302
- cd " $HOME /.local/share/dwm-titus/slstatus" || {
303
- printf " %b\n" " ${RED} Failed to change directory to slstatus${RC} "
304
- return 1
305
- }
306
- if " $ESCALATION_TOOL " make clean install; then
307
- printf " %b\n" " ${GREEN} slstatus installed successfully${RC} "
308
- else
309
- printf " %b\n" " ${RED} Failed to install slstatus${RC} "
310
- return 1
311
- fi
312
- else
313
- printf " %b\n" " ${GREEN} Skipping slstatus installation${RC} "
314
- fi
315
- cd " $HOME "
316
- }
317
-
318
164
checkEnv
319
165
checkEscalationTool
320
166
setupDisplayManager
321
167
setupDWM
322
- setupPicomDependencies
323
168
makeDWM
324
- install_slstatus
325
169
install_nerd_font
326
- picom_animations
327
170
clone_config_folders
328
171
configure_backgrounds
0 commit comments