@@ -7,73 +7,25 @@ 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 lxappearance feh mate-polkit
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
11
11
;;
12
- apk)
13
- " $ESCALATION_TOOL " " $PACKAGER " add build-base libxinerama-dev libxft-dev imlib2-dev font-dejavu dbus-x11 git unzip flameshot feh polkit
14
- ;;
15
- apt-get|nala)
16
- " $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
17
- ;;
18
- dnf)
19
- " $ESCALATION_TOOL " " $PACKAGER " install -y " @development-tools" || " $ESCALATION_TOOL " " $PACKAGER " group install -y " Development Tools"
20
- " $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"
21
- ;;
22
- zypper)
23
- " $ESCALATION_TOOL " " $PACKAGER " install -y make libX11-devel libXinerama-devel libXft-devel imlib2-devel gcc
24
- ;;
25
- xbps-install)
26
- " $ESCALATION_TOOL " " $PACKAGER " -Sy base-devel freetype-devel fontconfig-devel imlib2-devel libXft-devel libXinerama-devel git unzip flameshot lxappearance feh mate-polkit
27
- ;;
28
- eopkg)
29
- " $ESCALATION_TOOL " " $PACKAGER " install -y -c system.devel
30
- " $ESCALATION_TOOL " " $PACKAGER " install -y libxcb-devel libxinerama-devel libxft-devel imlib2-devel git unzip flameshot lxappearance feh mate-polkit xcb-util-devel
31
- ;;
32
12
* )
33
13
printf " %b\n" " ${RED} Unsupported package manager: " " $PACKAGER " " ${RC} "
34
14
exit 1
35
15
;;
36
16
esac
37
17
}
38
18
39
- setupPicomDependencies () {
40
- printf " %b\n" " ${YELLOW} Installing Picom dependencies if not already installed${RC} "
41
-
42
- case " $PACKAGER " in
43
- pacman)
44
- " $ESCALATION_TOOL " " $PACKAGER " -S --needed --noconfirm libxcb meson libev uthash libconfig
45
- ;;
46
- apk)
47
- " $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
48
- ;;
49
- apt-get|nala)
50
- " $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
51
- ;;
52
- dnf)
53
- " $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
54
- ;;
55
- zypper)
56
- " $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
57
- ;;
58
- xbps-install)
59
- " $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
60
- ;;
61
- eopkg)
62
- " $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
63
- ;;
64
- * )
65
- printf " %b\n" " ${RED} Unsupported package manager: $PACKAGER ${RC} "
66
- exit 1
67
- ;;
68
- esac
69
-
70
- printf " %b\n" " ${GREEN} Picom dependencies installed successfully${RC} "
71
- }
72
-
73
19
makeDWM () {
74
- cd " $HOME " && git clone https://github.com/ChrisTitusTech/dwm-titus.git # CD to Home directory to install dwm-titus
75
- # This path can be changed (e.g. to linux-toolbox directory)
76
- cd dwm-titus/ # Hardcoded path, maybe not the best.
20
+ [ ! -d " $HOME /.local/share" ] && mkdir -p " $HOME /.local/share/"
21
+ if [ ! -d " $HOME /.local/share/dwm-titus" ]; then
22
+ printf " %b\n" " ${YELLOW} DWM-Titus not found, cloning repository...${RC} "
23
+ cd " $HOME /.local/share/" && 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)
24
+ cd dwm-titus/ # Hardcoded path, maybe not the best.
25
+ else
26
+ printf " %b\n" " ${GREEN} DWM-Titus directory already exists, replacing..${RC} "
27
+ cd " $HOME /.local/share/dwm-titus" && git pull
28
+ fi
77
29
" $ESCALATION_TOOL " make clean install # Run make clean install
78
30
}
79
31
@@ -97,7 +49,7 @@ install_nerd_font() {
97
49
printf " %b\n" " ${RED} Failed to create directory: $FONT_DIR ${RC} "
98
50
return 1
99
51
}
100
- else
52
+ fi
101
53
printf " %b\n" " ${YELLOW} Installing font '$FONT_NAME '${RC} "
102
54
# Change this URL to correspond with the correct font
103
55
FONT_URL=" https://github.com/ryanoasis/nerd-fonts/releases/latest/download/Meslo.zip"
@@ -110,46 +62,14 @@ install_nerd_font() {
110
62
fc-cache -fv
111
63
rm -rf " ${TEMP_DIR} "
112
64
printf " %b\n" " ${GREEN} '$FONT_NAME ' installed successfully.${RC} "
113
- fi
114
- }
115
-
116
- picom_animations () {
117
- # clone the repo into .local/share & use the -p flag to avoid overwriting that dir
118
- mkdir -p " $HOME /.local/share/"
119
- if [ ! -d " $HOME /.local/share/ftlabs-picom" ]; then
120
- if ! git clone https://github.com/FT-Labs/picom.git " $HOME /.local/share/ftlabs-picom" ; then
121
- printf " %b\n" " ${RED} Failed to clone the repository${RC} "
122
- return 1
123
- fi
124
- else
125
- printf " %b\n" " ${GREEN} Repository already exists, skipping clone${RC} "
126
- fi
127
-
128
- cd " $HOME /.local/share/ftlabs-picom" || { printf " %b\n" " ${RED} Failed to change directory to picom${RC} " ; return 1; }
129
-
130
- # Build the project
131
- if ! meson setup --buildtype=release build; then
132
- printf " %b\n" " ${RED} Meson setup failed${RC} "
133
- return 1
134
- fi
135
-
136
- if ! ninja -C build; then
137
- printf " %b\n" " ${RED} Ninja build failed${RC} "
138
- return 1
139
- fi
140
-
141
- # Install the built binary
142
- if ! " $ESCALATION_TOOL " ninja -C build install; then
143
- printf " %b\n" " ${RED} Failed to install the built binary${RC} "
144
- return 1
145
- fi
146
-
147
- printf " %b\n" " ${GREEN} Picom animations installed successfully${RC} "
148
65
}
149
66
150
67
clone_config_folders () {
151
68
# Ensure the target directory exists
152
69
[ ! -d ~ /.config ] && mkdir -p ~ /.config
70
+ [ ! -d ~ /.local/bin ] && mkdir -p ~ /.local/bin
71
+ # Copy scripts to local bin
72
+ cp -rf " $HOME /.local/share/dwm-titus/scripts/." " $HOME /.local/bin/"
153
73
154
74
# Iterate over all directories in config/*
155
75
for dir in config/* /; do
@@ -184,13 +104,11 @@ configure_backgrounds() {
184
104
# Check if the backgrounds directory (BG_DIR) exists
185
105
if [ ! -d " $BG_DIR " ]; then
186
106
# If the backgrounds directory doesn't exist, attempt to clone a repository containing backgrounds
187
- 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
188
108
# If the git clone command fails, print an error message and return with a status of 1
189
109
printf " %b\n" " ${RED} Failed to clone the repository${RC} "
190
110
return 1
191
111
fi
192
- # Rename the cloned directory to 'backgrounds'
193
- mv " $PIC_DIR /nord-background" " $PIC_DIR /backgrounds"
194
112
# Print a success message indicating that the backgrounds have been downloaded
195
113
printf " %b\n" " ${GREEN} Downloaded desktop backgrounds to $BG_DIR ${RC} "
196
114
else
@@ -205,24 +123,6 @@ setupDisplayManager() {
205
123
pacman)
206
124
" $ESCALATION_TOOL " " $PACKAGER " -S --needed --noconfirm xorg-xinit xorg-server
207
125
;;
208
- apk)
209
- " $ESCALATION_TOOL " setup-xorg-base
210
- ;;
211
- apt-get|nala)
212
- " $ESCALATION_TOOL " " $PACKAGER " install -y xorg xinit
213
- ;;
214
- dnf)
215
- " $ESCALATION_TOOL " " $PACKAGER " install -y xorg-x11-xinit xorg-x11-server-Xorg
216
- ;;
217
- zypper)
218
- " $ESCALATION_TOOL " " $PACKAGER " install -y xinit xorg-x11-server
219
- ;;
220
- xbps-install)
221
- " $ESCALATION_TOOL " " $PACKAGER " -Sy xorg-minimal
222
- ;;
223
- eopkg)
224
- " $ESCALATION_TOOL " " $PACKAGER " install -y xorg-server xinit
225
- ;;
226
126
* )
227
127
printf " %b\n" " ${RED} Unsupported package manager: $PACKAGER ${RC} "
228
128
exit 1
@@ -237,66 +137,19 @@ setupDisplayManager() {
237
137
break
238
138
fi
239
139
done
240
- printf " %b\n" " ${GREEN} Current display manager : $currentdm ${RC} "
140
+ printf " %b\n" " ${GREEN} Display Manager Setup : $currentdm ${RC} "
241
141
if [ " $currentdm " = " none" ]; then
242
142
printf " %b\n" " ${YELLOW} --------------------------${RC} "
243
- printf " %b\n" " ${YELLOW} Pick your Display Manager ${RC} "
244
- printf " %b\n" " ${YELLOW} 1. SDDM ${RC} "
245
- printf " %b\n" " ${YELLOW} 2. LightDM ${RC} "
246
- printf " %b\n" " ${YELLOW} 3. GDM ${RC} "
247
- printf " %b\n" " ${YELLOW} 4. None ${RC} "
248
- printf " %b" " ${YELLOW} Please select one: ${RC} "
249
- read -r choice
250
- case " $choice " in
251
- 1)
252
- DM=" sddm"
253
- ;;
254
- 2)
255
- DM=" lightdm"
256
- ;;
257
- 3)
258
- DM=" gdm"
259
- ;;
260
- 4)
261
- printf " %b\n" " ${GREEN} No display manager will be installed${RC} "
262
- return 0
263
- ;;
264
- * )
265
- printf " %b\n" " ${RED} Invalid selection! Please choose 1, 2, 3, or 4.${RC} "
266
- return 1
267
- ;;
268
- esac
143
+ DM=" sddm"
269
144
case " $PACKAGER " in
270
145
pacman)
271
146
" $ESCALATION_TOOL " " $PACKAGER " -S --needed --noconfirm " $DM "
272
147
if [ " $DM " = " lightdm" ]; then
273
148
" $ESCALATION_TOOL " " $PACKAGER " -S --needed --noconfirm lightdm-gtk-greeter
149
+ elif [ " $DM " = " sddm" ]; then
150
+ sh -c " $( curl -fsSL https://raw.githubusercontent.com/keyitdev/sddm-astronaut-theme/master/setup.sh) "
274
151
fi
275
152
;;
276
- apk)
277
- " $ESCALATION_TOOL " " $PACKAGER " add " $DM "
278
- if [ " $DM " = " lightdm" ]; then
279
- " $ESCALATION_TOOL " " $PACKAGER " add lightdm-gtk-greeter
280
- fi
281
- ;;
282
- apt-get|nala)
283
- " $ESCALATION_TOOL " " $PACKAGER " install -y " $DM "
284
- ;;
285
- dnf)
286
- " $ESCALATION_TOOL " " $PACKAGER " install -y " $DM "
287
- ;;
288
- zypper)
289
- " $ESCALATION_TOOL " " $PACKAGER " install -y " $DM "
290
- ;;
291
- xbps-install)
292
- " $ESCALATION_TOOL " " $PACKAGER " -Sy " $DM "
293
- if [ " $DM " = " lightdm" ]; then
294
- " $ESCALATION_TOOL " " $PACKAGER " -Sy lightdm-gtk-greeter
295
- fi
296
- ;;
297
- eopkg)
298
- " $ESCALATION_TOOL " " $PACKAGER " install -y " $DM "
299
- ;;
300
153
* )
301
154
printf " %b\n" " ${RED} Unsupported package manager: $PACKAGER ${RC} "
302
155
exit 1
@@ -308,35 +161,11 @@ setupDisplayManager() {
308
161
fi
309
162
}
310
163
311
- install_slstatus () {
312
- printf " Do you want to install slstatus? (y/N): "
313
- read -r response
314
- if [ " $response " = " y" ] || [ " $response " = " Y" ]; then
315
- printf " %b\n" " ${YELLOW} Installing slstatus${RC} "
316
- cd " $HOME /dwm-titus/slstatus" || {
317
- printf " %b\n" " ${RED} Failed to change directory to slstatus${RC} "
318
- return 1
319
- }
320
- if " $ESCALATION_TOOL " make clean install; then
321
- printf " %b\n" " ${GREEN} slstatus installed successfully${RC} "
322
- else
323
- printf " %b\n" " ${RED} Failed to install slstatus${RC} "
324
- return 1
325
- fi
326
- else
327
- printf " %b\n" " ${GREEN} Skipping slstatus installation${RC} "
328
- fi
329
- cd " $HOME "
330
- }
331
-
332
164
checkEnv
333
165
checkEscalationTool
334
166
setupDisplayManager
335
167
setupDWM
336
- setupPicomDependencies
337
168
makeDWM
338
- install_slstatus
339
169
install_nerd_font
340
- picom_animations
341
170
clone_config_folders
342
171
configure_backgrounds
0 commit comments