diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index bd2cfac..0000000 --- a/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -winlib/* linguist-vendored -src/lib/* linguist-vendored -icon.inl linguist-vendored diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 375655a..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,3 +0,0 @@ -# These are supported funding model platforms - -github: rxi diff --git a/TODO b/TODO index f3d2a99..d029e56 100644 --- a/TODO +++ b/TODO @@ -7,10 +7,12 @@ [x] makefile: add install and uninstall [ ] makefile fix permissions of installed data dir [ ] SDL: disable key not recognized messages -[ ] font: use system fonts +[U] font: use system fonts [ ] font: implement hashmap of already rendered glyphs and only re-draw the ones that are not in that map [ ] font: resize text on the fly +[ ] font: change font on the fly from a list of installed fonts + [ ] implement a user directory for fonts (like plugins) [ ] ui: change ui scale on the fly [x] add menu to exec arbitrary command -> added console [ ] that command can be what is selected @@ -20,6 +22,11 @@ [ ] console: automatically switch focus to the previous rootview when hiding it or selecting something from a treeview [ ] doc: detect file changes with hash +[ ] doc: save files with sudo (or other command) +[ ] doc: complete rewrite of history handling, by default the whole document is + selected for updates but when un-doing with a selection then the action + is limited to that part of the document (this is a feature from emacs) + [ ]: also make it configurable [x] add horizontal scroll [ ] add a cross to close tab [ ] add context menu to various things @@ -62,4 +69,14 @@ [ ] do not open doc in new tab if current tab has an unchanged document [ ] doc: add auto close brackets and quotes [ ] doc: highlight matching brackets and quotes pairs +[ ] doc: have a list of file extensions and handlers for those extensions, so + that we don't try to open like pdf files or tarballs and get jibberish [ ] view: implement get_scrollable_size() +[ ] tree: add icons for common actions + [ ] delete file + [ ] new file + [ ] rename file + [ ] move file + [ ] copy file +[ ] tree: make treeview resizable +[ ] FIX MASSIVE MEMORY LEAK diff --git a/data/core/init.lua b/data/core/init.lua index ae93c02..ea3f667 100644 --- a/data/core/init.lua +++ b/data/core/init.lua @@ -104,12 +104,12 @@ function core.init() if file then local last_dir = file:read() file:close() - if last_dir then - info = system.get_file_info(last_dir) - if info and info.type == "dir" then - project_dir = last_dir - end - end + if last_dir then + info = system.get_file_info(last_dir) + if info and info.type == "dir" then + project_dir = last_dir + end + end end end end diff --git a/icon64.png b/icon64.png new file mode 100644 index 0000000..0c41fde Binary files /dev/null and b/icon64.png differ diff --git a/makefile b/makefile index 327c0cb..471a880 100644 --- a/makefile +++ b/makefile @@ -1,21 +1,23 @@ -.POSIX: - PREFIX = /usr/local MANPREFIX = ${PREFIX}/share/man -#CC ?= gcc +CC ?= gcc SRCDIR = ./src -CFLAGS = -Wall -Werror -pedantic -O3 -std=c11 -fno-strict-aliasing \ +CFLAGS = -Wall -Werror -pedantic -O2 -std=c11 -fno-strict-aliasing \ -I${SRCDIR} -I${PREFIX}/include/ -DLUA_USE_POSIX -D_PREFIX="${PREFIX}" -# remove this -LDFLAGS = -L${PREFIX}/lib -lSDL2 -lm -llua5.2 + #-I/usr/include/SDL2 -I/usr/include/directfb -D_REENTRANT \ + #-I/usr/include/lua5.2 +# on void +LDFLAGS = -L${PREFIX}/lib -lpthread -lm -lSDL2 -llua5.2 +## on alpine +#LDFLAGS = -L${PREFIX}/lib -L/usr/lib/lua5.2 -lpthread -lm -lSDL2 -llua FILES != find ${SRCDIR} -name '*.c' OBJS = ${FILES:.c=.o} .c.o: - ${CC} -c ${CFLAGS} $< -o $@ + ${CC} -c $< -o $@ ${CFLAGS} lite: ${OBJS} - ${CC} ${LDFLAGS} -o $@ ${OBJS} + ${CC} -o $@ ${OBJS} ${LDFLAGS} install: lite mkdir -p ${DESTDIR}${PREFIX}/share/lite @@ -28,8 +30,12 @@ install: lite # mkdir -p ${DESTDIR}${MANPREFIX}/man1 # cp -f us.1 ${DESTDIR}${MANPREFIX}/man1/us.1 # chmod 644 ${DESTDIR}${MANPREFIX}/man1/us.1 + mkdir -p ${DESTDIR}${PREFIX}/share/applications/ cp -f lite.desktop ${DESTDIR}${PREFIX}/share/applications/lite.desktop + mkdir -p ${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/ cp -f icon.ico ${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/lite.ico + mkdir -p ${DESTDIR}${PREFIX}/share/icons/hicolor/64x64/apps/ + cp -f icon64.png ${DESTDIR}${PREFIX}/share/icons/hicolor/64x64/apps/lite.png uninstall: rm -f ${DESTDIR}${PREFIX}/bin/lite \