Updated script and more stuff

This commit is contained in:
Chris Nutter committed 2020-09-11 23:48:00 -07:00
1 parent 42d7473046
commit 81af6301ab
26 files changed
+2373 -10

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
#!/usr/bin/env zsh
# Compile and run LaTeX files from the command line
# make_run_latex [OPTION] <FILENAME>
function x() {
[[ -z "$@" ]] && (xdg-open "$PWD" > /dev/null 2>&1)
for item in "$@"; do
done
}
[[ ! -f "$1" ]] && (echo "[-] Cannot open file at: $1, cowardly refusing";exit)
[[ ! -d exported ]] && mkdir exported
filename="$1:t:r"
#pdflatex "$1" "$filename".pdf
rubber -vvvv --unsafe -d "$1"
latexmk -silent -c
mv "$filename".pdf exported
process_count="$(ps aux | grep "$filename.pdf" | grep -v "grep" | awk '{print $2}')"
#| while read process; do kill -SIGTERM "$process"; done
if [[ -z "$process_count" ]]; then
xreader exported/"$filename".pdf > /dev/null 2>&1 & disown
else
PID="$(echo "$process_count" | head -n1)"
wmctrl -ia "$(wmctrl -lp | awk -vpid="$PID" '$3==pid {print $1; exit}')"
fi
GREEN="\033[1;32m"
NOCOLOR="\033[0m"
echo "$GREEN"'Word count: '"$(textcount $1 | awk '/Words in text/ {print $4}')""$NOCOLOR"
+7
View File
@@ -0,0 +1,7 @@
#! /bin/bash
git add .
git commit
git push
# I'M LAZY ALRIGHT AREN'T WE ALL!?!
+9
View File
@@ -0,0 +1,9 @@
#!/usr/bin/env zsh
# kill all instances of an application
[[ -z "$@" ]] && exit
application_name="$(echo "$1" | awk '{print tolower($0)}')"
ps aux | grep "$application_name" | grep -v 'grep' | awk '{print $2}' | while read process; do
kill -9 "$process"
done
+1
View File
@@ -0,0 +1 @@
sudo mount.cifs "//192.168.1.66/Blue's Internal" /mnt/blue/internal -o user=Blue
+2
View File
@@ -0,0 +1,2 @@
sudo mount.cifs //192.168.1.176/data /mnt/purple/ -o user=admin
cp -r -n /mnt/purple/Music/Playlists/Apple\ Music\ Playlists ~/Music/
+1
View File
@@ -0,0 +1 @@
sudo mount.cifs //192.168.1.176/data /mnt/purple/ -o user=admin