From 2ade168a201d8e33ef5157514e0aa2e4aab18ba4 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Thu, 14 May 2026 08:17:29 +0200 Subject: [PATCH] hl config: remove unused bash scripts --- .../hypr/hyprland/scripts/workspace_action.sh | 18 ------- dots/.config/hypr/hyprland/scripts/zoom.sh | 54 ------------------- 2 files changed, 72 deletions(-) delete mode 100755 dots/.config/hypr/hyprland/scripts/workspace_action.sh delete mode 100755 dots/.config/hypr/hyprland/scripts/zoom.sh diff --git a/dots/.config/hypr/hyprland/scripts/workspace_action.sh b/dots/.config/hypr/hyprland/scripts/workspace_action.sh deleted file mode 100755 index fa63d71c6..000000000 --- a/dots/.config/hypr/hyprland/scripts/workspace_action.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash -curr_workspace="$(hyprctl activeworkspace -j | jq -r ".id")" -dispatcher="$1" -shift ## The target is now in $1, not $2 - -if [[ -z "${dispatcher}" || "${dispatcher}" == "--help" || "${dispatcher}" == "-h" || -z "$1" ]]; then - echo "Usage: $0 " - exit 1 -fi -if [[ "$1" == *"+"* || "$1" == *"-"* ]]; then ## Is this something like r+1 or -1? - hyprctl dispatch "${dispatcher}" "$1" ## $1 = workspace id since we shifted earlier. -elif [[ "$1" =~ ^[0-9]+$ ]]; then ## Is this just a number? - target_workspace=$((((curr_workspace - 1) / 10 ) * 10 + $1)) - hyprctl dispatch "${dispatcher}" "${target_workspace}" -else - hyprctl dispatch "${dispatcher}" "$1" ## In case the target in a string, required for special workspaces. - exit 1 -fi diff --git a/dots/.config/hypr/hyprland/scripts/zoom.sh b/dots/.config/hypr/hyprland/scripts/zoom.sh deleted file mode 100755 index 4713684e4..000000000 --- a/dots/.config/hypr/hyprland/scripts/zoom.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bash - -# Controls Hyprland's cursor zoom_factor, clamped between 1.0 and 3.0 - -# Get current zoom level -get_zoom() { - hyprctl getoption -j cursor:zoom_factor | jq '.float' -} - -# Clamp a value between 1.0 and 3.0 -clamp() { - local val="$1" - awk "BEGIN { - v = $val; - if (v < 1.0) v = 1.0; - if (v > 3.0) v = 3.0; - print v; - }" -} - -# Set zoom level -set_zoom() { - local value="$1" - clamped=$(clamp "$value") - hyprctl keyword cursor:zoom_factor "$clamped" -} - -case "$1" in - reset) - set_zoom 1.0 - ;; - increase) - if [[ -z "$2" ]]; then - echo "Usage: $0 increase STEP" - exit 1 - fi - current=$(get_zoom) - new=$(awk "BEGIN { print $current + $2 }") - set_zoom "$new" - ;; - decrease) - if [[ -z "$2" ]]; then - echo "Usage: $0 decrease STEP" - exit 1 - fi - current=$(get_zoom) - new=$(awk "BEGIN { print $current - $2 }") - set_zoom "$new" - ;; - *) - echo "Usage: $0 {reset|increase STEP|decrease STEP}" - exit 1 - ;; -esac