-
-
Notifications
You must be signed in to change notification settings - Fork 98
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·130 lines (109 loc) · 5.9 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·130 lines (109 loc) · 5.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/bin/bash
set -e
REPO_DIR="$(cd "$(dirname "$0")" && pwd)"
source "$REPO_DIR/scripts/dwm-utils.sh"
RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[1;33m' CYAN='\033[0;36m' NC='\033[0m'
info() { printf "${CYAN}[INFO]${NC} %s\n" "$1"; }
ok() { printf "${GREEN}[OK]${NC} %s\n" "$1"; }
warn() { printf "${YELLOW}[WARN]${NC} %s\n" "$1"; }
err() { printf "${RED}[ERROR]${NC} %s\n" "$1"; }
command -v pacman &>/dev/null || { err "This installer requires Arch Linux (pacman not found)."; exit 1; }
BG_DIR="$HOME/Pictures/backgrounds"
echo ""
echo "╔═══════════════════════════════════════════╗"
echo "║ dwm-titus Installer (Arch) ║"
echo "╚═══════════════════════════════════════════╝"
echo ""
info "Package manager: $PKG_CMD"
# ── Build dependencies ───────────────────────────────────
info "Installing build dependencies..."
install_packages base-devel libx11 libxft libxinerama imlib2 libxcb xcb-util freetype2 fontconfig
if pacman -Qq 2>/dev/null | grep -q '^xlibre'; then
info "Xlibre detected — skipping xorg-server."
elif ! pacman -Qi xorg-server &>/dev/null; then
install_packages xorg-server
fi
install_packages xorg-xinit xorg-xrandr xorg-xsetroot xorg-xset
ok "Build dependencies installed."
# ── Runtime dependencies ─────────────────────────────────
info "Installing runtime dependencies..."
install_packages rofi picom dunst feh flameshot dex mate-polkit alsa-utils git unzip xclip \
xorg-xprop thunar gvfs tumbler thunar-archive-plugin nwg-look xdg-user-dirs \
xdg-desktop-portal-gtk pipewire pavucontrol gnome-keyring networkmanager network-manager-applet \
libnotify rsync
ok "Runtime dependencies installed."
# ── Qt / GTK theming ─────────────────────────────────────
info "Installing Qt/GTK dark-mode dependencies..."
# dconf: required for gsettings to persist GTK color-scheme changes
# qt6ct / qt5ct: QT_QPA_PLATFORMTHEME backend for Qt dark mode in standalone WMs
install_packages dconf
install_packages qt6ct 2>/dev/null || install_packages qt5ct 2>/dev/null \
|| warn "Neither qt6ct nor qt5ct found in repos — Qt apps may not respect dark mode."
ok "Qt/GTK theming dependencies installed."
# ── Fonts ────────────────────────────────────────────────
info "Installing fonts..."
install_packages noto-fonts-emoji ttf-meslo-nerd
FONT_DIR="$HOME/.local/share/fonts"
mkdir -p "$FONT_DIR"
if [ -d "$REPO_DIR/config/polybar/fonts" ]; then
cp -r "$REPO_DIR/config/polybar/fonts/"* "$FONT_DIR/"
fc-cache -fv >/dev/null 2>&1
fi
ok "Fonts installed."
# ── Terminal emulator ────────────────────────────────────
terminal=""
for t in ghostty kitty alacritty; do command -v "$t" &>/dev/null && { terminal="$t"; break; }; done
if [ -n "$terminal" ]; then
ok "Terminal already installed: $terminal"
else
info "No supported terminal found — installing ghostty..."
install_packages ghostty 2>/dev/null || warn "ghostty not in repos — install from https://ghostty.org"
fi
# ── Polybar + XDG dirs + wallpapers ──────────────────────
install_packages polybar
command -v xdg-user-dirs-update &>/dev/null && xdg-user-dirs-update
mkdir -p "$HOME/Pictures"
if [ ! -d "$BG_DIR" ]; then
info "Downloading Nord wallpapers..."
git clone https://github.com/ChrisTitusTech/nord-background.git "$BG_DIR" 2>/dev/null \
&& ok "Wallpapers downloaded to $BG_DIR" \
|| warn "Failed to download wallpapers. Add your own to $BG_DIR."
else
ok "Wallpapers already present."
fi
# ── Display manager ──────────────────────────────────────
currentdm=""
for dm in lightdm sddm gdm; do command -v "$dm" &>/dev/null && { currentdm="$dm"; break; }; done
if [ -n "$currentdm" ]; then
ok "Display manager already installed: $currentdm"
else
info "No display manager found — installing LightDM..."
install_packages lightdm lightdm-slick-greeter
sudo systemctl enable lightdm
ok "LightDM installed and enabled."
fi
# ── LightDM greeter config ───────────────────────────────
if command -v lightdm &>/dev/null; then
info "Deploying LightDM GTK greeter config..."
sudo make -C "$REPO_DIR/lightdm" install
ok "LightDM config deployed."
fi
# ── Build & Install ──────────────────────────────────────
cd "$REPO_DIR"
sudo make clean install
# ── Done ─────────────────────────────────────────────────
echo ""
echo "╔═══════════════════════════════════════════╗"
echo "║ Installation Complete! ║"
echo "╚═══════════════════════════════════════════╝"
echo ""
info "Detected: $DISTRO_NAME"
echo " • Edit config.h to customize, then: make && sudo make install"
echo " • Log out and select 'dwm', or start with: startx"
echo ""
echo " SUPER+/ keybind viewer SUPER+X terminal"
echo " SUPER+F1 control center SUPER+R app launcher (rofi)"
echo " SUPER+Q close window"
echo ""
echo " Full reference: docs/src/keybinds.md or SUPER+/ in dwm"
echo ""