merge: work

This commit is contained in:
AngeD 2022-08-06 14:20:20 +02:00
parent c2fc0f6955
commit 40b432676c
21 changed files with 1158 additions and 73 deletions

View file

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

View file

@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/bin/bash
set -e
# counts target = 8182 ~ 25cm

View file

@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/bin/bash
set -e
usage() {

View file

@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/bin/bash
usage() {
echo "Usage: $0 /dev/pts/{tty_nb}"
@ -11,8 +11,7 @@ elif ! [ -w "$1" ]; then
usage
fi
(
set -e
(set -e
asciiquarium &
cmatrix -ab &

View file

@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/bin/bash
set -e
CUR_LIGHT="$(set-light "$@")"

View file

@ -1,4 +1,4 @@
#!/usr/bin/bash
#!/bin/bash
set -e
shopt -s extglob nullglob
@ -17,11 +17,11 @@ CUR="$(cat "$CUR_FILE" || echo 50)"
set -e
case "${1:0:1}" in
"")
'')
exit 1
;;
"+"|"-")
NEW="$((CUR + $1))"
'+'|'-')
NEW="$((CUR + "$1"))"
;;
*)
NEW="$1"

View file

@ -1,24 +1,25 @@
#!/usr/bin/bash
#!/bin/bash
set -e
CUR="$(pactl get-sink-volume 0 | awk '$1 == "Volume:" {print substr($5, 1, length($5) - 1)}')"
SHIFT="${1}"
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
'')
exit 1
;;
'+'|'-')
NEW="$((CUR - CUR % SHIFT + SHIFT))"
NEW="$((CUR + "$1"))"
;;
*)
NEW="$1"
;;
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"