Skip to content

Commit 55e0bc0

Browse files
authored
Merge branch 'ChrisTitusTech:main' into feature/applications/vms
2 parents 9eabfcf + 60204ce commit 55e0bc0

23 files changed

+654
-215
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[workspace.package]
22
license = "MIT"
3-
version = "25.8.21"
3+
version = "25.9.12"
44
edition = "2021"
55

66
[workspace]

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[![Version](https://img.shields.io/github/v/release/ChrisTitusTech/linutil?color=%230567ff&label=Latest%20Release&style=for-the-badge)](https://github.com/ChrisTitusTech/linutil/releases/latest)
44
![GitHub Downloads (specific asset, all releases)](https://img.shields.io/github/downloads/ChrisTitusTech/linutil/linutil?label=Total%20Downloads&style=for-the-badge)
55
[![Crates.io Version](https://img.shields.io/crates/v/linutil_tui?style=for-the-badge&color=%23af3a03)](https://crates.io/crates/linutil_tui)
6+
[![](https://dcbadge.limes.pink/api/server/https://discord.gg/RUbZUZyByQ?theme=default-inverted&style=for-the-badge)](https://discord.gg/RUbZUZyByQ)
67
![Preview](/.github/preview.gif)
78

89
**Linutil** is a distro-agnostic toolbox designed to simplify everyday Linux tasks. It helps you set up applications and optimize your system for specific use cases. The utility is actively developed in Rust 🦀, providing performance and reliability.

core/tabs/applications-setup/browsers/firefox.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ installFirefox() {
77
printf "%b\n" "${YELLOW}Installing Mozilla Firefox...${RC}"
88
case "$PACKAGER" in
99
apt-get|nala)
10-
"$ESCALATION_TOOL" "$PACKAGER" install -y firefox-esr
10+
if [ "$DTYPE" != "ubuntu" ]; then
11+
"$ESCALATION_TOOL" "$PACKAGER" install -y firefox-esr
12+
fi
1113
;;
1214
zypper)
1315
"$ESCALATION_TOOL" "$PACKAGER" --non-interactive install MozillaFirefox

core/tabs/applications-setup/browsers/google-chrome.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ installChrome() {
99
apt-get|nala)
1010
curl -O https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
1111
"$ESCALATION_TOOL" "$PACKAGER" install -y ./google-chrome-stable_current_amd64.deb
12+
"$ESCALATION_TOOL" rm ./google-chrome-stable_current_amd64.deb
1213
;;
1314
zypper)
1415
"$ESCALATION_TOOL" "$PACKAGER" addrepo http://dl.google.com/linux/chrome/rpm/stable/x86_64 Google-Chrome

core/tabs/applications-setup/browsers/librewolf.sh

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,9 @@ installLibreWolf() {
77
printf "%b\n" "${YELLOW}Installing Librewolf...${RC}"
88
case "$PACKAGER" in
99
apt-get|nala)
10-
"$ESCALATION_TOOL" "$PACKAGER" install -y gnupg lsb-release apt-transport-https ca-certificates
11-
distro=$(if echo " una bookworm vanessa focal jammy bullseye vera uma " | grep -q "$(lsb_release -sc)"; then "$(lsb_release -sc)"; else echo 'focal'; fi)
12-
curl -fsSL https://deb.librewolf.net/keyring.gpg | "$ESCALATION_TOOL" gpg --dearmor -o /usr/share/keyrings/librewolf.gpg
13-
echo "Types: deb
14-
URIs: https://deb.librewolf.net
15-
Suites: $distro
16-
Components: main
17-
Architectures: amd64
18-
Signed-By: /usr/share/keyrings/librewolf.gpg" | "$ESCALATION_TOOL" tee /etc/apt/sources.list.d/librewolf.sources > /dev/null
19-
"$ESCALATION_TOOL" "$PACKAGER" update
20-
"$ESCALATION_TOOL" "$PACKAGER" install -y librewolf
10+
"$ESCALATION_TOOL" "$PACKAGER" update && "$ESCALATION_TOOL" "$PACKAGER" install -y extrepo
11+
"$ESCALATION_TOOL" extrepo enable librewolf
12+
"$ESCALATION_TOOL" "$PACKAGER" update && "$ESCALATION_TOOL" "$PACKAGER" install -y librewolf
2113
;;
2214
dnf)
2315
curl -fsSL https://rpm.librewolf.net/librewolf-repo.repo | pkexec tee /etc/yum.repos.d/librewolf.repo > /dev/null

core/tabs/applications-setup/communication-apps/discord-setup.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ installDiscord() {
99
apt-get|nala)
1010
curl -Lo discord.deb "https://discord.com/api/download?platform=linux&format=deb"
1111
"$ESCALATION_TOOL" "$PACKAGER" install -y discord.deb
12+
"$ESCALATION_TOOL" rm discord.deb
1213
;;
1314
zypper|eopkg)
1415
"$ESCALATION_TOOL" "$PACKAGER" install -y discord

core/tabs/applications-setup/communication-apps/telegram-setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ installTelegram() {
1919
"$ESCALATION_TOOL" "$PACKAGER" install -y telegram
2020
;;
2121
*)
22-
"$ESCALATION_TOOL" "$PACKAGER" install -y telegram-desktop
22+
flatpak install flathub --noninteractive org.telegram.desktop
2323
;;
2424
esac
2525
else

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

Lines changed: 19 additions & 190 deletions
Original file line numberDiff line numberDiff line change
@@ -7,73 +7,25 @@ setupDWM() {
77
printf "%b\n" "${YELLOW}Installing DWM-Titus...${RC}"
88
case "$PACKAGER" in # Install pre-Requisites
99
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
1111
;;
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-
;;
3212
*)
3313
printf "%b\n" "${RED}Unsupported package manager: ""$PACKAGER""${RC}"
3414
exit 1
3515
;;
3616
esac
3717
}
3818

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-
7319
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
7729
"$ESCALATION_TOOL" make clean install # Run make clean install
7830
}
7931

@@ -97,7 +49,7 @@ install_nerd_font() {
9749
printf "%b\n" "${RED}Failed to create directory: $FONT_DIR${RC}"
9850
return 1
9951
}
100-
else
52+
fi
10153
printf "%b\n" "${YELLOW}Installing font '$FONT_NAME'${RC}"
10254
# Change this URL to correspond with the correct font
10355
FONT_URL="https://github.com/ryanoasis/nerd-fonts/releases/latest/download/Meslo.zip"
@@ -110,46 +62,14 @@ install_nerd_font() {
11062
fc-cache -fv
11163
rm -rf "${TEMP_DIR}"
11264
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}"
14865
}
14966

