From db58721f457ba8e005971deeded58c3bf70d78b5 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Tue, 24 Dec 2024 14:32:18 +0100 Subject: [PATCH] Format hyprland-screenshot script --- .../scripts/gui/hyprland/hyprland-screenshot | 279 +++++++++--------- 1 file changed, 139 insertions(+), 140 deletions(-) diff --git a/home/.local/bin/scripts/gui/hyprland/hyprland-screenshot b/home/.local/bin/scripts/gui/hyprland/hyprland-screenshot index a48af52..7bf1f2c 100755 --- a/home/.local/bin/scripts/gui/hyprland/hyprland-screenshot +++ b/home/.local/bin/scripts/gui/hyprland/hyprland-screenshot @@ -1,19 +1,18 @@ -#!/bin/sh +#!/bin/bash # Inspired by grimblast (https://github.com/hyprwm/contrib/blob/main/grimblast/grimblast) # Helper functions die() { - MSG="${1}" - ERR_CODE="${2:-1}" - URGENCY="${3:-critical}" + MSG="${1}" + ERR_CODE="${2:-1}" + URGENCY="${3:-critical}" - >&2 echo "$MSG" - if [ "$NOTIFY" = "yes" ]; then - notify-send -a screenshot -u "$URGENCY" "Error ($ERR_CODE)" "$MSG" - fi - exit "$ERR_CODE" + if [ "$NOTIFY" = "yes" ]; then + notify-send -a screenshot -u "$URGENCY" "Error ($ERR_CODE)" "$MSG" + fi + exit "$ERR_CODE" } # Argument parsing @@ -27,9 +26,9 @@ EDIT=no DELAY=0 while [ "${1-}" ]; do - case "$1" in - -h | --help) - >&2 cat <&2 cat <