diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2026-02-24 17:00:35 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2026-02-24 17:00:35 +0800 |
| commit | 5a1ec0958c698baceda6459f2f455d38b681d731 (patch) | |
| tree | 9c7b8aedf6017813e6d44301a694dadd83cc741a /sysutil.sh | |
| parent | 85ce700898392cb92952b9b417de2f1727d5ed0a (diff) | |
bump
Diffstat (limited to 'sysutil.sh')
| -rwxr-xr-x | sysutil.sh | 63 |
1 files changed, 32 insertions, 31 deletions
@@ -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 |
