From cef0d038605a69481afc9b997a00ebde7168bc30 Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Sun, 19 Sep 2021 17:53:38 +0200 Subject: [PATCH] Updated README --- README.md | 19 +++++++++++++------ volumectl | 17 ----------------- 2 files changed, 13 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 4fab705..f9ad7b2 100644 --- a/README.md +++ b/README.md @@ -69,9 +69,9 @@ ln -s $HOME/.local/lib/volumectl $HOME/.local/bin/volumectl #### Option 2 (not recommended): Downloading the script directly ```bash -mkdir -p $HOME/.local/bin -wget -O $HOME/.local/bin/volumectl https://raw.githubusercontent.com/karma-riuk/volumectl/master/volumectl -chmod +x $HOME/.local/bin/volumectl +$ mkdir -p $HOME/.local/bin +$ wget -O $HOME/.local/bin/volumectl https://raw.githubusercontent.com/karma-riuk/volumectl/master/volumectl +$ chmod +x $HOME/.local/bin/volumectl ``` @@ -80,14 +80,21 @@ chmod +x $HOME/.local/bin/volumectl To use the script, simply execute the `volumectl` with the flag you want, example: ```bash -volumectl -i +$ volumectl -i ``` ### Possible flags (You can find all the information below by doing `volumectl -h`) -|Flag|Usage| +|Flag|Description| |----|-----| |`-i` or `--increase` | increases the volume by the "normal" amount (by default: 5%) | -|`-i arg` or `--increase arg` | increase the volume by the `arg` amount | +|`-i ` or `--increase ` | increase the volume by the `` amount | +|`-I` or `--big-increase` | increases the volume by the "big" amount (by default: 10%) | +|`-d` or `--decrease` | decreases the volume by the "normal" amount (by default: 5%) | +|`-d arg` or `--decrease arg` | decrease the volume by the `` amount | +|`-D` or `--big-decrease` | decreases the volume by the "big" amount (by default: 10%) | +|`-s ` or `--set ` | sets the volume to `` | +|`-m` or `--mute` | sets the volume to `` | + diff --git a/volumectl b/volumectl index ed551bf..ddcc80b 100755 --- a/volumectl +++ b/volumectl @@ -23,9 +23,6 @@ DEFAULT_NOTIFICATION_TIMEOUT=3000 DEFAULT_NORMAL_DELTA=5 DEFAULT_BIG_DELTA=10 -DEFAULT_VOLUME_MAX=100 -DEFAULT_VOLUME_MIN=5 - VERBOSE=0 @@ -105,8 +102,6 @@ checkout_config () { NORMAL_DELTA=${INI__Controller__normal_delta:-$DEFAULT_NORMAL_DELTA} BIG_DELTA=${INI__Controller__big_delta:-$DEFAULT_BIG_DELTA} - VOLUME_MAX=${INI__Controller__volume_max:-$DEFAULT_VOLUME_MAX} - VOLUME_MIN=${INI__Controller__volume_min:-$DEFAULT_VOLUME_MIN} NOTIFICATION_ENABLED=${INI__Notification__enabled:-$DEFAULT_NOTIFICATION_ENABLED} NOTIFICATION_TIMEOUT=${INI__Notification__timeout:-$DEFAULT_NOTIFICATION_TIMEOUT} @@ -123,8 +118,6 @@ checkout_config () { echo "ADDITIONAL_FLAGS: '${ADDITIONAL_FLAGS[@]}'" && \ echo "NORMAL_DELTA: '$NORMAL_DELTA'" && \ echo "BIG_DELTA: '$BIG_DELTA'" && \ - echo "VOLUME_MIN: '$VOLUME_MIN'" && \ - echo "VOLUME_MAX: '$VOLUME_MAX'" && \ echo "NOTIFICATION_ENABLED: '$NOTIFICATION_ENABLED'" && \ echo "NOTIFICATION_TIMEOUT: '$NOTIFICATION_TIMEOUT'" && \ echo "" @@ -237,8 +230,6 @@ Options: -I, --big-increase increase the volume by the "big" amount -D, --big-decrease decrease the volume by the "big" amount -s arg, --set arg set volume to arg - --set-min-volume set volume to minimum - --set-max-volume set volume to maximum -m, --mute mute -u, --unmute unmute -t, --toggle toggle mute @@ -300,14 +291,6 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then #if '__name__' == '__main__' verbose && echo "Detected -s or --set-volume, with argument '$2'" [[ -z "$2" ]] && echo "Error, missing value to set volume" 1>&2 && exit 1 || volume_set $2 ;; - --set-min-volume) - verbose && echo "Detected --set-min-volume" - volume_set $VOLUME_MIN - ;; - --set-max-volume) - verbose && echo "Detected --set-min-volume" - volume_set $VOLUME_MAX - ;; -m|--set-mute) verbose && echo "Detected -m or --mute" mute