mirror of
https://github.com/fscotto/infra.git
synced 2026-05-30 15:39:58 +00:00
- Add profile_desktop_common with shared desktop bootstrap (emptty, PAM, dotfiles, templates, GPG, Maildir, Flatpak, st, external tools) - Add profile_desktop_host with host-specific tasks (NVIDIA/PRIME on nymph) - Reduce profile_desktop_i3 to i3/X11-only tasks - Create profile_desktop_hyprland for Hyprland Wayland session - Add dual-session support (i3 + Hyprland) on nymph with session choice - Create shared Hyprland/Waybar dotfiles under dotfiles/desktop/ - Fix Waybar: bottom position, no persistent workspaces, sort by number - Rename host_dotfiles to host_i3_dotfiles for clarity - Make emptty restart manual by default to avoid session drops
34 lines
582 B
Bash
34 lines
582 B
Bash
#!/bin/sh
|
|
|
|
set -eu
|
|
|
|
mode=${1:-full}
|
|
target_dir="$HOME/Pictures/Screenshots"
|
|
target_file="$target_dir/$(date +%Y-%m-%d-%H%M%S).png"
|
|
|
|
mkdir -p "$target_dir"
|
|
|
|
case "$mode" in
|
|
full)
|
|
grim "$target_file"
|
|
;;
|
|
region)
|
|
grim -g "$(slurp)" "$target_file"
|
|
;;
|
|
output)
|
|
grim -g "$(slurp -o)" "$target_file"
|
|
;;
|
|
*)
|
|
printf 'Usage: %s [full|region|output]\n' "$0" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
if command -v wl-copy >/dev/null 2>&1; then
|
|
wl-copy < "$target_file"
|
|
fi
|
|
|
|
if command -v notify-send >/dev/null 2>&1; then
|
|
notify-send "Screenshot saved" "$target_file"
|
|
fi
|