Archived
added bash dpi switcher detecting monitor types (more to come)
This commit is contained in:
1 parent
bc609835d8
commit
e7c3697c96
10 files changed
+41
-47
No files matched your search
@@ -1,31 +0,0 @@
|
||||
#!/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"
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#! /bin/bash
|
||||
|
||||
if xdpyinfo | grep --quiet -oh 1440
|
||||
then
|
||||
sed '1 s/96/128/g' ~/.Xresources > /tmp/xres
|
||||
mv /tmp/xres ~/.Xresources
|
||||
fi
|
||||
|
||||
if xdpyinfo | grep --quiet -oh 1080
|
||||
then
|
||||
sed '1 s/128/96/g' ~/.Xresources > /tmp/xres
|
||||
mv /tmp/xres ~/.Xresources
|
||||
fi
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#! /bin/bash
|
||||
|
||||
git add .
|
||||
git commit
|
||||
git push
|
||||
|
||||
# I'M LAZY ALRIGHT AREN'T WE ALL!?!
|
||||
@@ -1 +0,0 @@
|
||||
sudo mount.cifs //192.168.1.176/data /mnt/purple/ -o user=admin
|
||||
Reference in new issue
Block a user