Makefile fix (detect missing title)
This commit is contained in:
@@ -206,16 +206,13 @@ keycode 199 = F21 F21 F21 F21 F21 F21
|
|||||||
** User configuration
|
** User configuration
|
||||||
*Note*: Configuration below will make the ~G-keys~ active only when user is logged-on, as any other key.
|
*Note*: Configuration below will make the ~G-keys~ active only when user is logged-on, as any other key.
|
||||||
|
|
||||||
We will assign the F-keys we defined in ~config.json~ to any program (this includes graphical programs), or to send a string to active window (using *xvkbd*[fn:1]).
|
We will assign the F-keys we defined in ~config.json~ to run any program (this includes graphical programs), or to send a string/command output to active window.
|
||||||
|
|
||||||
*xvkbd* not only allows to send strings ("hello, World!"), but also modifiers (as ~Control-A~, ~Alt-B~, ~Control-Left~), mouse events (motion, buttons), etc... This is a subset of the *typeout* option of config.json. See ~xbkbd man page~ for more details.
|
|
||||||
|
|
||||||
Below are some examples (screenshots from ~Xubuntu 22.10~). We will define the following actions :
|
Below are some examples (screenshots from ~Xubuntu 22.10~). We will define the following actions :
|
||||||
- ~G1~: Activate the *Emacs* main window (whose title is always "*GNU Emacs*").
|
- ~G1~: Activate the *Emacs* main window (whose title is always "*GNU Emacs*").
|
||||||
- ~Shift-G1~: Launch *Gnome Terminal*.
|
- ~Shift-G1~: Launch *Gnome Terminal*.
|
||||||
- ~G2~ (including with modifiers): Send strings/commands results to active window.
|
- ~G2~ (including with modifiers): Send ~strings~ or ~commands output~ to active window.
|
||||||
- ~G4~: Send current date to active window.
|
- ~G5~: Assigned to ~Hyper~ modifier: ~G5+a~ will be ~Hyper-a~, as ~Control+a~ is ~Control-a~.
|
||||||
- ~G5~: Assigned to ~Hyper~ modifier: ~G5 + a~ will be ~Hyper-a~, as ~Control + a~ is ~Control-a~.
|
|
||||||
- ~G6~: Will move the cursor to top-left corner.
|
- ~G6~: Will move the cursor to top-left corner.
|
||||||
All settings below (except for ~G5~) are configurable in ~Settings/keyboard~, ~Application Shortcuts~ tab, or, for pasting text, via ~autokey~ :
|
All settings below (except for ~G5~) are configurable in ~Settings/keyboard~, ~Application Shortcuts~ tab, or, for pasting text, via ~autokey~ :
|
||||||
#+CAPTION: Xfce keyboard settings
|
#+CAPTION: Xfce keyboard settings
|
||||||
|
@@ -1,10 +1,11 @@
|
|||||||
SHELL := /bin/bash
|
SHELL := /bin/bash
|
||||||
|
|
||||||
# CSS to be included as stylesheets and alternate stylesheets
|
# CSS to be included as stylesheets and alternate stylesheets
|
||||||
CSS := assets/ghost.css
|
CSS := assets/ghost-dark.css
|
||||||
ALTCSS := assets/ghost-dark.css assets/ghost-caca.css
|
ALTCSS := assets/ghost.css
|
||||||
|
|
||||||
TARGETS := $(patsubst %.md,%.html,$(wildcard *.md))
|
MDFILES := $(wildcard *.md)
|
||||||
|
TARGETS := $(patsubst %.md,%.html,$(MDFILES))
|
||||||
CSSINC := css.inc
|
CSSINC := css.inc
|
||||||
|
|
||||||
# our main html5 template, mostly taken from :
|
# our main html5 template, mostly taken from :
|
||||||
@@ -22,8 +23,9 @@ TITLE = $(shell sed -n '0,/^\#/ s/^[\# ]*//p' $1)
|
|||||||
OPTS = --standalone --include-in-header=$(CSSINC) --template=$(TEMPLATE) \
|
OPTS = --standalone --include-in-header=$(CSSINC) --template=$(TEMPLATE) \
|
||||||
--from=gfm --to=html5
|
--from=gfm --to=html5
|
||||||
|
|
||||||
.PHONY: all html clean
|
.PHONY: titles all html clean
|
||||||
|
|
||||||
|
#all: $(CSSINC) titles html
|
||||||
all: $(CSSINC) html
|
all: $(CSSINC) html
|
||||||
|
|
||||||
html: $(TARGETS)
|
html: $(TARGETS)
|
||||||
@@ -40,5 +42,10 @@ $(CSSINC): $(CSS) $(ALTCSS)
|
|||||||
@$(foreach css,$(ALTCSS),$(call ADD_LINE,$(css),alternate stylesheet,$@))
|
@$(foreach css,$(ALTCSS),$(call ADD_LINE,$(css),alternate stylesheet,$@))
|
||||||
|
|
||||||
%.html: %.md $(CSSINC)
|
%.html: %.md $(CSSINC)
|
||||||
@echo generating $@
|
@echo -n "generating $@... "
|
||||||
@pandoc $(OPTS) --metadata=title:"$(call TITLE,$<)" -o $@ $<
|
@if ! grep -q "^#" $< ; then \
|
||||||
|
echo "ERROR (no title), skipping." ; \
|
||||||
|
else \
|
||||||
|
pandoc $(OPTS) --metadata=title:"$(call TITLE,$<)" -o $@ $< ; \
|
||||||
|
echo done. ; \
|
||||||
|
fi
|
||||||
|
Reference in New Issue
Block a user