#!/usr/bin/env bash # vim: syntax=bash open_window() { local position="$1" local size="$2" local command="$3" # Validate input if [[ -z "$position" || -z "$size" || -z "$command" ]]; then echo "Error: Position, size, and command are required." 1>&2 exit 1 fi hyprctl dispatch exec "[float; move ${position//,/ }; size ${size//x/ }] $command" } if [[ $# -ne 3 ]]; then echo "Usage: $0 " exit 1 fi open_window "$1" "$2" "$3"