add local configurations

master
an 2019-07-27 17:15:50 -04:00
parent caa1d8fbea
commit f6578a15c5
6 changed files with 56 additions and 40 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*.o
st

View File

@ -15,16 +15,13 @@ options:
@echo "LDFLAGS = $(STLDFLAGS)"
@echo "CC = $(CC)"
config.h:
cp config.def.h config.h
.c.o:
$(CC) $(STCFLAGS) -c $<
st.o: config.h st.h win.h
x.o: arg.h config.h st.h win.h
st.o: config.def.h st.h win.h
x.o: arg.h config.def.h st.h win.h
$(OBJ): config.h config.mk
$(OBJ): config.def.h config.mk
st: $(OBJ)
$(CC) -o $@ $(OBJ) $(STLDFLAGS)
@ -43,12 +40,13 @@ dist: clean
install: st
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f st $(DESTDIR)$(PREFIX)/bin
cp -f st.desktop $(DESTDIR)$(PREFIX)/share/applications
strip $(DESTDIR)$(PREFIX)/bin/st
chmod 755 $(DESTDIR)$(PREFIX)/bin/st
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1
tic -sx st.info
@echo Please see the README file regarding the terminfo entry of st.
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/st

View File

@ -5,8 +5,8 @@
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true";
static int borderpx = 2;
static char *font = "monospace:pixelsize=13:antialias=true:autohint=true";
static int borderpx = 0;
/*
* What program is execed by st depends of these precedence rules:
@ -32,18 +32,18 @@ static float chscale = 1.0;
*
* More advanced example: L" `'\"()[]{}"
*/
wchar_t *worddelimiters = L" ";
wchar_t *worddelimiters = L" '\"()[]{}.,/\\=+*:~^!#%&|@<>?";
/* selection timeouts (in milliseconds) */
static unsigned int doubleclicktimeout = 300;
static unsigned int tripleclicktimeout = 600;
/* alt screens */
int allowaltscreen = 1;
int allowaltscreen = 0;
/* frames per second st should at maximum draw to the screen */
static unsigned int xfps = 120;
static unsigned int actionfps = 30;
static unsigned int actionfps = 60;
/*
* blinking timeout (set to 0 to disable blinking) for the terminal blinking
@ -82,33 +82,41 @@ char *termname = "st-256color";
*/
unsigned int tabspaces = 8;
enum special_color_names {
AGW_SCOL_CS = 256,
AGW_SCOL_RCS,
AGW_SCOL_FG,
AGW_SCOL_BG,
};
/* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = {
/* 8 normal colors */
"black",
"red3",
"green3",
"yellow3",
"blue2",
"magenta3",
"cyan3",
"gray90",
"#121417",
"#760a1f",
"#0aa941",
"#947a05",
"#005ccc",
"#6e0e8b",
"#005766",
"#626c7f",
/* 8 bright colors */
"gray50",
"red",
"green",
"yellow",
"#5c5cff",
"magenta",
"cyan",
"white",
"#282c34",
"#ed254e",
"#71f79f",
"#f9dc5c",
"#7cb7ff",
"#c74ded",
"#00c1e4",
"#dcdfe4",
[255] = 0,
/* extra colors */
[AGW_SCOL_CS] = "#cccccc",
[AGW_SCOL_RCS] = "#555555",
/* more colors can be added after 255 to use with DefaultXX */
"#cccccc",
"#555555",
[AGW_SCOL_FG] = "#c3c7d1",
[AGW_SCOL_BG] = "#161925",
};
@ -116,10 +124,10 @@ static const char *colorname[] = {
* Default colors (colorname index)
* foreground, background, cursor, reverse cursor
*/
unsigned int defaultfg = 7;
unsigned int defaultbg = 0;
static unsigned int defaultcs = 256;
static unsigned int defaultrcs = 257;
unsigned int defaultfg = AGW_SCOL_FG;
unsigned int defaultbg = AGW_SCOL_BG;
static unsigned int defaultcs = AGW_SCOL_CS;
static unsigned int defaultrcs = AGW_SCOL_RCS;
/*
* Default shape of cursor
@ -135,7 +143,7 @@ static unsigned int cursorshape = 2;
*/
static unsigned int cols = 80;
static unsigned int rows = 24;
static unsigned int rows = 30;
/*
* Default colour and shape of the mouse cursor

View File

@ -4,7 +4,7 @@ VERSION = 0.8.2
# Customize below to fit your system
# paths
PREFIX = /usr/local
PREFIX = $(HOME)/.local
MANPREFIX = $(PREFIX)/share/man
X11INC = /usr/X11R6/include
@ -22,7 +22,7 @@ LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \
# flags
STCPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600
STCFLAGS = $(INCS) $(STCPPFLAGS) $(CPPFLAGS) $(CFLAGS)
STCFLAGS = $(INCS) $(STCPPFLAGS) $(CPPFLAGS) $(CFLAGS) -mtune=native -march=native -O3 -pipe -fstack-protector-strong -fno-plt
STLDFLAGS = $(LIBS) $(LDFLAGS)
# OpenBSD:

8
st.desktop Normal file
View File

@ -0,0 +1,8 @@
[Desktop Entry]
Name=st
Comment=Suckless Terminal
Exec=st
Icon=st
Terminal=false
Type=Application
Categories=System;

2
x.c
View File

@ -58,7 +58,7 @@ static void zoomabs(const Arg *);
static void zoomreset(const Arg *);
/* config.h for applying patches and the configuration. */
#include "config.h"
#include "config.def.h"
/* XEMBED messages */
#define XEMBED_FOCUS_IN 4