From e071061ca38bc648184d43898a36589a30494ff5 Mon Sep 17 00:00:00 2001 From: Suleyman Farajli Date: Tue, 25 Nov 2025 19:40:13 +0400 Subject: docs(lib scripts): updated --- scripts/lib/lib_handle.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'scripts/lib/lib_handle.sh') diff --git a/scripts/lib/lib_handle.sh b/scripts/lib/lib_handle.sh index d4524d9..5bc9aa3 100644 --- a/scripts/lib/lib_handle.sh +++ b/scripts/lib/lib_handle.sh @@ -1,6 +1,18 @@ #!/bin/sh + . "lib_common.sh" +# This script defines a set of “*_handle” helper functions used to control +# system features. +# +# Each handler uses an external program and centralizes these calls +# here so they can be easily swapped or replaced in one location if +# you decide to use different tools later. +# +# Each function expects a first argument selecting an action, followed by +# any required parameters. They provide a simple, unified interface for +# controlling desktop-related functionality from other scripts. + volume_handle() { case "${1}" in "up") pactl set-sink-volume @DEFAULT_SINK@ +"${2}"% ;; @@ -111,7 +123,9 @@ notify_handle() { case "${1}" in "reload") xsetroot -name "fsignal:1" ;; "send") - echo "${2}" > /tmp/noti.fifo + # Avoid Hanging + printf "%s\n" "${2}" | + dd of=/tmp/noti.fifo oflag=nonblock 2>/dev/null shift 2 printf "%s\n" "$*" > /tmp/noti.txt xsetroot -name "fsignal:1" -- cgit v1.2.3