Skip to content

xevisalle/xsway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xsway

Minimal one-command Sway layer for developers.

License Sway Automation Shell

Installation | Features | Shortcuts | Troubleshooting

xsway desktop demo screenshot

Overview

xsway packages a clean Sway setup with Waybar, sensible developer defaults, privacy indicators, media status, brightness controls, app launch shortcuts, and a small installer. The public entry points are Bash wrappers around local Ansible playbooks:

  • install.sh
  • uninstall.sh

Inspect install.sh before running it, especially because optional package installation and network service changes may prompt for sudo.

Features

Area Included
Desktop Sway config, Waybar theme, launcher, terminal, file manager, lock/logout/session helpers
Status bar Audio, battery, network, MPRIS media, brightness, privacy indicators
Networking Optional impala integration backed by iwd
Fonts Optional user-local 0xProto Nerd Font install
Installer Dry-run mode, backups, managed markers, copy or GNU Stow symlink mode
Cleanup Uninstall flow that moves managed installs aside and can restore backups

Supported Distributions

Distribution Status
Fedora Supported
Debian Experimental
Ubuntu Experimental, treated as Debian family

Installation

Run the installer as your normal user:

./install.sh

Do not run the installer with sudo. It manages user-local files under ~/.config, ~/.local, and ~/.local/state. When package installation or system service changes are enabled, it prompts for sudo internally.

Run a dry run first if you want to see the planned package and dotfile actions:

./install.sh --dry-run

Install only the Sway config and skip packages, fonts, impala, and service changes:

./install.sh --dotfiles-only

For development, use GNU Stow symlinks instead of copying the config:

./install.sh --symlink

Copying remains the default so the installed config keeps working after the repository is moved or deleted.

Ansible Bootstrap

If ansible-playbook is missing, install.sh offers to install ansible-core through the system package manager:

# Fedora
sudo dnf install ansible-core

# Debian/Ubuntu
sudo apt-get install ansible-core

Use --no-ansible-bootstrap if you want to manage Ansible yourself.

What Gets Installed

Package manifests live in packages/:

  • packages/fedora.txt
  • packages/debian.txt

The package set covers the Sway desktop pieces used by this config: Sway, Waybar, kitty, rofi, nautilus, wlogout, swaylock, grim, audio helpers, PipeWire helpers, portal support, iwd, impala, 0xProto Nerd Font, and font fallback packages.

The Sway config remains in this repository under sway/. The installer copies or symlinks it to:

~/.config/sway

Configuration

Machine-specific values are grouped at the top of sway/config:

set $background #0b1220
set $wallpaper ""
set $laptop_output eDP-1
set $keyboard_layout es
set $term kitty
set $menu rofi -show drun -show-icons
set $browser xdg-open about:blank
set $file_manager nautilus
set $logout wlogout
set $locker swaylock
set $screenshot grim
set $session_menu $scripts_dir/session-menu.sh

Use swaymsg -t get_outputs to find your display output name.

Sway first applies $background as a solid color. If $wallpaper points to an existing file, a helper script applies that image on top:

set $wallpaper /path/to/wallpaper

Helper scripts support these optional environment variables:

SWAY_CONFIG_DIR         default: $XDG_CONFIG_HOME/sway or ~/.config/sway
BRIGHTNESS_DEVICE       default: first readable /sys/class/backlight device
BRIGHTNESS_STEP_PERCENT default: 5
TERMINAL                default: kitty
NETWORK_TUI             default: impala

The optional fontconfig rule in sway/fontconfig/50-web-fonts.conf maps common web font fallbacks to 0xProto. Install it at ~/.config/fontconfig/conf.d/50-web-fonts.conf and run fc-cache -f.

Installer Behavior

The installer:

  • detects the distribution from /etc/os-release
  • optionally installs packages using dnf or apt-get
  • downloads 0xProto Nerd Font into ~/.local/share/fonts/xsway/0xProto
  • downloads the latest Linux impala release asset into ~/.local/bin/impala
  • optionally enables iwd.service and disables NetworkManager.service / wpa_supplicant.service
  • validates helper scripts referenced by Sway and Waybar
  • ensures scripts under sway/scripts/ are executable
  • writes managed markers so uninstall can identify xsway-owned files
  • writes ~/.local/state/xsway/network-services.yml before changing network service state

It does not overwrite an existing Sway config in place.

Backups

If ~/.config/sway already exists and is not this repository, the installer moves it to a timestamped backup before creating the managed copy:

~/.config/sway.backup.YYYYMMDD-HHMMSS

If an older xsway symlink is found, the installer replaces it with a standalone copy unless --symlink is passed again.

Uninstall

./uninstall.sh

Do not run the uninstaller with sudo. It needs to manage the current user's Sway config and saved state.

The uninstaller removes old managed symlinks, unstows Stow-managed installs when possible, moves managed xsway copies to a timestamped ~/.config/sway.xsway-removed.* path, and moves managed Nerd Font and impala installs aside. If a backup exists, it offers to restore the latest one.

If the installer changed network services for impala, uninstall offers to restore the saved service states. Restoring network services can disconnect the current session.

Known Limitations

  • Debian and Ubuntu package names are experimental.
  • Font installation requires network access unless you pass --no-fonts.
  • impala is installed from pythops/impala GitHub release artifacts and requires iwd.
  • By default, the installer prompts before enabling iwd.service and disabling NetworkManager.service / wpa_supplicant.service. Pass --no-network-services to skip this.
  • Machine-specific config values live at the top of sway/config.
  • Privacy indicators are PipeWire-oriented. Browser camera capture can vary by browser and portal setup, so the camera indicator also falls back to checking active /dev/video* users.

Documentation

Roadmap

  • tighten Debian/Ubuntu package names after broader testing
  • add Ansible syntax checks to CI once the repo has a public workflow
  • add release tags and a simple changelog
  • consider optional health checks for portals, PipeWire, and fonts

About

Minimal one-command Sway layer for developers

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Contributors