summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2022-11-15 17:30:45 +0100
committerMarc Vertes <mvertes@free.fr>2022-11-15 17:30:45 +0100
commit4489efe4b753a2edfad646c4b3506c95f2348813 (patch)
tree341e594a683965a0092bd03c4c0aade728e7be0f
parenta13224ab0c00d6524710f8477d9efdf661296ca3 (diff)
update
-rw-r--r--.Xresources3
-rw-r--r--.bashrc2
-rwxr-xr-x.vim/pack/mvertes/install.sh2
-rwxr-xr-xbin/wag44
4 files changed, 50 insertions, 1 deletions
diff --git a/.Xresources b/.Xresources
index ec47c2e..274ee87 100644
--- a/.Xresources
+++ b/.Xresources
@@ -13,7 +13,8 @@ URxvt.cursorColor: red
Urxvt.font: 6x13
!URxvt.font: xft:Mono:size=12
!URxvt.font: xft:Mono:size=10
-URxvt.letterSpace: -1
+!URxvt.letterSpace: 0
+URxvt.letterSpace: 0
URxvt.perl-ext-common: font-size
URxvt.keysym.C-Prior: font-size:increase
URxvt.keysym.C-Next: font-size:decrease
diff --git a/.bashrc b/.bashrc
index b8f2d75..926f90e 100644
--- a/.bashrc
+++ b/.bashrc
@@ -145,3 +145,5 @@ meteo() {
eval "$(direnv hook bash)"
#export GITHUB_TOKEN=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
+
+set -o vi
diff --git a/.vim/pack/mvertes/install.sh b/.vim/pack/mvertes/install.sh
index 48d5950..90cd4b3 100755
--- a/.vim/pack/mvertes/install.sh
+++ b/.vim/pack/mvertes/install.sh
@@ -5,6 +5,8 @@ git@github.com:mvertes/vimki
git@github.com:fatih/vim-go
git@github.com:othree/xml.vim
git@github.com:junegunn/fzf.vim
+git@github.com:mattn/libcallex-vim
+git@github.com:bytesnake/vim-graphical-preview
'
ht='test -d doc && vim -c "helptags doc" -c "q"'
diff --git a/bin/wag b/bin/wag
index 4e0c802..a1542b6 100755
--- a/bin/wag
+++ b/bin/wag
@@ -1,6 +1,8 @@
#!/bin/sh
## wag is a tool to generate static web sites
+##
+## Commands:
unset CDPATH
export LC_ALL=C IFS='
@@ -8,6 +10,48 @@ export LC_ALL=C IFS='
cmd=$(command -v "$0")
+dest=./public
+
+footer() {
+ :
+}
+
+# front parses front matter
+front() {
+ {
+ read a b && [ "$a" = "---" ] && [ "$b" = "" ] || return
+ while read a b; do
+ [ "$a" = "---" ] && [ "$b" = "" ] && break
+ eval "front_${a%:}=\"$b\""
+ done
+ } < "$1"
+}
+
+## gen generates site content from source files
+gen() {
+ [ -d "$dest" ] || mkdir -p "$dest"
+ for f in *.md; do
+ [ "$f" = "*.md" ] && continue
+ g="$dest/${f%.md}.html"
+ [ "$f" -ot "$g" ] && continue
+ echo "f: $f $g"
+ front "$f"
+ {
+ header
+ md2html "$f"
+ footer
+ } > "$g"
+ done
+}
+
+header() {
+ cat <<- EOT
+ <title>$front_title</title>
+ <meta charset="utf-8">
+ <style>body {max-width: 52em; margin: 1em auto; padding: 1em}</style>
+ EOT
+}
+
## help prints this program documentation
help() { awk '/^## / {print substr($0, 4)}' "$cmd"; }