mirror of
https://github.com/tiyn/dotfiles.git
synced 2025-10-09 19:11:15 +02:00
scripts: updated to cleaner logic for global variables
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
# Based on a script by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||
# Heavily extended and updated to a pipewire system
|
||||
|
||||
[ -z "$LOOPBACK_DEVICE" ] && device="Easy Effects Source" || device="$LOOPBACK_DEVICE"
|
||||
device=${LOOPBACK_DEVICE:-Easy Effects Source}
|
||||
|
||||
name=$(wpctl status | sed -n '/Sources/,$p' | sed -n '/Filter/q;p' | grep "$device" | sed -e "s/*/\ /g")
|
||||
id=$( echo $name | cut -d '.' -f 1 | cut -c 5-)
|
||||
|
@@ -3,8 +3,8 @@
|
||||
# toggle external monitor
|
||||
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
|
||||
|
||||
[ -z "$INTERNAL_MONITOR" ] && intern="LVDS1" || intern="$INTERNAL_MONITOR"
|
||||
[ -z "$EXTERNAL_MONITOR" ] && extern="HDMI2" || extern="$EXTERNAL_MONITOR"
|
||||
intern=${INTERNAL_MONITOR:-LVDS1}
|
||||
extern=${EXTERNAL_MONITOR:-HDMI2}
|
||||
|
||||
case "$1" in
|
||||
toggle) (xrandr | grep "$extern disconnected")
|
||||
|
@@ -3,9 +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.
|
||||
|
||||
[ -z "$SCREENSHOT_DIR" ] && output_dir="$HOME/downloads" || output_dir="$SCREENSHOT_DIR"
|
||||
output=${SCREENSHOT_DIR:-$HOME/downloads}
|
||||
|
||||
output="$output_dir/screenshot-$(date '+%Y-%m-%d_%H-%M-%S').png"
|
||||
output="$output/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