1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-10-10 03:21:16 +02:00

profile: added source for optional env variables

This commit is contained in:
2024-05-19 06:35:47 +02:00
parent d0ef41d968
commit c6b9ffcc69
10 changed files with 58 additions and 25 deletions

View File

@@ -4,10 +4,11 @@
# Based on a script by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
# Heavily extended and updated to a pipewire system
Device="Audio Adapter (Unitek Y-247A) Mono"
Name=$(wpctl status | grep "$Device")
Id=$( echo $Name | cut -d '.' -f 1 | cut -c 5-)
Node=$(wpctl inspect $Id | grep node.name | cut -d '=' -f 2)
[ -z "$LOOPBACK_DEVICE" ] && device="Easy Effects Source" || device="$LOOPBACK_DEVICE"
name=$(wpctl status | grep "$device")
id=$( echo $name | cut -d '.' -f 1 | cut -c 5-)
node=$(wpctl inspect $id | grep node.name | cut -d '=' -f 2)
[ -z "$2" ] && num="5" || num="$2"
@@ -59,10 +60,10 @@ case "$1" in
loop) playerctl loop none
sleep 1
pkill -RTMIN+9 $STATUSBAR ;;
tap) wpctl set-volume $Id 0.2
tap) wpctl set-volume $id 1.0
touch ~/.local/state/loopback.lock
pw-loopback -C $Node &
notify-send -u low 'sxhkd' "Started loopback of $Device" ;;
pw-loopback -C $node &
notify-send -u low 'sxhkd' "Started loopback of $device" ;;
untap) killall pw-loopback
rm ~/.local/state/loopback.lock
notify-send -u low 'sxhkd' "Stopped all loopbacks" ;;