Files
nixos-config/modules/user/shell/quicklinks.sh
T
kiskaadee 7245d8c22a feat(system): establish dual-host architecture and finalize environment integrations
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.
2026-06-19 01:53:42 -05:00

43 lines
1.7 KiB
Bash

# 🚀 Quicklinks Launcher Utility
# Sourced in .bashrc to provide an interactive bookmarks and command-launcher interface.
# Parses a pipe-separated config file (`~/.quicklinks`) containing custom CLI commands or URLs.
# 1. quicklinks: Evaluates custom commands stored in the `~/.quicklinks` list.
quicklinks() {
local CONFIG_FILE="$HOME/.quicklinks"
local SELECTED_LINE
local COMMAND
# Create a boilerplate/template configuration file if it doesn't already exist
if [[ ! -f "$CONFIG_FILE" ]]; then
echo "--------------------------------------------------------"
echo "⚠️ Quicklinks file not found!"
echo "Please create: $CONFIG_FILE"
echo "Format: Name | Description | Command or Script"
echo "--------------------------------------------------------"
read -p "Create a template file now? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "Example | This is a description | echo 'Hello World'" > "$CONFIG_FILE"
echo "Template created. Please edit it and run the function again."
fi
return 1
fi
# Display configured entries using bat syntax-highlighting and search interactively using fzf
SELECTED_LINE=$(bat "$CONFIG_FILE" | fzf \
--style full \
--height 40% --layout reverse --border \
--prompt "🚀 Quick Access: " \
--delimiter "|" --with-nth 1..3)
[[ -z "$SELECTED_LINE" ]] && return 0
# Extract the third field (the bash command) and strip leading/trailing spaces
COMMAND=$(echo "$SELECTED_LINE" | cut -d'|' -f3- | sed 's/^[[:space:]]*//')
echo "🚀 Executing: $COMMAND"
eval "$COMMAND"
}