Compare commits

..

No commits in common. "692abca1db73f80f632f8992acfefa778c0ae3f8" and "b878661252e164e7c668943964453bff9879c621" have entirely different histories.

3 changed files with 0 additions and 127 deletions

View File

@ -1,5 +0,0 @@
#!/bin/sh
khard email "$@" | grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b"
s="$@"
[ "$#" -gt 0 ] && notmuch address "$@" | grep -i "$s"

View File

@ -1,82 +0,0 @@
#!/bin/sh
function usage () {
echo "Usage:"
echo "$0 <action>"
}
# If no display found, full text interface. use dmenu and dunstify else.
if [ -z "$DISPLAY" ] ; then
interface=text
function notify () {
echo "$1\n$2"
}
function ask () {
echo "Text interface not implemented. use X :(" >/dev/stderr
exit 1
#TODO
i=0
while read l ; do
echo "$i) $l"
((i++))
done
echo -n "Your choice: "
read choice
if [ "$choice" -le "$i" ] && [ "$choice" -ge 0 ] ; then
echo $i
fi
}
else
interface=x
function notify () {
dunstify "$1" "$2"
}
function ask () {
dmenu
}
fi
if [ "$1" = "mount" ] ; then
action=mount
elif [ "$1" = umount ] || [ "$1" = unmount ] ; then
action=umount
else
usage
exit 1
fi
mounted=""
umounted=""
mounted_nb=0
umounted_nb=0
# List mounted and unmounted disks
while read disk size mountpoint ; do
# Filters. Add yours
[[ "$disk" = /dev/sda* ]] && continue
[ "$disk" = /dev/mapper/cryptroot ] && continue
# Selection
if [ -z "$mountpoint" ] ; then
umounted="$umounted$disk $size\n"
((umounted_nb++))
else
mounted="$mounted$disk $size $mountpoint\n"
((mounted_nb++))
fi
done <<< $(lsblk -prno NAME,SIZE,MOUNTPOINTS)
# Prompt user for disk action
if [ "$action" = "mount" ] ; then
read disk size <<< $(echo -en $umounted | dmenu -i -l "$umounted_nb" -p 'Mount: ')
if [ -b "$disk" ] ; then
notify "Mounting $disk" "$(udisksctl mount -b "$disk" 2>&1)"
fi
elif [ "$action" = "umount" ] ; then
read disk size mountpoint <<< $(echo -en $mounted | dmenu -i -l "$mounted_nb" -p 'Unmount: ')
if [ -b "$disk" ] ; then
notify "Unmounting $disk" "$(udisksctl unmount -b "$disk" 2>&1)"
fi
fi

40
mktex
View File

@ -1,40 +0,0 @@
#!/bin/sh
# Author: Romain Deville (ty <3)
# Generate latex file two times to get page numbering and glossary right
if [[ $# -eq 1 ]] && ! [[ $1 == 'bib' ]]
then
if [[ $1 == 'clean' ]]
then
bash -c "rm -f *.aux *.bbl *.blg *.log *.out *.idx *.ilg *.ind *.toc *.fls *.fdb_latexmk
*synctex.gz *.d"
elif [[ $1 == 'veryclean' ]]
then
bash -c "rm -f *.aux *.bbl *.blg *.log *.out *.idx *.ilg *.ind *.toc *.fls *.fdb_latexmk
*synctex.gz *.d *.pdf"
fi
else
grep -lFm 1 'begin{document}' *.tex | while read f ; do
pdflatex_cmd="pdflatex -file-line-error -halt-on-error '$f'"
latex_file_without_ext="${f:0:-4}"
bash -c "$pdflatex_cmd" 2>/dev/null
[[ $? -eq 1 ]] && read
# Generate glossary
if [ -n "$(grep -E '\\usepackage.*{glossaries}' "$f") " ] ; then
makeglossaries "$latex_file_without_ext"
[[ $? -eq 1 ]] && read
fi
# Generate bib
if [ -n "$(grep -E '^[[:space:]]*\\bibliograph[yi]' "$f")" ] ; then
bibtex ${f%%.tex*}.aux
[[ $? -eq 1 ]] && read
fi
# get all right
bash -c "$pdflatex_cmd" 2>/dev/null
[[ $? -eq 1 ]] && read
"$pdflatex_cmd" 2>/dev/null
[[ $? -eq 1 ]] && read
done
fi