summaryrefslogtreecommitdiffstats
path: root/.local
diff options
context:
space:
mode:
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/statusbar/sb-volume6
-rwxr-xr-x.local/bin/texclear13
2 files changed, 6 insertions, 13 deletions
diff --git a/.local/bin/statusbar/sb-volume b/.local/bin/statusbar/sb-volume
index e66dea7..f9d406b 100755
--- a/.local/bin/statusbar/sb-volume
+++ b/.local/bin/statusbar/sb-volume
@@ -4,9 +4,9 @@
case $BLOCK_BUTTON in
1) setsid -w -f "$TERMINAL" -e pulsemixer; pkill -RTMIN+10 "${STATUSBAR:-dwmblocks}" ;;
- 2) wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle ;;
- 4) wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+ ;;
- 5) wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%- ;;
+ 2) wpctl set-mute @DEFAULT_SINK@ toggle ;;
+ 4) wpctl set-volume @DEFAULT_SINK@ 1%+ ;;
+ 5) wpctl set-volume @DEFAULT_SINK@ 1%- ;;
3) notify-send "📢 Volume module" "\- Shows volume 🔊, 🔇 if muted.
- Middle click to mute.
- Scroll to change." ;;
diff --git a/.local/bin/texclear b/.local/bin/texclear
index 4cdb02e..6ad3c12 100755
--- a/.local/bin/texclear
+++ b/.local/bin/texclear
@@ -3,14 +3,7 @@
# Clears the build files of a LaTeX/XeLaTeX build.
# I have vim run this file whenever I exit a .tex file.
-case "$1" in
- *.tex)
- file=$(readlink -f "$1")
- dir=$(dirname "$file")
- base="${file%.*}"
- find "$dir" -maxdepth 1 -type f -regextype gnu-awk -regex "^$base\\.(4tc|xref|tmp|pyc|pyg|pyo|fls|vrb|fdb_latexmk|bak|swp|aux|log|synctex\\(busy\\)|lof|lot|maf|idx|mtc|mtc0|nav|out|snm|toc|bcf|run\\.xml|synctex\\.gz|blg|bbl)" -delete
- rm -rdf "$dir/_minted-$(basename -- "$base")"
- ;;
- *) printf "Give .tex file as argument.\\n" ;;
-esac
+[ "${1##*.}" = "tex" ] && {
+ find "$(dirname "${1}")" -regex '.*\(_minted.*\|.*\.\(4tc\|xref\|tmp\|pyc\|pyg\|pyo\|fls\|vrb\|fdb_latexmk\|bak\|swp\|aux\|log\|synctex\(busy\)\|lof\|lot\|maf\|idx\|mtc\|mtc0\|nav\|out\|snm\|toc\|bcf\|run\.xml\|synctex\.gz\|blg\|bbl\)\)' -delete
+} || printf "Provide a .tex file.\n"