This commit finalizes the multi-host deployment framework, introducing the laptop profile alongside the desktop. It integrates essential hardware services, declaratively binds the Hyprland compositor, and thoroughly documents the repository architecture. - Initialize `hosts/laptop` profile configured for the Niri compositor, utilizing `lib.mkForce` to override default `greetd` logic. - Declare `hyprland.conf` directly via Home Manager (`home.file`) to ensure reproducible compositor settings (blur, gaps, bindings). - Enable Bluetooth daemon (`hardware.bluetooth`) and printing services (`cups-pk-helper`) system-wide. - Configure default system typography with `inter` and `fira-code` via `fonts.fontconfig`. - Enhance `tuigreet` login screen with session memory, password asterisks, and a custom declarative greeting. - Add comprehensive inline documentation to all Nix modules and shell scripts, alongside a complete project `README.md`. - Update the Home Manager declarations in flake.nix to include home-manager.backupFileExtension = "backup" Rationale: Hardcoding the Hyprland configuration and core hardware services ensures the desktop is fully immutable. Branching the host profiles allows the laptop to share 100% of the user-space configurations (terminal, editor, shell aliases) while cleanly swapping the graphical compositor stack to Niri.
36 lines
1.1 KiB
Bash
36 lines
1.1 KiB
Bash
# 📋 Custom Wayland Desktop Utilities
|
|
# Sourced in .bashrc to provide command-line utilities optimized for Wayland compositor environments.
|
|
|
|
# 1. wlc: Executing a command, printing output to terminal, and concurrently piping output into the Wayland clipboard.
|
|
# Optional `-h` or `--headers` inserts a command/time header at the top of clipboard content.
|
|
wlc() {
|
|
local header_mode=false
|
|
local cmd_str
|
|
|
|
# Process script command line flags
|
|
while [[ "$#" -gt 0 ]]; do
|
|
case "$1" in
|
|
-h|--headers) header_mode=true; shift ;;
|
|
--) shift; break ;;
|
|
*) break ;;
|
|
esac
|
|
done
|
|
|
|
if [[ "$#" -eq 0 ]]; then
|
|
echo "Usage: wlc [--headers] <command> [args...]" >&2
|
|
return 1
|
|
fi
|
|
|
|
cmd_str="$*"
|
|
|
|
# Execute and output
|
|
{
|
|
if [[ "$header_mode" == true ]]; then
|
|
printf "# Command: %s\n" "$cmd_str"
|
|
printf "# Date: %s\n" "$(date '+%Y-%m-%d %H:%M:%S')"
|
|
printf "# Type: combined (stdout/stderr)\n\n"
|
|
fi
|
|
"$@" 2>&1
|
|
} | tee >(wl-copy) # Output to terminal and copy to clipboard buffer using wl-copy
|
|
}
|