Files
imladris/configs/omarchy/bin/omarchy-capture-screenshot
T
kyle 3e564d57db Add Omarchy-style Hyprland desktop for straylight
Ports the classic dotfiles Omarchy setup to a no-home-manager NixOS
system module (configs/omarchy.nix), scoped to straylight only so the
other desktop hosts keep i3.

- Hyprland (programs.hyprland) becomes the default lightdm session; i3
  stays enabled and selectable as a fallback.
- Omarchy config layout under ~/.config/{hypr,waybar,rofi,wlogout,
  swayosd,alacritty} symlinked from the store; mutable theme/wallpaper
  state in ~/.config/omarchy/current.
- omarchy-dots generates 8 themes (hyprland/hyprlock/waybar/rofi/
  swayosd/wlogout/alacritty/mako colour files) from each theme's
  palette, with wallpapers fetched from the Omarchy v3.8.4 tag.
- Helper scripts: omarchy-theme-set/bg-next/bg-set/apply, omarchy-menu
  (rofi power/theme/background menus), waybar toggle, screenshot, lock.
- Shared desktop modules (desktop.nix / desktop-light.nix) untouched.
2026-10-14 01:18:23 -07:00

32 lines
765 B
Bash

#!/usr/bin/env bash
# Screenshot helper: region | window | output. Saves under ~/Pictures/Screenshots
# and copies to the clipboard.
set -euo pipefail
mode="${1:-region}"
dir="$HOME/Pictures/Screenshots"
mkdir -p "$dir"
file="$dir/$(date +%Y-%m-%d_%H-%M-%S).png"
case "$mode" in
region)
geom="$(slurp)" || exit 0
grim -g "$geom" "$file"
;;
window)
geom="$(hyprctl activewindow -j | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"')"
grim -g "$geom" "$file"
;;
output)
grim "$file"
;;
*)
echo "Usage: omarchy-capture-screenshot [region|window|output]" >&2
exit 1
;;
esac
wl-copy <"$file" 2>/dev/null || true
command -v notify-send >/dev/null && notify-send -u low "Screenshot saved" "$file" || true
exit 0