summaryrefslogtreecommitdiff
path: root/sysutil.sh
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2026-02-24 17:00:35 +0800
committerlittleblack111 <littleblack11111@gmail.com>2026-02-24 17:00:35 +0800
commit5a1ec0958c698baceda6459f2f455d38b681d731 (patch)
tree9c7b8aedf6017813e6d44301a694dadd83cc741a /sysutil.sh
parent85ce700898392cb92952b9b417de2f1727d5ed0a (diff)
bump
Diffstat (limited to 'sysutil.sh')
-rwxr-xr-xsysutil.sh63
1 files changed, 32 insertions, 31 deletions
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