Skip to content

Latest commit

Β 

History

387 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Rust Wayland Power Logo

Arch Linux Dotfiles: Niri, Hyprland & Sway

MIT License Arch Linux Wayland Rust GNOME Neovim tmux Compositors: Niri | Sway ShellCheck recommended

Donate

Required Config Changes

Your dotfiles are yours to change. Genoa releases update managed runtime code separately and never overwrite your checkout or its config edits. Breaking config changes are documented here; users can choose when to adopt them.

Config Change Guide

Screenshots

Sway iGPU-only Idle Gnome Desktop

Niri Overview

This is my obsessive setup for a minimal, multi-compositor Arch Linux environment. I run Niri primarily and a custom Sway session (iGPU-only) hyper-optimized for battery life. GNOME is included for when a full desktop is needed (e.g., Zoom annotations).

The whole point is efficiency and performance. This setup idles at 4.8W on my ThinkPad X1 Extreme (i7-10850H, 64GB RAM, GTX 1650 Ti, 4k display).


πŸš€ Installation

⚠️ Beta Warning

The Rust Installer is currently in BETA. While I use this daily, it performs major system changes. If you encounter errors, please open an issue with your hardware details.

1. Preparation: Install Arch Linux

The first step is to install Arch Linux. You can get the iso in the terminal of a working computer by running:

wget https://geo.mirror.pkgbuild.com/iso/latest/archlinux-x86_64.iso
wget https://geo.mirror.pkgbuild.com/iso/latest/archlinux-x86_64.iso.sig
pacman-key -v archlinux-x86_64.iso.sig

After this, you will need to install the iso to a bootable USB drive and install Arch on your laptop. There are many guides online for this, but I recommend using Rufus on Windows or dd on Linux/Mac.

Once you have a basic Arch install with an internet connection, you can run the installer. It will handle all the package installation and configuration for you.

2. Run the Installer

This one-liner downloads the bootstrap script, which installs Git/Rust, clones this repo, and launches the configuration wizard.

cd ~ && curl -O https://raw.githubusercontent.com/Mccalabrese/rust-wayland-power/main/bootstrap.sh && chmod +x bootstrap.sh && ./bootstrap.sh

Note: If the installer detects missing GPU drivers (e.g., fresh Arch install), it will install them and ask you to reboot. Simply run this command again after rebooting to resume exactly where you left off.

πŸ›‘οΈ Safety & Backups

The installer is designed to be non-destructive.

Existing Configs: If a config file (like .zshrc or .config/waybar) already exists, the installer will rename it to filename.backup before linking the new one. nothing is deleted.

Neovim: To respect your personal setup, the installer will NOT touch your ~/.config/nvim if it already exists.

Want my Neovim setup? If you have an existing nvim config but prefer to switch to my LazyVim setup, simply move your old folder and link mine manually:

mv ~/.config/nvim ~/.config/nvim.old
ln -s ~/rust-wayland-power/.config/nvim ~/.config/nvim

πŸ”„ Updates & Maintenance

This system is designed to keep the core tooling fresh without overwriting your personal customizations.

  • πŸ¦€ Rust Scripts & Daemons (Signed Releases): sys-update updates packages directly, then can stage a signed Genoa release under ~/.local/share/genoa/releases/. It never checks out over ~/Genoa; that directory remains your customization workspace. The active runtime release is tracked by ~/.local/share/genoa/current.

    • Existing installations migrate on their first legacy update: the refreshed installer rebuilds the updater and opens a trust-initialization prompt in that same terminal. On first use, the updater displays the pinned release-key fingerprint and asks before initializing its private ~/.local/share/genoa/keyring. It never downloads a key or changes the user's normal GPG keyring.
    • Releases must use signed tags named genoa-v*. An unsigned tag or one signed by a different key is rejected.

    Current release-key fingerprint: 744C D469 098D 940E 32A5 19F4 4E95 7FAC F379 B7A8.

    Maintainers publish a release with an annotated, signed tagβ€”for example git tag -s genoa-v2.2.0 -m "Genoa 2.2.0" followed by git push origin genoa-v2.2.0. The public release key must be distributed through a channel independent of the repository being updated.

  • πŸ“¦ Local Package Additions: Keep personal packages in ~/.config/genoa/pkglist.local, one package per line. The installer installs the union of release pkglist.txt and this local file, so release updates never discard your additions.

  • βš™οΈ Dotfiles & Configs (Manual): Your configuration files (.config/sway, .zshrc, waybar/config.jsonc, etc.) are yours. The updater will never touch them, ensuring your personal tweaks are safe.

    • Need the latest config features? If you want to sync with my latest rice or fixes, treat this GitHub repository as a reference manual and copy the specific lines you need into your local files.

