merge: main

This commit is contained in:
AngeD 2022-08-06 14:30:14 +02:00
commit c7f61896af
7 changed files with 10 additions and 18 deletions

View file

@ -1,2 +1,3 @@
#!/bin/bash
docker run -it --rm -v "$PWD":/tmp epitechcontent/epitest-docker:latest /bin/bash
docker run -it --rm -v "$PWD":/tmp epitechcontent/epitest-docker:latest bash

View file

@ -14,5 +14,4 @@ DEVICE='pixma:04A9178A_31A16C'
FORMAT='png'
RES=300
scanimage -d "$DEVICE" --format="$FORMAT" --resolution "$RES" > "$1"
convert "$1" "$1"
scanimage -d "$DEVICE" --format="$FORMAT" --resolution "$RES" | convert - "$1"

View file

@ -11,8 +11,7 @@ elif ! [ -w "$1" ]; then
usage
fi
(
set -e
(set -e
asciiquarium &
cmatrix -ab &

View file

@ -17,10 +17,10 @@ CUR="$(cat "$CUR_FILE" || echo 50)"
set -e
case "${1:0:1}" in
"")
'')
exit 1
;;
"+"|"-")
'+'|'-')
NEW="$((CUR + "$1"))"
;;
*)

View file

@ -1,11 +1,8 @@
#!/bin/bash
set -e
CUR_FILE=/var/tmp/current_volume
set +e
CUR="$(cat "$CUR_FILE" || echo 50)"
set -e
CUR="$(pactl get-sink-volume "@DEFAULT_SINK@" | awk '$1 == "Volume:" {print substr($5, 1, length($5) - 1)}')"
CUR="$((CUR - CUR % "$1"))"
case "${1:0:1}" in
'')
@ -22,7 +19,7 @@ esac
[ "$NEW" -lt 0 ] && NEW=0
[ "$NEW" -gt 100 ] && NEW=100
pactl set-sink-volume 0 "$NEW"%
pactl set-sink-volume 0 "$NEW%"
pactl set-sink-mute 0 0
echo "$NEW" > "$CUR_FILE"