1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-04-19 08:17:47 +02:00

Compare commits

..

No commits in common. "c7e33b61628141fd40700531e1393c8e4731f5fd" and "ec50c1347b5691d07d59cdca533743bc687c240d" have entirely different histories.

8 changed files with 36 additions and 33 deletions

View File

@ -1,8 +1,8 @@
#!/bin/sh #!/bin/sh
audio_1=${CAPTURE_INPUT_AUDIO:-easyeffects_sink.monitor} [ -z "$CAPTURE_INPUT_AUDIO" ] && audio_1="easyeffects_sink.monitor" || audio_1="$CAPTURE_INPUT_AUDIO"
audio_2=${CAPTURE_OUTPUT_AUDIO:-easyeffects_source} [ -z "$CAPTURE_OUTPUT_AUDIO" ] && audio_2="easyeffects_source" || audio_2="$CAPTURE_OUTPUT_AUDIO"
output=${CAPTURE_DIR:-$HOME/downloads} [ -z "$CAPTURE_DIR" ] && output="$HOME/downloads" || output="$CAPTURE_DIR"
window=$(xdotool getwindowfocus) window=$(xdotool getwindowfocus)
fps=60 fps=60

View File

@ -1,15 +1,15 @@
#!/bin/sh #!/bin/sh
audio_1=${CAPTURE_INPUT_AUDIO:-easyeffects_sink.monitor} [ -z "$CAPTURE_INPUT_AUDIO" ] && audio_1="easyeffects_sink.monitor" || audio_1="$CAPTURE_INPUT_AUDIO"
audio_2=${CAPTURE_OUTPUT_AUDIO:-easyeffects_source} [ -z "$CAPTURE_OUTPUT_AUDIO" ] && audio_2="easyeffects_source" || audio_2="$CAPTURE_OUTPUT_AUDIO"
output=${CAPTURE_DIR:-$HOME/downloads} [ -z "$CAPTURE_DIR" ] && output_dir="$HOME/downloads" || output_dir="$CAPTURE_DIR"
window=$(xdotool getwindowfocus) window=$(xdotool getwindowfocus)
fps=30 fps=30
format="mp4" format="mp4"
v_codec="h264" v_codec="h264"
a_codec="aac" a_codec="opus"
output="$output/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 -o $output & 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' notify-send -u low 'Screen record' 'Recording started'

View File

@ -3,7 +3,7 @@
# Status bar module for disk space # Status bar module for disk space
# $1 should be drive mountpoint # $1 should be drive mountpoint
disk=${STATUSBAR_DISK:-/home} [ -z "$STATUSBAR_DISK" ] && disk="/home" || disk="$STATUSBAR_DISK"
[ ! -z "$1" ] && disk="$1" [ ! -z "$1" ] && disk="$1"

View File

@ -4,7 +4,7 @@
# Based on a script by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice # Based on a script by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
# Heavily extended and updated to a pipewire system # Heavily extended and updated to a pipewire system
device=${LOOPBACK_DEVICE:-Easy Effects Source} [ -z "$LOOPBACK_DEVICE" ] && device="Easy Effects Source" || device="$LOOPBACK_DEVICE"
name=$(wpctl status | sed -n '/Sources/,$p' | sed -n '/Filter/q;p' | grep "$device" | sed -e "s/*/\ /g") 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-) id=$( echo $name | cut -d '.' -f 1 | cut -c 5-)

View File

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

View File

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

View File

@ -2,32 +2,32 @@
# copying latex templates from my template repository # copying latex templates from my template repository
# (not included in the dotfiles) # (not included in the dotfiles)
latexdir=${LATEX_TEMPLATE_DIR:-~/code/main/latextemplates} [ -z "$LATEX_TEMPLATE_DIR" ] && latexdir="~/code/main/latextemplates" || latexdir="$LATEX_TEMPLATE_DIR"
targetdir=${2:-.}
articletemp=${latexdir}/article/* articletemp=${latexdir}/article/*
beamertemp=${latexdir}/beamer-minimal/* beamertemp=${latexdir}/beamer/*
exercisetemp=${latexdir}/exercise/* exercisetemp=${latexdir}/exercise/*
handouttemp=${latexdir}/handout/* handouttemp=${latexdir}/handout/*
cvtemp=${latexdir}/cv/*
lettertemp=${latexdir}/letter/* lettertemp=${latexdir}/letter/*
case "$1" in case "$1" in
a|article) cp $articletemp $targetdir -r && exit;; a*) cp $articletemp . -r && exit;;
b|beamer) cp $beamertemp $targetdir -r && exit ;; b*) cp $beamertemp . -r && exit ;;
e|exercise) cp $exercisetemp $targetdir -r && exit ;; c*) cp $cvtemp . -r && exit ;;
h|handout) cp $handouttemp $targetdir -r && exit ;; e*) cp $exercisetemp . -r && exit ;;
l|letter) cp $lettertemp $targetdir -r && exit ;; h*) cp $handouttemp . -r && exit ;;
l*) cp $lettertemp . -r && exit ;;
esac esac
cat << EOF cat << EOF
Usage: textemp <option> <target-dir>
Allowed options Allowed options
article get article-template to current dir
beamer get beamer-template to current dir
cv get curriculum vitae-template to current dir
exercise get exercise-template to current dir
handout get handout-template to current dir
letter get letter-template to current dir
a[rticle] get article-template to current dir All of these commands can be truncated to one character.
b[eamer] get beamer-template to current dir
e[xercise] get exercise-template to current dir
h[andout] get handout-template to current dir
l[etter] get letter-template to current dir
EOF EOF

View File

@ -2,8 +2,11 @@
# Adapted from a script by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice # Adapted from a script by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
wall_desk=${WALLPAPER_DESKTOP:-$XDG_DATA_HOME/bg} [ -z "$WALLPAPER_DESKTOP" ] && wall_desk="$XDG_DATA_HOME/bg" || wall_desk="$WALLPAPER_DESKTOP"
wall_lock=${WALLPAPER_LOCK:-$XDG_DATA_HOME/lock} [ -z "$WALLPAPER_LOCK" ] && wall_lock="$XDG_DATA_HOME/lock" || wall_lock="$WALLPAPER_LOCK"
echo $wall_desk
echo $wall_lock
case "$1" in case "$1" in
desktop) trueloc="$(readlink -f "$2")" && desktop) trueloc="$(readlink -f "$2")" &&