From 11f24a2e24758514ad70dd1641278cceb46b5eb6 Mon Sep 17 00:00:00 2001 From: mhsn Date: Thu, 26 Mar 2026 11:42:19 +0000 Subject: add st-sx --- x11-terms/st-sx/files/config.diff | 130 ++++++++++++++++++++++++++++++++++++++ x11-terms/st-sx/st-sx-9999.ebuild | 69 ++++++++++++++++++++ 2 files changed, 199 insertions(+) create mode 100644 x11-terms/st-sx/files/config.diff create mode 100644 x11-terms/st-sx/st-sx-9999.ebuild diff --git a/x11-terms/st-sx/files/config.diff b/x11-terms/st-sx/files/config.diff new file mode 100644 index 0000000..16d3889 --- /dev/null +++ b/x11-terms/st-sx/files/config.diff @@ -0,0 +1,130 @@ +diff --git i/config.def.h w/config.def.h +index 22adcdf..652626e 100644 +--- i/config.def.h ++++ w/config.def.h +@@ -5,19 +5,21 @@ + * + * Normal font. See http://freedesktop.org/software/fontconfig/fontconfig-user.html + */ +-static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true"; ++static char *font = "Cozette:size=20:antialias=false:autohint=false"; + + /* Bold font. Optional. Note: The font size is set automatically for this font. */ +-static char *font_bold; ++static char *font_bold = "Cozette:size=20:antialias=false:autohint=false"; + + /* Italic font. Optional. Note: The font size is set automatically for this font. */ +-static char *font_italic; ++static char *font_italic = "Cozette:size=20:antialias=false:autohint=false"; + + /* Bold italic font. Optional. Note: The font size is set automatically for this font. */ +-static char *font_bolditalic; ++static char *font_bolditalic = "Cozette:size=20:antialias=false:autohint=false"; + + /* Spare fonts */ + static char *font2[] = { ++ "IBM Plex Mono:pixelsize=20:antialias=true:autohint=false", ++ "Unifont:size=20:antialias=false:autohint=false", + /* "Inconsolata for Powerline:pixelsize=12:antialias=true:autohint=true", */ + /* "Hack Nerd Font Mono:pixelsize=11:antialias=true:autohint=true", */ + }; +@@ -180,7 +181,7 @@ int ligatures = 0; + * need to comment out the ligature lines in config.mk to avoid compiling and + * linking the HarfBuzz code. + */ +-#define DISABLE_LIGATURES 0 ++#define DISABLE_LIGATURES 1 + + /* + * Font features for ligatures. +@@ -271,33 +272,33 @@ float alphaUnfocused = 0.6; + /* Terminal colors (16 first used in escape sequence) */ + static const char *colorname[] = { + /* 8 normal colors */ +- "black", +- "red3", +- "green3", +- "yellow3", +- "blue2", +- "magenta3", +- "cyan3", +- "gray90", ++ "#152126", /* black */ ++ "#b90440", /* red */ ++ "#07b307", /* green */ ++ "#d7ac00", /* yellow */ ++ "#876bd6", /* blue */ ++ "#db498b", /* purple */ ++ "#41c7d1", /* cyan */ ++ "#c0b1c2", /* white */ + + /* 8 bright colors */ +- "gray50", +- "red", +- "green", +- "yellow", +- "#5c5cff", +- "magenta", +- "cyan", +- "white", ++ "#5f5e66", /* black */ ++ "#ff246d", /* red */ ++ "#00ed00", /* green */ ++ "#ffd324", /* yellow */ ++ "#7442ff", /* blue */ ++ "#ff2088", /* purple */ ++ "#13efff", /* cyan */ ++ "#e1e1e6", /* white */ + + [255] = 0, + + /* more colors can be added after 255 to use with DefaultXX */ +- "#cccccc", /* 256 -> cursor */ +- "#555555", /* 257 -> rev cursor */ +- "gray90", /* 258 -> foreground */ +- "black", /* 259 -> background */ +- "black", /* 260 -> background unfocused */ ++ "#e1e1e6", /* 256 -> cursor */ ++ "#5f5e66", /* 257 -> rev cursor */ ++ "#c0b1c2", /* 258 -> foreground */ ++ "#152126", /* 259 -> background */ ++ "#152126", /* 260 -> background unfocused */ + "gray90", /* 261 -> visual bell */ + }; + +@@ -335,14 +336,14 @@ unsigned int kbselectbg = 258; + unsigned int scrollbackindicatorfg = 258; + + /* Bold text is not rendered in bright color. 0: off, 1: on */ +-unsigned int bold_is_not_bright = 1; ++unsigned int bold_is_not_bright = 0; + + /* + * Dynamic cursor color + * 0: the cursor color is fixed (default st behavior) + * 1: the cursor uses reverse colors based on the colors of the text cell + */ +-unsigned int dynamic_cursor_color = 1; ++unsigned int dynamic_cursor_color = 0; + + /* + * https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-Ps-SP-q.1D81 +diff --git i/config.mk w/config.mk +index 0a02aee..89bf364 100644 +--- i/config.mk ++++ w/config.mk +@@ -19,10 +19,10 @@ XRENDER = -lXrender + + # ligatures (you need to comment out the four lines below if ligatures are + # permanently disabled in config.h) +-LIGATURES_C = hb.c +-LIGATURES_H = hb.h +-LIGATURES_INC = `$(PKG_CONFIG) --cflags harfbuzz` +-LIGATURES_LIBS = `$(PKG_CONFIG) --libs harfbuzz` ++#LIGATURES_C = hb.c ++#LIGATURES_H = hb.h ++#LIGATURES_INC = `$(PKG_CONFIG) --cflags harfbuzz` ++#LIGATURES_LIBS = `$(PKG_CONFIG) --libs harfbuzz` + + # sixel + SIXEL_C = sixel.c sixel_hls.c diff --git a/x11-terms/st-sx/st-sx-9999.ebuild b/x11-terms/st-sx/st-sx-9999.ebuild new file mode 100644 index 0000000..6aabf6b --- /dev/null +++ b/x11-terms/st-sx/st-sx-9999.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit git-r3 desktop toolchain-funcs + +DESCRIPTION="Simple terminal implementation for X" +HOMEPAGE="https://st.suckless.org/" +EGIT_REPO_URI="https://github.com/veltza/st-sx" + +PATCHES=( + ${FILESDIR}/config.diff +) + +LICENSE="MIT" +SLOT="0" + +RDEPEND=" + >=sys-libs/ncurses-6.0:0= + media-libs/fontconfig + media-libs/gd + x11-libs/libX11 + x11-libs/libXft + x11-terms/st-terminfo +" +DEPEND=" + ${RDEPEND} + x11-base/xorg-proto +" +BDEPEND="virtual/pkgconfig" + +src_prepare() { + default + + sed -i \ + -e "/^X11LIB/{s:/usr/X11R6/lib:/usr/$(get_libdir)/X11:}" \ + -e '/^STLDFLAGS/s|= .*|= $(LDFLAGS) $(LIBS)|g' \ + -e '/^X11INC/{s:/usr/X11R6/include:/usr/include/X11:}' \ + config.mk || die + sed -i \ + -e '/tic/d' \ + Makefile || die +} + +src_configure() { + sed -i \ + -e "s|pkg-config|$(tc-getPKG_CONFIG)|g" \ + config.mk || die + + tc-export CC +} + +src_install() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}"/usr install + + dodoc TODO + + make_desktop_entry ${PN} simpleterm utilities-terminal 'System;TerminalEmulator;' '' +} + +pkg_postinst() { + if [[ -z "${REPLACING_VERSIONS}" ]]; then + elog "Please ensure a usable font is installed, like" + elog " media-fonts/corefonts" + elog " media-fonts/dejavu" + elog " media-fonts/urw-fonts" + fi +} -- cgit v1.2.3