15067
clone_config_folders() {
15168
# Ensure the target directory exists
15269
[ ! -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/"
15373

15474
# Iterate over all directories in config/*
15575
for dir in config/*/; do
@@ -184,13 +104,11 @@ configure_backgrounds() {
184104
# Check if the backgrounds directory (BG_DIR) exists
185105
if [ ! -d "$BG_DIR" ]; then
186106
# 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
188108
# If the git clone command fails, print an error message and return with a status of 1
189109
printf "%b\n" "${RED}Failed to clone the repository${RC}"
190110
return 1
191111
fi
192-
# Rename the cloned directory to 'backgrounds'
193-
mv "$PIC_DIR/nord-background" "$PIC_DIR/backgrounds"
194112
# Print a success message indicating that the backgrounds have been downloaded
195113
printf "%b\n" "${GREEN}Downloaded desktop backgrounds to $BG_DIR${RC}"
196114
else
@@ -205,24 +123,6 @@ setupDisplayManager() {
205123
pacman)
206124
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm xorg-xinit xorg-server
207125
;;
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-
;;
226126
*)
227127
printf "%b\n" "${RED}Unsupported package manager: $PACKAGER${RC}"
228128
exit 1
@@ -237,66 +137,19 @@ setupDisplayManager() {
237137
break
238138
fi
239139
done
240-
printf "%b\n" "${GREEN}Current display manager: $currentdm${RC}"
140+
printf "%b\n" "${GREEN}Display Manager Setup: $currentdm${RC}"
241141
if [ "$currentdm" = "none" ]; then
242142
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"
269144
case "$PACKAGER" in
270145
pacman)
271146
"$ESCALATION_TOOL" "$PACKAGER" -S --needed --noconfirm "$DM"
272147
if [ "$DM" = "lightdm" ]; then
273148
"$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)"
274151
fi
275152
;;
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-
;;
300153
*)
301154
printf "%b\n" "${RED}Unsupported package manager: $PACKAGER${RC}"
302155
exit 1
@@ -308,35 +161,11 @@ setupDisplayManager() {
308161
fi
309162
}
310163

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-
332164
checkEnv
333165
checkEscalationTool
334166
setupDisplayManager
335167
setupDWM
336-
setupPicomDependencies
337168
makeDWM
338-
install_slstatus
339169
install_nerd_font
340-
picom_animations
341170
clone_config_folders
342171
configure_backgrounds

0 commit comments

Comments
 (0)