diff --git a/scripts/compiler b/scripts/compiler index 67992be..6e28cd0 100755 --- a/scripts/compiler +++ b/scripts/compiler @@ -17,13 +17,15 @@ ext="${file##*.}" cd "$dir" || exit 1 textype() { \ + textarget="$(getcomproot "$file" || echo "$file")" + echo "$textarget" command="pdflatex" - ( head -n5 "$file" | grep -qi 'xelatex' ) && command="xelatex" - $command --output-directory="$dir" "$base" && - grep -qi addbibresource "$file" && - biber --input-directory "$dir" "$base" && - $command --output-directory="$dir" "$base" && - $command --output-directory="$dir" "$base" + ( head -n5 "$textarget" | grep -qi 'xelatex' ) && command="xelatex" + $command --output-directory="${textarget%/*}" "${textarget%.*}" + grep -qi addbibresource "$textarget" && + biber --input-directory "${textarget%/*}" "${textarget%.*}" && + $command --output-directory="${textarget%/*}" "${textarget%.*}" && + $command --output-directory="${textarget%/*}" "${textarget%.*}" } case "$ext" in diff --git a/scripts/cron/crontog b/scripts/cron/crontog index 5aba5e6..c9a640f 100755 --- a/scripts/cron/crontog +++ b/scripts/cron/crontog @@ -1,6 +1,6 @@ #!/bin/sh # Toggles all cronjobs off/on. -# Stores disabled crontabs in ~/.consaved until restored. +# Stores disabled crontabs in ~/.config/cronsaved until restored. ([ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/cronsaved ] && crontab - < "${XDG_CONFIG_HOME:-$HOME/.config}"/cronsaved && rm "${XDG_CONFIG_HOME:-$HOME/.config}"/cronsaved && notify-send "🕓 Cronjobs re-enabled.") || ( crontab -l > "${XDG_CONFIG_HOME:-$HOME/.config}"/cronsaved && crontab -r && notify-send "🕓 Cronjobs saved and disabled.") diff --git a/scripts/maimpick b/scripts/maimpick index 1d99567..8ea9f5e 100755 --- a/scripts/maimpick +++ b/scripts/maimpick @@ -16,5 +16,3 @@ case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area "current window (copy)") maim -q -d 0.2 -i "$(xdotool getactivewindow)" | ${xclip_cmd} ;; "full screen (copy)") maim -q -d 0.2 | ${xclip_cmd} ;; esac - -notify-send "Screenshot captured and saved to your home folder." diff --git a/scripts/opout b/scripts/opout index faf6575..d2b447a 100755 --- a/scripts/opout +++ b/scripts/opout @@ -7,7 +7,7 @@ basename="${1%.*}" case "${*}" in - *.tex|*.m[dse]|*.[rR]md|*.mom|*.[0-9]) setsid -f xdg-open "$basename".pdf >/dev/null 2>&1 ;; + *.tex|*.sil|*.m[dse]|*.[rR]md|*.mom|*.[0-9]) target="$(getcomproot "$1" || echo "$1")" ; setsid -f xdg-open "${target%.*}".pdf >/dev/null 2>&1 ;; *.html) setsid -f "$BROWSER" "$basename".html >/dev/null 2>&1 ;; *.sent) setsid -f sent "$1" >/dev/null 2>&1 ;; esac