From 5a1ec0958c698baceda6459f2f455d38b681d731 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Tue, 24 Feb 2026 17:00:35 +0800 Subject: bump --- sysutil.sh | 63 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 32 insertions(+), 31 deletions(-) (limited to 'sysutil.sh') diff --git a/sysutil.sh b/sysutil.sh index d6274c1..7f542c4 100755 --- a/sysutil.sh +++ b/sysutil.sh @@ -3,62 +3,63 @@ XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache} function prepsound() { - tDIR=$XDG_CACHE_HOME/stoggle + tDIR=$XDG_CACHE_HOME/stoggle - if [ ! -d $tDIR ]; then - mkdir -p $tDIR || exit 1 - fi - sDIR=/usr/share/sounds/freedesktop/stereo + if [ ! -d $tDIR ]; then + mkdir -p $tDIR || exit 1 + fi + sDIR=/usr/share/sounds/freedesktop/stereo } function playSound() { - if [ ! $sDIR ]; then - echo Warning: Sound directory not set, setting to default - prepsound - fi - pw-play $sDIR/$1 || paplay $sDIR/$1 + if [ ! $sDIR ]; then + echo Warning: Sound directory not set, setting to default + prepsound + fi + pw-play $sDIR/$1 || paplay $sDIR/$1 } function getSound() { - prepsound - if [ -f $tDIR/$1 ]; then - return 1 - else - return 0 - fi + prepsound + if [ -f $tDIR/$1 ]; then + return 1 + else + return 0 + fi } function setSound() { - prepsound + prepsound - if [ ! -d $sDIR ]; then - mkdir -p $sDIR || exit 1 - fi - if [ -f $sDIR/$1 ]; then - rm $sDIR/$1 - else - touch $sDIR/$1 - fi + if [ ! -d $sDIR ]; then + mkdir -p $sDIR || exit 1 + fi + if [ -f $sDIR/$1 ]; then + rm $sDIR/$1 + else + touch $sDIR/$1 + fi } # if $(getSound screenshot); then - # echo "Screenshot sound is enabled" +# echo "Screenshot sound is enabled" # else - # echo "Screenshot sound is disabled" +# echo "Screenshot sound is disabled" # fi function screenshot() { - $HOME/scripts/hyprshot $@ + $HOME/scripts/hyprshot $@ } function volume() { - $HOME/scripts/hyprvol $@ + $HOME/scripts/hyprvol $@ } function brightness() { - $HOME/scripts/hyprbri $@ + # $HOME/scripts/hyprbri $@ + $HOME/scripts/ddcutil-client.sh $@ } if [ "$1" ]; then - $@ + $@ fi -- cgit v1.2.3