πŸ“‚ Documentation


My Custom Rust Binaries

All the helper scripts in this repo have been rewritten in Rust for maximum performance and stability. These tools can be used independently of the rest of my dotfiles. Here is what each one does:

  • waybar-switcher: A small utility that runs at login to detect which session you're in (Niri, Hyprland, or Sway) and automatically loads the correct Waybar config.
  • waybar-weather: The weather module in Waybar. It's a custom-built app that securely gets your API key from the central config, finds your location, and fetches the weather.

Waybar weather module

  • sway-workspace: A simple helper that reliably gets the current workspace name for the Waybar module in Sway.
  • update-check: The update icon in Waybar. It safely checks for new pacman and yay updates and shows the count. It's network-aware and displays a "stale" count if you're offline.
  • cloudflare-toggle:
    • cf-status: The "CF" icon in Waybar that shows whether Cloudflare DNS over HTTPS is active.
    • cf-toggle: The on-click script that securely toggles Cloudflare DNS over HTTPS using a fixed, root-owned /usr/libexec/genoa/cf-toggle-helper and a narrow Polkit action. It never rewrites /etc/resolv.conf.

Cloudflare DNS over HTTPS status Cloudflare toggle module

  • wallpaper-manager: A 3-part system that manages all your wallpapers.
    • wp-daemon: A silent, background daemon that watches your wallpaper folder for changes and auto-generates thumbnails.
    • wp-select: The Rofi-based pop-up menu (Mod+W) that lets you see your wallpaper thumbnails and choose a new one.
    • wp-apply: The back-end tool that actually sets the wallpaper, using the correct tool for your session (swaybg or swww).

Wallpaper rofi app

  • kb-launcher: The keybind cheat sheet (Mod+Shift+P). It's a pop-up menu that reads your .txt files to show you the keybinds for Niri, Sway, Hyprland, or Neovim.

keyhint sheet Keyhint session selector (rofi)

  • updater: The on-click script for the update-check module. It simply launches your terminal (ghostty) to run the actual system update.

  • sidebar: GTK4 control interface with calendar month/day views, a finance launcher, media controls, quick system actions, brightness, and volume.

Power Menu formatting

  • rfkill-manager:
    • --status: The airplane icon in your SwayNC, showing if "Airplane Mode" is on or off.
    • --toggle: The on-click action (in your swaync panel or on a keybind) that toggles all wireless (Wi-Fi & Bluetooth) on or off.
  • clip-manager: The clipboard history manager (Mod+Alt+V). It uses cliphist as a backend and pipes your selection to Rofi, allowing you to copy, delete, or wipe your clipboard history.

clipboard manager

  • emoji-picker: The emoji selector (Mod+Alt+E). It uses a built-in Rust emoji database to give you a fast, searchable Rofi menu for copying any emoji.

Emoji rofi app

  • radio-menu: A rofi based, extremely lightweight and low power consumption internet radio streaming tool that caches favorite stations for quick selection.

rofi radio app

  • waybar-finance: A lightweight, keyless market watch list TUI with charts and company details, powered by Yahoo Finance. Genoa shows your selected quotes in Sidebar; launch the TUI in Ghostty to manage the watchlist.

finance TUI

  • battery-daemon: A lightweight background daemon that monitors your battery status and sends notifications when certain thresholds are reached (e.g., 10%, 5%). It will power down your computer if you reach 3% to avoid hard power loss crashes. Author @EmpressStella

The Philosophy: Why Rust?

You'll see all my helper scripts are written in Rust. I'm not a "Rust-acean," but I am a pragmatist.

Why not Python? I chose Rust to avoid dependency hell and runtime errors. I wanted compiled, single-binary tools that sip battery and don't break when I update system Python packages.

Why not shell scripts? My old scripts were a disaster zone of pgrep, jq, sed, awk, and cat all piped together. They were fragile, slow, and hard to maintain.

I like Zig, I like C, I make zero claim at all about whether Rust should or should not be in the kernel.

Support the Project

If these dotfiles saved you time or improved your battery life, consider buying me a coffee (or a textbook). I'm a computer engineering student, and every bit helps!

  • BTC: bc1qvanmtuwn3jd5wurlj3wc9j7ddcwcwwzhjj6ndx
  • ETH: 0x1dC04e98A9762fdb86F09437813Ce73D9112dF96

About

A battery-optimized, multi-compositor (Niri, GNOME, Sway) Arch Linux setup featuring custom Rust CLIs for Waybar, wallpaper management, and power control. ThinkPad X1 Extreme tuned."

Topics

Resources

Stars

21 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages