Added scripts

This commit is contained in:
Johannes Olzem 2023-07-27 03:37:48 +02:00
parent f4a48af033
commit 26b2987639
Signed by: jolzem
GPG Key ID: DB5485828E95A447
5 changed files with 49 additions and 0 deletions

1
scripts/clean Executable file
View File

@ -0,0 +1 @@
doas pacman -Rsn $(pacman -Qdt | awk '{print $1}')

10
scripts/copymenu Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
echo "ä
ö
ü
jolzem@proton.me
4BK7poh4kom8tti2HReRjQFbooWNiCiYj6sYfq4jdqBBhfN1FWn3an4ZRb1fytH5363vzyvTxBKzd5UphnexhJ7t1kjzTzP
.bytebox.duckdns.org/" | eval "dmenu -l 20 $DMENU_COLORS" | wl-copy

19
scripts/dpowermenu Executable file
View File

@ -0,0 +1,19 @@
#!/bin/sh
SELECTION=$(echo "cancel
logout
reboot
shutdown
suspend" | eval "dmenu $DMENU_COLORS")
case $SELECTION in
shutdown )
sudo systemctl suspend ;; # systemctl hibernate ;;
reboot )
sudo systemctl reboot ;;
suspend )
sudo systemctl suspend ;;
logout )
swaymsg exit ;;
esac

4
scripts/sway-wrapper Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
source /etc/zsh/zshenv
sway

15
scripts/texclear Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
# 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