Compare commits

..

5 Commits

  1. 11
      .config/swayr/config.toml
  2. 4
      .config/waybar/config.jsonc
  3. 30
      .dotfiles.d/init/ubuntu/init-sway.sh

11
.config/swayr/config.toml

@ -0,0 +1,11 @@
[menu]
executable = "fuzzel"
args = [
"--dmenu",
"--lines=20",
"--width=130",
"--prompt=Select window: "
]
[format]
window_format = " {app_name} │ PID: {pid} │ {name} "

4
.config/waybar/config.jsonc

@ -31,7 +31,7 @@
},
"custom/network": {
"exec": "/home/chodak/.config/waybar/network.py --icon-size 12pt",
"exec": "/home/chodylal/.config/waybar/network.py --icon-size 12pt",
"interval": 10,
"return-type": "json",
"tooltip": true
@ -83,7 +83,7 @@
]
},
"custom/disk": {
"exec": "/home/chodak/.config/waybar/disk.py --icon-size 10pt",
"exec": "/home/chodylal/.config/waybar/disk.py --icon-size 10pt",
"interval": 30,
"return-type": "json",
"tooltip": true,

30
.dotfiles.d/init/ubuntu/init-sway.sh

@ -10,7 +10,7 @@
#----------------------------------------------------------------
set -euo pipefail
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"
echo "[1/8] Updating apt..."
sudo apt update -y
@ -56,18 +56,6 @@ sudo apt install -y pipewire-audio pipewire-pulse wireplumber
echo "[4/8] Installing applications referenced by keybindings/workspace assignments..."
# firefox/thunderbird on Ubuntu 24.04+ are snap-transitioning deb packages,
# but they still work; missing ones here must not abort the script.
sudo apt install -y \
firefox \
thunar \
thunderbird \
telegram-desktop \
mpv \
virt-manager \
|| true
if command -v snap >/dev/null 2>&1; then
sudo snap install spotify || true
fi
echo "[5/8] Installing Sway wallpaper (not shipped in Ubuntu's sway package)..."
sudo mkdir -p /usr/share/backgrounds/sway
@ -83,27 +71,27 @@ if curl -fL -o /tmp/SourceSans3.zip \
else
# Fallback: variable font from the Google Fonts repository
curl -fL -o "$HOME/.local/share/fonts/SourceSans3/SourceSans3[wght].ttf" \
"https://github.com/google/fonts/raw/main/ofl/sourcesans3/SourceSans3%5Bwght%5D.ttf" || \
echo " -> WARNING: failed to download Source Sans 3; sway bar will fall back to another font"
"https://github.com/google/fonts/raw/main/ofl/sourcesans3/SourceSans3%5Bwght%5D.ttf" \
|| echo " -> WARNING: failed to download Source Sans 3; sway bar will fall back to another font"
fi
fc-cache -f >/dev/null 2>&1
fc-cache -f > /dev/null 2>&1
echo "[7/8] Enabling services and device group membership..."
# Audio (socket-activated user services; enabling is idempotent)
systemctl --user enable --now pipewire pipewire-pulse wireplumber 2>/dev/null || true
systemctl --user enable --now pipewire pipewire-pulse wireplumber 2> /dev/null || true
# NetworkManager (already default on desktop installs; needed by nm-applet)
sudo systemctl enable --now NetworkManager 2>/dev/null || true
sudo systemctl enable --now NetworkManager 2> /dev/null || true
# Device access for sway started from a TTY / display manager
sudo usermod -aG video,input,render "$USER" 2>/dev/null || true
sudo usermod -aG video,input,render "$USER" 2> /dev/null || true
echo "[8/8] Installing swayr window switcher (Alt+Tab, cargo-based)..."
if command -v cargo >/dev/null 2>&1; then
if command -v cargo > /dev/null 2>&1; then
cargo install swayr || echo " -> WARNING: cargo install swayr failed"
else
echo " -> cargo not found. Run init-cargo-tools.sh first, then: cargo install swayr"
fi
cat <<'EOF'
cat << 'EOF'
Done. Next steps:
1. Log out and back in (group membership takes effect on new login).

Loading…
Cancel
Save