st/config.mk

55 lines
1.5 KiB
Makefile
Raw Normal View History

# st version
VERSION = 0.9
# Customize below to fit your system
# paths
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
PKG_CONFIG = pkg-config
# Uncomment this for the alpha patch / ALPHA_PATCH
Reworking sixel implementation based on veltza's implementation (#117) * sixel: remove black bars from sixel images When the images don't fully cover the text cells, black bars are added to them. This fix removes those bars, but if you need the old behavior, you can restore it by setting 'sixelremovebars' to zero in config.h * sixel: fix a potential memory leak * sixel: improve behavior with text reflow * sixel: prevent animated gifs from choking the terminal Animated gifs constantly spawn new images that eventually choke the terminal because the old animation frames are kept in the image buffer. This fix removes overlapping images from the image buffer and prevents them from piling up. * sixel: add zooming and clipping * sixel: copying bulk of changes * sixel: move sixel_parser_parse() and add missing sequences and blocks (#113) - Move sixel_parser_parse() from tputc() to twrite() - Add missing 8452, DECSDM, XTSMGRAPHICS and XTWINOPS sequences - Add more conditional blocks for the scrollback and sync patches - Remove unused reflow_y from ImageList. It is only used for the scrollback-reflow patch in st-sx. * sixel: update vtiden to VT200 family * sixel: fix scrolling issues inside tmux (#114) tmux is using the scrolling region and sequence to clear the screen below the shell prompt. This peculiar behavior caused the tscrollup() function to be called, which always scrolled the images regardless of whether they were inside the region or not. So the images moved out of place whenever the bottom of the screen was cleared. This fix checks that the images are inside the region before scrolling them. * sixel: prevent images from being deleted when resizing (#115) This fixes resizing issues outside of tmux not inside. * Rewriting tresize logic based on veltza's proposed implementation in PR #115 * tresize: correction for tscrollup call when scrollback patch is used --------- Co-authored-by: veltza <106755522+veltza@users.noreply.github.com>
2024-03-07 08:22:44 +00:00
#XRENDER = `$(PKG_CONFIG) --libs xrender`
# Uncomment this for the themed cursor patch / THEMED_CURSOR_PATCH
Reworking sixel implementation based on veltza's implementation (#117) * sixel: remove black bars from sixel images When the images don't fully cover the text cells, black bars are added to them. This fix removes those bars, but if you need the old behavior, you can restore it by setting 'sixelremovebars' to zero in config.h * sixel: fix a potential memory leak * sixel: improve behavior with text reflow * sixel: prevent animated gifs from choking the terminal Animated gifs constantly spawn new images that eventually choke the terminal because the old animation frames are kept in the image buffer. This fix removes overlapping images from the image buffer and prevents them from piling up. * sixel: add zooming and clipping * sixel: copying bulk of changes * sixel: move sixel_parser_parse() and add missing sequences and blocks (#113) - Move sixel_parser_parse() from tputc() to twrite() - Add missing 8452, DECSDM, XTSMGRAPHICS and XTWINOPS sequences - Add more conditional blocks for the scrollback and sync patches - Remove unused reflow_y from ImageList. It is only used for the scrollback-reflow patch in st-sx. * sixel: update vtiden to VT200 family * sixel: fix scrolling issues inside tmux (#114) tmux is using the scrolling region and sequence to clear the screen below the shell prompt. This peculiar behavior caused the tscrollup() function to be called, which always scrolled the images regardless of whether they were inside the region or not. So the images moved out of place whenever the bottom of the screen was cleared. This fix checks that the images are inside the region before scrolling them. * sixel: prevent images from being deleted when resizing (#115) This fixes resizing issues outside of tmux not inside. * Rewriting tresize logic based on veltza's proposed implementation in PR #115 * tresize: correction for tscrollup call when scrollback patch is used --------- Co-authored-by: veltza <106755522+veltza@users.noreply.github.com>
2024-03-07 08:22:44 +00:00
#XCURSOR = `$(PKG_CONFIG) --libs xcursor`
# Uncomment the lines below for the ligatures patch / LIGATURES_PATCH
#LIGATURES_C = hb.c
#LIGATURES_H = hb.h
#LIGATURES_INC = `$(PKG_CONFIG) --cflags harfbuzz`
#LIGATURES_LIBS = `$(PKG_CONFIG) --libs harfbuzz`
# Uncomment this for the SIXEL patch / SIXEL_PATCH
#SIXEL_C = sixel.c sixel_hls.c
Reworking sixel implementation based on veltza's implementation (#117) * sixel: remove black bars from sixel images When the images don't fully cover the text cells, black bars are added to them. This fix removes those bars, but if you need the old behavior, you can restore it by setting 'sixelremovebars' to zero in config.h * sixel: fix a potential memory leak * sixel: improve behavior with text reflow * sixel: prevent animated gifs from choking the terminal Animated gifs constantly spawn new images that eventually choke the terminal because the old animation frames are kept in the image buffer. This fix removes overlapping images from the image buffer and prevents them from piling up. * sixel: add zooming and clipping * sixel: copying bulk of changes * sixel: move sixel_parser_parse() and add missing sequences and blocks (#113) - Move sixel_parser_parse() from tputc() to twrite() - Add missing 8452, DECSDM, XTSMGRAPHICS and XTWINOPS sequences - Add more conditional blocks for the scrollback and sync patches - Remove unused reflow_y from ImageList. It is only used for the scrollback-reflow patch in st-sx. * sixel: update vtiden to VT200 family * sixel: fix scrolling issues inside tmux (#114) tmux is using the scrolling region and sequence to clear the screen below the shell prompt. This peculiar behavior caused the tscrollup() function to be called, which always scrolled the images regardless of whether they were inside the region or not. So the images moved out of place whenever the bottom of the screen was cleared. This fix checks that the images are inside the region before scrolling them. * sixel: prevent images from being deleted when resizing (#115) This fixes resizing issues outside of tmux not inside. * Rewriting tresize logic based on veltza's proposed implementation in PR #115 * tresize: correction for tscrollup call when scrollback patch is used --------- Co-authored-by: veltza <106755522+veltza@users.noreply.github.com>
2024-03-07 08:22:44 +00:00
#SIXEL_LIBS = `$(PKG_CONFIG) --libs imlib2`
# includes and libs, uncomment harfbuzz for the ligatures patch
INCS = -I$(X11INC) \
`$(PKG_CONFIG) --cflags fontconfig` \
`$(PKG_CONFIG) --cflags freetype2` \
$(LIGATURES_INC)
Reworking sixel implementation based on veltza's implementation (#117) * sixel: remove black bars from sixel images When the images don't fully cover the text cells, black bars are added to them. This fix removes those bars, but if you need the old behavior, you can restore it by setting 'sixelremovebars' to zero in config.h * sixel: fix a potential memory leak * sixel: improve behavior with text reflow * sixel: prevent animated gifs from choking the terminal Animated gifs constantly spawn new images that eventually choke the terminal because the old animation frames are kept in the image buffer. This fix removes overlapping images from the image buffer and prevents them from piling up. * sixel: add zooming and clipping * sixel: copying bulk of changes * sixel: move sixel_parser_parse() and add missing sequences and blocks (#113) - Move sixel_parser_parse() from tputc() to twrite() - Add missing 8452, DECSDM, XTSMGRAPHICS and XTWINOPS sequences - Add more conditional blocks for the scrollback and sync patches - Remove unused reflow_y from ImageList. It is only used for the scrollback-reflow patch in st-sx. * sixel: update vtiden to VT200 family * sixel: fix scrolling issues inside tmux (#114) tmux is using the scrolling region and sequence to clear the screen below the shell prompt. This peculiar behavior caused the tscrollup() function to be called, which always scrolled the images regardless of whether they were inside the region or not. So the images moved out of place whenever the bottom of the screen was cleared. This fix checks that the images are inside the region before scrolling them. * sixel: prevent images from being deleted when resizing (#115) This fixes resizing issues outside of tmux not inside. * Rewriting tresize logic based on veltza's proposed implementation in PR #115 * tresize: correction for tscrollup call when scrollback patch is used --------- Co-authored-by: veltza <106755522+veltza@users.noreply.github.com>
2024-03-07 08:22:44 +00:00
LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft ${SIXEL_LIBS} ${XRENDER} ${XCURSOR}\
`$(PKG_CONFIG) --libs fontconfig` \
`$(PKG_CONFIG) --libs freetype2` \
$(LIGATURES_LIBS)
# flags
STCPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600
STCFLAGS = $(INCS) $(STCPPFLAGS) $(CPPFLAGS) $(CFLAGS)
STLDFLAGS = $(LIBS) $(LDFLAGS)
# OpenBSD:
#CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
#LIBS = -L$(X11LIB) -lm -lX11 -lutil -lXft \
2021-02-15 13:37:37 +00:00
# `pkg-config --libs fontconfig` \
# `pkg-config --libs freetype2`
#MANPREFIX = ${PREFIX}/man
# compiler and linker
# CC = c99