diff options
| author | Alec Goncharow <alec@goncharow.dev> | 2022-12-04 18:23:46 -0600 |
|---|---|---|
| committer | Alec Goncharow <alec@goncharow.dev> | 2022-12-04 18:23:46 -0600 |
| commit | 1ec73cc2c14d2f62c32046d9585c3a745531d37a (patch) | |
| tree | 8b9c6b2e5ba43ce1248c114758a55df9467cab64 /.config/rofi/applets/android/volume.sh | |
| parent | b257edf16c9b8b14ebb542e857a29c74fea00495 (diff) | |
Fresh start
Diffstat (limited to '.config/rofi/applets/android/volume.sh')
| -rwxr-xr-x | .config/rofi/applets/android/volume.sh | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/.config/rofi/applets/android/volume.sh b/.config/rofi/applets/android/volume.sh deleted file mode 100755 index 429db8c..0000000 --- a/.config/rofi/applets/android/volume.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env bash - -## Author : Aditya Shakya -## Mail : adi1090x@gmail.com -## Github : @adi1090x -## Twitter : @adi1090x - -dir="$HOME/.config/rofi/applets/android" -rofi_command="rofi -theme $dir/three.rasi" - -## Get Volume -#VOLUME=$(amixer get Master | tail -n 1 | awk -F ' ' '{print $5}' | tr -d '[]%') -MUTE=$(amixer get Master | tail -n 1 | awk -F ' ' '{print $6}' | tr -d '[]%') - -active="" -urgent="" - -if [[ $MUTE == *"off"* ]]; then - active="-a 1" -else - urgent="-u 1" -fi - -if [[ $MUTE == *"off"* ]]; then - active="-a 1" -else - urgent="-u 1" -fi - -if [[ $MUTE == *"on"* ]]; then - VOLUME="$(amixer get Master | tail -n 1 | awk -F ' ' '{print $5}' | tr -d '[]%')%" -else - VOLUME="Mu..." -fi - -## Icons -ICON_UP="" -ICON_DOWN="" -ICON_MUTED="" - -options="$ICON_UP\n$ICON_MUTED\n$ICON_DOWN" - -## Main -chosen="$(echo -e "$options" | $rofi_command -p "$VOLUME" -dmenu $active $urgent -selected-row 0)" -case $chosen in - $ICON_UP) - amixer -Mq set Master,0 5%+ unmute && notify-send -u low -t 1500 "Volume Up $ICON_UP" - ;; - $ICON_DOWN) - amixer -Mq set Master,0 5%- unmute && notify-send -u low -t 1500 "Volume Down $ICON_DOWN" - ;; - $ICON_MUTED) - amixer -q set Master toggle - ;; -esac - |
