|
#!/bin/bash |
|
|
|
set -e |
|
|
|
echo "===== BASE UTILITIES =====" |
|
sudo apt update |
|
sudo apt install -y curl wget git vim mousepad xdotool blueman libspa-0.2-bluetooth xfce4-xkb-plugin libnotify-bin make python3-venv python3-pip |
|
|
|
echo "===== FIREFOX (NON-SNAP) =====" |
|
sudo install -d -m 0755 /etc/apt/keyrings |
|
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | sudo tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null |
|
|
|
sudo tee /etc/apt/sources.list.d/mozilla.sources > /dev/null << EOF |
|
Types: deb |
|
URIs: https://packages.mozilla.org/apt |
|
Suites: mozilla |
|
Components: main |
|
Signed-By: /etc/apt/keyrings/packages.mozilla.org.asc |
|
EOF |
|
|
|
echo -e "Package: *\nPin: origin packages.mozilla.org\nPin-Priority: 1000" | sudo tee /etc/apt/preferences.d/mozilla |
|
echo -e "Package: firefox\nPin: release o=Ubuntu\nPin-Priority: -1" | sudo tee /etc/apt/preferences.d/block-snap-firefox |
|
|
|
echo "===== BRAVE =====" |
|
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg |
|
sudo curl -fsSLo /etc/apt/sources.list.d/brave-browser-release.sources https://brave-browser-apt-release.s3.brave.com/brave-browser.sources |
|
|
|
echo "===== VS CODE =====" |
|
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg |
|
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg |
|
|
|
sudo tee /etc/apt/sources.list.d/vscode.sources > /dev/null << EOF |
|
Types: deb |
|
URIs: https://packages.microsoft.com/repos/code |
|
Suites: stable |
|
Components: main |
|
Signed-By: /etc/apt/keyrings/packages.microsoft.gpg |
|
EOF |
|
|
|
rm -f packages.microsoft.gpg |
|
|
|
echo "===== INSTALLING PACKAGES =====" |
|
sudo apt update |
|
sudo apt install -y firefox brave-browser code |
|
|
|
echo "===== BLUETOOTH =====" |
|
sudo systemctl enable bluetooth.service |
|
sudo systemctl start bluetooth.service |
|
|
|
mkdir -p ~/.config/autostart |
|
cat > ~/.config/autostart/blueman-applet.desktop << 'EOF' |
|
[Desktop Entry] |
|
Type=Application |
|
Name=Blueman Applet |
|
Exec=blueman-applet |
|
Hidden=false |
|
NoDisplay=false |
|
X-GNOME-Autostart-enabled=true |
|
EOF |
|
|
|
echo "===== WIN+D SCRIPT =====" |
|
sudo tee /usr/local/bin/show-desktop > /dev/null << 'EOF' |
|
#!/bin/bash |
|
sleep 0.15 |
|
xdotool key --clearmodifiers Ctrl+Alt+d |
|
EOF |
|
|
|
sudo chmod +x /usr/local/bin/show-desktop |
|
|
|
echo "===== TOUCHPAD TOGGLE (F8) =====" |
|
sudo tee /usr/local/bin/toggle-touchpad > /dev/null << 'EOF' |
|
#!/bin/bash |
|
|
|
# Automatically find touchpad ID by name pattern |
|
TOUCHPAD_ID=$(xinput list | grep -i "touchpad" | grep -o "id=[0-9]*" | grep -o "[0-9]*" | head -1) |
|
|
|
# If no touchpad found, show error |
|
if [ -z "$TOUCHPAD_ID" ]; then |
|
notify-send "Touchpad" "Touchpad not found" -i error |
|
exit 1 |
|
fi |
|
|
|
# Get current state (1 = enabled, 0 = disabled) |
|
STATE=$(xinput list-props $TOUCHPAD_ID | grep "Device Enabled" | awk '{print $4}') |
|
|
|
if [ "$STATE" = "1" ]; then |
|
# If enabled → disable |
|
xinput disable $TOUCHPAD_ID |
|
notify-send "Touchpad" "Touchpad is now OFF" -i input-touchpad |
|
else |
|
# If disabled → enable |
|
xinput enable $TOUCHPAD_ID |
|
notify-send "Touchpad" "Touchpad is now ON" -i input-touchpad |
|
fi |
|
EOF |
|
|
|
sudo chmod +x /usr/local/bin/toggle-touchpad |
|
|
|
echo "===== RESTARTING AUDIO SERVER =====" |
|
systemctl --user restart pipewire 2>/dev/null || true |
|
systemctl --user restart pipewire-pulse 2>/dev/null || true |
|
sudo systemctl restart bluetooth |
|
|
|
echo "==========================================" |
|
echo "✅ ALL DONE!" |
|
echo "==========================================" |
|
echo "" |
|
echo "📌 NEXT STEPS (DO MANUALLY):" |
|
echo "" |
|
echo "1️⃣ Disable Win for Whisker Menu (remove Super L / Super R)" |
|
echo "2️⃣ Set up Win+D → /usr/local/bin/show-desktop" |
|
echo "3️⃣ Set up F8 → /usr/local/bin/toggle-touchpad" |
|
echo "4️⃣ Add Keyboard Layout indicator to panel" |
|
echo "5️⃣ Enable two-finger tap for right click" |
|
echo "6️⃣ Reboot your system" |
|
echo "" |
|
echo "📖 For detailed instructions, see 2_xubuntu26_min_manual.md" |
|
echo "==========================================" |