1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-10-09 19:11:15 +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" ;;

View File

@@ -3,8 +3,8 @@
# toggle external monitor
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
intern=LVDS1
extern=HDMI2
[ -z "$INTERNAL_MONITOR" ] && intern="LVDS1" || intern="$EXTERNAL_MONITOR"
[ -z "$EXTERNAL_MONITOR" ] && extern="HDMI2" || extern="$INTERNAL_MONITOR"
case "$1" in
toggle) (xrandr | grep "$extern disconnected")

View File

@@ -3,7 +3,9 @@
# Requires maim. It lets you choose the kind of screenshot to take,
# including copying the image or even highlighting an area to copy.
output="$HOME/downloads/screenshot-$(date '+%Y-%m-%d_%H-%M-%S').png"
[ -z "$SCREENSHOT_DIR" ] && output_dir="$HOME/downloads" || output_dir="$SCREENSHOT_DIR"
output="$output_dir/screenshot-$(date '+%Y-%m-%d_%H-%M-%S').png"
xclip_img="xclip -sel clip -t image/png"
xclip_txt="xclip -sel clip -t text/plain"