mirror of https://github.com/tiyn/dotfiles
parent
f662768a04
commit
0ef1b10781
@ -1,30 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
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)
|
||||
|
||||
case "$1" in
|
||||
start) wpctl set-volume $Id 0.2
|
||||
touch ~/.local/state/loopback.lock
|
||||
pw-loopback -C $Node & ;;
|
||||
stop) killall pw-loopback
|
||||
rm ~/.local/state/loopback.lock ;;
|
||||
toggle)
|
||||
if [ -f ~/.local/state/loopback.lock ]; then
|
||||
loopback stop
|
||||
else
|
||||
loopback start
|
||||
fi ;;
|
||||
*) cat << EOF
|
||||
loopback: cli audio script for looping back pulse devices to the default output.
|
||||
|
||||
Allowed options:
|
||||
start Start loopback for device
|
||||
stop Stop all active loopbacks
|
||||
toggle Start or stop loopback depending if it is already running
|
||||
|
||||
EOF
|
||||
esac
|
@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Based on a script by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||
|
||||
bgloc="${XDG_DATA_HOME:-$HOME/.local/share}/lock"
|
||||
|
||||
|
||||
trueloc="$(readlink -f "$1")" &&
|
||||
case "$(file --mime-type -b "$trueloc")" in
|
||||
image/* ) ln -f "$(readlink -f "$1")" "$bgloc" && notify-send -i "$bgloc" "Changing lock background..." ;;
|
||||
inode/directory ) ln -f "$(find "$trueloc" -iregex '.*.\(jpg\|jpeg\|png\|gif\)' -type f | shuf -n 1)" "$bgloc" && notify-send -i "$bgloc" "Random lock background chosen." ;;
|
||||
*) notify-send "🖼️ Error" "Not a valid image or directory." ; exit 1;;
|
||||
esac
|
Loading…
Reference in new issue