mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 11:46:01 +01:00
CSS definitions for index mode
This commit is contained in:
parent
f4ff19d965
commit
9a0ff4b79b
4 changed files with 34 additions and 8 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -19,6 +19,7 @@ zathura.1
|
||||||
zathurarc.5
|
zathurarc.5
|
||||||
.version-checks/
|
.version-checks/
|
||||||
dbus-interface-definitions.c
|
dbus-interface-definitions.c
|
||||||
|
css-definitions.c
|
||||||
.ycm_extra_conf.py
|
.ycm_extra_conf.py
|
||||||
.ropeproject
|
.ropeproject
|
||||||
compile_commands.json
|
compile_commands.json
|
||||||
|
|
24
Makefile
24
Makefile
|
@ -4,7 +4,7 @@ include config.mk
|
||||||
include colors.mk
|
include colors.mk
|
||||||
include common.mk
|
include common.mk
|
||||||
|
|
||||||
OSOURCE = $(filter-out dbus-interface-definitions.c, $(wildcard *.c))
|
OSOURCE = $(filter-out css-definitions.c, $(filter-out dbus-interface-definitions.c, $(wildcard *.c)))
|
||||||
HEADER = $(wildcard *.h)
|
HEADER = $(wildcard *.h)
|
||||||
HEADERINST = version.h document.h macros.h page.h types.h plugin-api.h links.h
|
HEADERINST = version.h document.h macros.h page.h types.h plugin-api.h links.h
|
||||||
|
|
||||||
|
@ -37,10 +37,11 @@ ifeq (,$(findstring -DLOCALEDIR,${CPPFLAGS}))
|
||||||
CPPFLAGS += -DLOCALEDIR=\"${LOCALEDIR}\"
|
CPPFLAGS += -DLOCALEDIR=\"${LOCALEDIR}\"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OBJECTS = $(patsubst %.c, %.o, $(SOURCE)) dbus-interface-definitions.o
|
OBJECTS = $(patsubst %.c, %.o, $(SOURCE)) dbus-interface-definitions.o css-definitions.o
|
||||||
DOBJECTS = $(patsubst %.o, %.do, $(OBJECTS))
|
DOBJECTS = $(patsubst %.o, %.do, $(OBJECTS))
|
||||||
|
|
||||||
all: options ${PROJECT} po build-manpages
|
all: options ${PROJECT} po
|
||||||
|
# build-manpages
|
||||||
|
|
||||||
# pkg-config based version checks
|
# pkg-config based version checks
|
||||||
.version-checks/%: config.mk
|
.version-checks/%: config.mk
|
||||||
|
@ -68,11 +69,18 @@ version.h: version.h.in config.mk
|
||||||
$(QUIET)mv version.h.tmp version.h
|
$(QUIET)mv version.h.tmp version.h
|
||||||
|
|
||||||
dbus-interface-definitions.c: data/org.pwmt.zathura.xml
|
dbus-interface-definitions.c: data/org.pwmt.zathura.xml
|
||||||
$(QUIET)echo '#include "dbus-interface-definitions.h"' > dbus-interface-definitions.c.tmp
|
$(QUIET)echo '#include "dbus-interface-definitions.h"' > $@.tmp
|
||||||
$(QUIET)echo 'const char* DBUS_INTERFACE_XML =' >> dbus-interface-definitions.c.tmp
|
$(QUIET)echo 'const char* DBUS_INTERFACE_XML =' >> $@.tmp
|
||||||
$(QUIET)sed 's/^\(.*\)$$/"\1\\n"/' data/org.pwmt.zathura.xml >> dbus-interface-definitions.c.tmp
|
$(QUIET)sed 's/^\(.*\)$$/"\1\\n"/' data/org.pwmt.zathura.xml >> $@.tmp
|
||||||
$(QUIET)echo ';' >> dbus-interface-definitions.c.tmp
|
$(QUIET)echo ';' >> $@.tmp
|
||||||
$(QUIET)mv dbus-interface-definitions.c.tmp dbus-interface-definitions.c
|
$(QUIET)mv $@.tmp $@.c
|
||||||
|
|
||||||
|
css-definitions.c: data/zathura.css_t
|
||||||
|
$(QUIET)echo '#include "css-definitions.h"' > $@.tmp
|
||||||
|
$(QUIET)echo 'const char* CSS_TEMPLATE =' >> $@.tmp
|
||||||
|
$(QUIET)sed 's/^\(.*\)$$/"\1\\n"/' $< >> $@.tmp
|
||||||
|
$(QUIET)echo ';' >> $@.tmp
|
||||||
|
$(QUIET)mv $@.tmp $@
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(call colorecho,CC,$<)
|
$(call colorecho,CC,$<)
|
||||||
|
|
8
css-definitions.h
Normal file
8
css-definitions.h
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
/* See LICENSE file for license and copyright information */
|
||||||
|
|
||||||
|
#ifndef GIRARA_CSS_DEFINITIONS_H
|
||||||
|
#define GIRARA_CSS_DEFINITIONS_H
|
||||||
|
|
||||||
|
extern const char* CSS_TEMPLATE;
|
||||||
|
|
||||||
|
#endif
|
9
data/zathura.css_t
Normal file
9
data/zathura.css_t
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#@session@ .indexmode {
|
||||||
|
color: @index-fg@;
|
||||||
|
background-color: @index-bg@;
|
||||||
|
}
|
||||||
|
|
||||||
|
#@session@ .indexmode:selected {
|
||||||
|
color: @index-active-fg@;
|
||||||
|
background-color: @index-active-bg@;
|
||||||
|
}
|
Loading…
Reference in a new issue