$ show gh0stzk/dotfiles
This repository is a comprehensive, modular dotfiles collection for a bspwm-based desktop environment on Arch Linux. It provides 18 distinct visual themes ('rices') that consistently apply color schemes, wallpapers, and style options across a wide range of applications including terminals (Alacritty, Kitty, Ghostty, ST), status bars (Polybar, Eww), launcher (Rofi), notifications (Dunst), compositor (Picom), browser (Firefox), editor (Neovim), media player (MPV), and many others. The core architecture is a modular theme application system: a central script (`Theme.sh`) sources per-theme color variables and then runs individual module scripts (e.g., `05-alacritty.sh`) that generate or overwrite application configuration files. An installer (`RiceInstaller`) sets up the entire environment, and a GUI editor (`RiceEditor`) allows runtime customization. The repository also includes numerous utility scripts for hardware detection, wallpaper selection, weather display, network management, and media control, many of which demonstrate good engineering practices like caching, parallel processing, and atomic file updates. While tightly coupled to Arch Linux and X11, the modular theming pattern and several standalone scripts are reusable in other contexts.
The LLM identified 5 files worth highlighting for reuse:
Module script that generates Alacritty terminal configuration from theme color variables. It reads hex color values from the sourced theme-config.bash and writes them into an alacritty.toml file. This pattern is cleanly isolated, requires only the color variables, and can be adapted to any application that uses text-based config files with replaceable values.
Advanced wallpaper selection script that manages a large collection of wallpapers with efficient caching. It uses parallel image processing with xargs, a fast-path cache based on file mtime and size, XXHash64 verification to detect changes, and orphan cache cleanup using flock. This script demonstrates sophisticated performance optimization and caching strategies for image handling tasks.
Weather fetching script with multiple IP geolocation providers (ipapi, ipinfo, ip-api), manual coordinate override, and city name override. It implements caching of weather data to avoid redundant API calls and provides a modular command-line interface (e.g., current_temp, icon, wmodule). This is a robust example of an API client with fallback and caching patterns.
Hardware detection script that identifies network interface, graphics card, battery, and adapter, then writes variables to a file used by Polybar and Eww. It uses atomic file updates with a lock file to prevent corruption and caches results for performance. This pattern is reusable for any system that needs to expose hardware info to status bars or widgets.
EWW widget that displays a dynamic cheatsheet of bspwm keybindings. It uses EWW's declarative Yuck syntax and SCSS styling to create a popup reference. This widget is self-contained and can be repurposed for any keybinding reference or help system within EWW.