-
Notifications
You must be signed in to change notification settings - Fork 1
Customizing
The /confs/default.json
is the default configuration for IMD.
Each section has a name
- error, error message
- default, default text
- highlight, highlighted section
- h1, header 1
# h1
- h2, header 2
## h2
- h3, header 4
### h3
- list, list and small underline
- list
or
line
----
- tab-list, tab list
> tablist
- brackets, the brackets on a link or check
[alt](link)
or- [check] list
- alt, the alt of a link or check in a check box
[alt](link)
or- [check] list
- link, link of a link
[alt](link)
- underline, underline
underline
=========
- italic, italics
*ital*
- bold, bold
**bold**
- bold-italic, italic and bold
***ital-bold***
- syntax, default color for syntax
- operator, operators
~!@$%^&*-+=|:;,#/\<>
- string, string
'c' "string"
and back ticks - number, numbers
0123456789.
- bracket, brackets
()[]{}
- box, box bar / outline
- box-text, text inside of the box
- fg, The foreground color
- bg, the background color
- styles, the text styles
#RRGGBB
exp
#ff0000
- default
- black / gray
- bright black / bright gray
- red
- bright red
- green
- bright green
- yellow
- bright yellow
- blue
- bright blue
- purple
- bright purple
- cyan
- bright cyan
- white
- bright white
- bold
- dim
- italic / ital
- underline / line
- blink / blinking
- reverse, reverse colors
- strike, strike through the text
- hidden / hide, no see
- OUT, output binary
- CC, base C compiler options -I./inc needed
- VER, version if editing please add
E-
to the start so people know it's an edited version.
- all, test
- test, random tests
- configure, commands ran before any building
- clean, clean up unneeded files
- build, build for development
- install, install IMD
- uninstall, uninstall IMD
- ${OUT}, base build of IMD
conf.py generates the conf.h file from /confs/default.json, sorry that conf.py is spaghetti code.
genversion get git rev-list and generates vinfo.h
Controls all other function calls.
Contains useful functions.
Reads argc and argv, returns settings structure with the parse data.
Also shows version info is -v
or --version
Reads file or pipe.
Styles the raw data using bit fields, counters, and colors.
Only ran if -s
and --no-syntax
are not set.
An extension of /src/styling.c
used for styling syntax.
Splits data input into a list of strings to be less or raw printed, and decorated.
Only ran if -r
or --raw
is set.
Prints data with decoration if not -d
and --no-decoration
.
Only ran if -r
and --raw
are not set.
Print data with decoration if not -d
and --no-decoration
.
Prints with a pager and some simple vim inspired commands.
Use char keypress ()
to get one keypress.
void addDir (char *path, struct StrArray *files);
Gets all .md or .MD files in all directories and sub-directories of path
then adds them to files.
ssize_t showMenu (struct StrArray files, struct Settings s);
Show and selects all files. Return value is the index of the file in files
or -1 if non selected.
void menu (struct Settings *s);
Controls and sets up the menu. Value s->file
will be changed to selected file.
Defines some useful chars.
Defines stuff for /src/reader.c
Defines bit field data and Settings structure.
Defines StrArray structure.
Defines bit field data.
Defines menu function.
Edit the ./inc/
or ./src/
directories in the git repo.
Or once installed edit the /etc/imd/src/
directory then build with imd-rebuild <cflags>
. Warning: the genversion
and conf.py
files have already been ran at install and not copied to /etc/imd/
. Edit /etc/imd/src/vinfo.h
file for version info, and /etc/imd/src/conf.h
for colors.