From a275422d47442e91c0748c5677551d852d6e4f21 Mon Sep 17 00:00:00 2001 From: Salman Abedin Date: Sun, 7 Jun 2020 05:17:35 +0600 Subject: [PATCH 1/4] Much cleaner compiler script (#692) Co-authored-by: Salman Abedin --- .local/bin/compiler | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/.local/bin/compiler b/.local/bin/compiler index f28ffe1..4f1ad50 100755 --- a/.local/bin/compiler +++ b/.local/bin/compiler @@ -12,6 +12,7 @@ file=$(readlink -f "$1") dir=${file%/*} base="${file%.*}" +ext="${file##*.}" cd "$dir" || exit @@ -25,25 +26,25 @@ textype() { \ $command --output-directory="$dir" "$base" } -case "$file" in - *\.ms) preconv "$file" | refer -PS -e | groff -me -ms -kept -T pdf > "$base".pdf ;; - *\.mom) preconv "$file" | refer -PS -e | groff -mom -kept -T pdf > "$base".pdf ;; - *\.[0-9]) preconv "$file" | refer -PS -e | groff -mandoc -T pdf > "$base".pdf ;; - *\.[rR]md) Rscript -e "rmarkdown::render('$file', quiet=TRUE)" ;; - *\.tex) textype "$file" ;; - *\.md) if command -v lowdown >/dev/null; then +case "$ext" in + ms) preconv "$file" | refer -PS -e | groff -me -ms -kept -T pdf > "$base".pdf ;; + mom) preconv "$file" | refer -PS -e | groff -mom -kept -T pdf > "$base".pdf ;; + [0-9]) preconv "$file" | refer -PS -e | groff -mandoc -T pdf > "$base".pdf ;; + [rR]md) Rscript -e "rmarkdown::render('$file', quiet=TRUE)" ;; + tex) textype "$file" ;; + md) if command -v lowdown >/dev/null; then lowdown -d nointem -e super "$file" -Tms | groff -mpdfmark -ms -kept > "$base".pdf elif command -v groffdown >/dev/null; then groffdown -i "$file" | groff > "$base.pdf" else pandoc "$file" --pdf-engine=xelatex -o "$base".pdf fi ; ;; - *config.h) sudo make install ;; - *\.c) cc "$file" -o "$base" && "$base" ;; - *\.py) python "$file" ;; - *\.m) octave "$file" ;; - *\.scad) openscad -o "$base".stl "$file" ;; - *\.go) go run "$file" ;; - *\.sent) setsid -f sent "$file" 2>/dev/null ;; + h) sudo make install ;; + c) cc "$file" -o "$base" && "$base" ;; + py) python "$file" ;; + m) octave "$file" ;; + scad) openscad -o "$base".stl "$file" ;; + go) go run "$file" ;; + sent) setsid -f sent "$file" 2>/dev/null ;; *) sed 1q "$file" | grep "^#!/" | sed "s/^#!//" | xargs -r -I % "$file" ;; esac From 6d2c74da3af198e8aefdb009a68eb91b446348df Mon Sep 17 00:00:00 2001 From: Salman Abedin Date: Sun, 7 Jun 2020 06:04:12 +0600 Subject: [PATCH 2/4] Unison and HISTFILE base directory change (#694) Co-authored-by: Salman Abedin --- .zprofile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.zprofile b/.zprofile index 840aeec..4719c28 100644 --- a/.zprofile +++ b/.zprofile @@ -34,6 +34,8 @@ export ANDROID_SDK_HOME="${XDG_CONFIG_HOME:-$HOME/.config}/android" export CARGO_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/cargo" export GOPATH="${XDG_DATA_HOME:-$HOME/.local/share}/go" export ANSIBLE_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/ansible/ansible.cfg" +export UNISON="${XDG_DATA_HOME:-$HOME/.local/share}/unison" +export HISTFILE="${XDG_DATA_HOME:-$HOME/.local/share}/history" # Other program settings: export DICS="/usr/share/stardict/dic/" From 0646d9bb81a28c62b1f7ee649ea51fed489de8c7 Mon Sep 17 00:00:00 2001 From: Luke Bubar <43391582+lukerb52@users.noreply.github.com> Date: Sat, 6 Jun 2020 22:08:33 -0400 Subject: [PATCH 3/4] Added support for .tif images (#695) tif files are a type of gray-scale images. --- .config/lf/lfrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 1a8442f..f7f9410 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -18,7 +18,7 @@ cmd open ${{ image/vnd.djvu|application/pdf|application/octet-stream) setsid -f zathura $fx >/dev/null 2>&1 ;; text/*) $EDITOR $fx;; image/x-xcf|image/svg+xml) setsid -f gimp $f >/dev/null 2>&1 ;; - image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\)\(_large\)*$" | sxiv -aio 2>/dev/null | lf-select ;; + image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\)\(_large\)*$" | sxiv -aio 2>/dev/null | lf-select ;; audio/*) mpv --audio-display=no $f ;; video/*) setsid -f mpv $f -quiet >/dev/null 2>&1 ;; application/pdf|application/vnd*|application/epub*) setsid -f zathura $fx >/dev/null 2>&1 ;; From b1d1446325fe483be0078c8932f5eb99fd98ea2b Mon Sep 17 00:00:00 2001 From: Bryan Jenks Date: Mon, 8 Jun 2020 02:51:13 -0700 Subject: [PATCH 4/4] rust file compilation (#698) --- .local/bin/compiler | 1 + 1 file changed, 1 insertion(+) diff --git a/.local/bin/compiler b/.local/bin/compiler index 4f1ad50..58a809f 100755 --- a/.local/bin/compiler +++ b/.local/bin/compiler @@ -42,6 +42,7 @@ case "$ext" in h) sudo make install ;; c) cc "$file" -o "$base" && "$base" ;; py) python "$file" ;; + rs) cargo build ;; m) octave "$file" ;; scad) openscad -o "$base".stl "$file" ;; go) go run "$file" ;;