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:
@@ -1,14 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -z "$CAPTURE_INPUT_AUDIO" ] && audio_1="easyeffects_sink.monitor" || audio_1="$CAPTURE_INPUT_AUDIO"
|
||||
[ -z "$CAPTURE_OUTPUT_AUDIO" ] && audio_2="easyeffects_source" || audio_2="$CAPTURE_OUTPUT_AUDIO"
|
||||
[ -z "$CAPTURE_DIR" ] && output="$HOME/downloads" || output="$CAPTURE_DIR"
|
||||
|
||||
window=$(xdotool getwindowfocus)
|
||||
fps=60
|
||||
audio_1="easyeffects_sink.monitor"
|
||||
audio_2="easyeffects_source"
|
||||
format="mp4"
|
||||
v_codec="h264"
|
||||
a_codec="opus"
|
||||
lenght=20
|
||||
output="$HOME/downloads"
|
||||
|
||||
gpu-screen-recorder -w $window -f $fps -a $audio_1 -a $audio_2 -c $format -k $v_codec -ac $a_codec -r $lenght -o $output &
|
||||
notify-send -u low 'Screen record' 'Replay started'
|
||||
|
@@ -1,13 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -z "$CAPTURE_INPUT_AUDIO" ] && audio_1="easyeffects_sink.monitor" || audio_1="$CAPTURE_INPUT_AUDIO"
|
||||
[ -z "$CAPTURE_OUTPUT_AUDIO" ] && audio_2="easyeffects_source" || audio_2="$CAPTURE_OUTPUT_AUDIO"
|
||||
[ -z "$CAPTURE_DIR" ] && output_dir="$HOME/downloads" || output_dir="$CAPTURE_DIR"
|
||||
|
||||
window=$(xdotool getwindowfocus)
|
||||
fps=30
|
||||
audio_1="$(pactl get-default-sink).monitor"
|
||||
audio_2="$(pactl get-default-source)"
|
||||
format="mp4"
|
||||
v_codec="h264"
|
||||
a_codec="opus"
|
||||
output="$HOME/downloads/recording-$(date '+%Y-%m-%d_%H-%M-%S').$format"
|
||||
output="$output_dir/recording-$(date '+%Y-%m-%d_%H-%M-%S').$format"
|
||||
|
||||
gpu-screen-recorder -w $window -c $format -k $v_codec -ac $a_codec -f $fps -a $audio_1 -a $audio_2 -o $output &
|
||||
notify-send -u low 'Screen record' 'Recording started'
|
||||
|
@@ -3,7 +3,8 @@
|
||||
# Status bar module for disk space
|
||||
# $1 should be drive mountpoint
|
||||
|
||||
disk="/home"
|
||||
[ -z "$STATUSBAR_DISK" ] && disk="/home" || disk="$STATUSBAR_DISK"
|
||||
|
||||
[ ! -z "$1" ] && disk="$1"
|
||||
|
||||
icon="$disk"
|
||||
|
@@ -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" ;;
|
||||
|
@@ -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")
|
||||
|
@@ -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"
|
||||
|
||||
|
Reference in New Issue
Block a user