diff --git a/g910-gkeys-setup.org b/g910-gkeys-setup.org index 32e86ba..db2db05 100644 --- a/g910-gkeys-setup.org +++ b/g910-gkeys-setup.org @@ -206,16 +206,13 @@ keycode 199 = F21 F21 F21 F21 F21 F21 ** User configuration *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]). - -*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. +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. 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*"). - ~Shift-G1~: Launch *Gnome Terminal*. -- ~G2~ (including with modifiers): Send strings/commands results 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~. +- ~G2~ (including with modifiers): Send ~strings~ or ~commands output~ to active window. +- ~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. All settings below (except for ~G5~) are configurable in ~Settings/keyboard~, ~Application Shortcuts~ tab, or, for pasting text, via ~autokey~ : #+CAPTION: Xfce keyboard settings diff --git a/patrick-markdown/Makefile b/patrick-markdown/Makefile index 7672313..95ddebc 100644 --- a/patrick-markdown/Makefile +++ b/patrick-markdown/Makefile @@ -1,10 +1,11 @@ SHELL := /bin/bash # CSS to be included as stylesheets and alternate stylesheets -CSS := assets/ghost.css -ALTCSS := assets/ghost-dark.css assets/ghost-caca.css +CSS := assets/ghost-dark.css +ALTCSS := assets/ghost.css -TARGETS := $(patsubst %.md,%.html,$(wildcard *.md)) +MDFILES := $(wildcard *.md) +TARGETS := $(patsubst %.md,%.html,$(MDFILES)) CSSINC := css.inc # 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) \ --from=gfm --to=html5 -.PHONY: all html clean +.PHONY: titles all html clean +#all: $(CSSINC) titles html all: $(CSSINC) html html: $(TARGETS) @@ -40,5 +42,10 @@ $(CSSINC): $(CSS) $(ALTCSS) @$(foreach css,$(ALTCSS),$(call ADD_LINE,$(css),alternate stylesheet,$@)) %.html: %.md $(CSSINC) - @echo generating $@ - @pandoc $(OPTS) --metadata=title:"$(call TITLE,$<)" -o $@ $< + @echo -n "generating $@... " + @if ! grep -q "^#" $< ; then \ + echo "ERROR (no title), skipping." ; \ + else \ + pandoc $(OPTS) --metadata=title:"$(call TITLE,$<)" -o $@ $< ; \ + echo done. ; \ + fi