st.git
6 years agost: small typofix in comment
Hiltjo Posthuma [Sun, 4 Nov 2018 13:30:56 +0000 (14:30 +0100)]
st: small typofix in comment

6 years agosmall code-style fix
Hiltjo Posthuma [Tue, 11 Sep 2018 17:06:35 +0000 (19:06 +0200)]
small code-style fix

6 years agoRemove the ISO 14755 feature
Quentin Rameau [Tue, 11 Sep 2018 11:11:28 +0000 (13:11 +0200)]
Remove the ISO 14755 feature

And move it to the patches section.
Keeping it would force to add an exec pledge on OpenBSD, and some
people think it's bloated, so bye!

6 years agoRevert "Simplify cursor color handling"
Hiltjo Posthuma [Tue, 17 Jul 2018 18:01:58 +0000 (20:01 +0200)]
Revert "Simplify cursor color handling"

This reverts commit 1911c9274d9b03f3d7999c6ce26e2d5169642d26.

6 years agoRevert "Make cursor follow text color"
Hiltjo Posthuma [Tue, 17 Jul 2018 18:01:57 +0000 (20:01 +0200)]
Revert "Make cursor follow text color"

This reverts commit b51bcd5553af3db394014efbd78acf7828fa48ff.

6 years agoRevert "Fix crash when cursor color is truecolor"
Hiltjo Posthuma [Tue, 17 Jul 2018 18:01:54 +0000 (20:01 +0200)]
Revert "Fix crash when cursor color is truecolor"

This reverts commit 5535c1f04c665c05faff2a65d5558246b7748d49.

6 years agoFix crash when cursor color is truecolor
Jules Maselbas [Sun, 15 Jul 2018 11:53:37 +0000 (13:53 +0200)]
Fix crash when cursor color is truecolor

Reported-by: Ivan Tham <pickfire@riseup.net>
6 years agoMake cursor follow text color
Jules Maselbas [Sat, 14 Jul 2018 09:16:37 +0000 (11:16 +0200)]
Make cursor follow text color

6 years agoSimplify cursor color handling
Jules Maselbas [Sat, 14 Jul 2018 09:16:36 +0000 (11:16 +0200)]
Simplify cursor color handling

6 years agoFix crash on resize
Jules Maselbas [Wed, 27 Jun 2018 15:08:30 +0000 (17:08 +0200)]
Fix crash on resize

Prevent to realloc xw.specbuc with a negative number of col.
Add proper hints for the minimal size, for one character.

6 years agoconfig.mk: remove extra newline before EOF
Hiltjo Posthuma [Sat, 2 Jun 2018 15:11:14 +0000 (17:11 +0200)]
config.mk: remove extra newline before EOF

6 years agocode-style for pledge(2)
Hiltjo Posthuma [Fri, 25 May 2018 11:04:09 +0000 (13:04 +0200)]
code-style for pledge(2)

feedback from Klemens, thanks

6 years agoPledge on OpenBSD
Hiltjo Posthuma [Fri, 25 May 2018 09:59:28 +0000 (11:59 +0200)]
Pledge on OpenBSD

6 years agoerror message style and use strerror in a few places
Hiltjo Posthuma [Thu, 29 Mar 2018 16:30:05 +0000 (18:30 +0200)]
error message style and use strerror in a few places

6 years agost -v: remove years and copyright text
Hiltjo Posthuma [Thu, 29 Mar 2018 16:18:30 +0000 (18:18 +0200)]
st -v: remove years and copyright text

6 years agoset sel.alt in selstart instead of selextend
Daniel Tameling [Wed, 28 Mar 2018 19:27:58 +0000 (21:27 +0200)]
set sel.alt in selstart instead of selextend

6 years agobump version to 0.8.1
Hiltjo Posthuma [Tue, 20 Mar 2018 20:29:10 +0000 (21:29 +0100)]
bump version to 0.8.1

6 years agofix regression by selecting clipboard text
Hiltjo Posthuma [Tue, 20 Mar 2018 20:25:30 +0000 (21:25 +0100)]
fix regression by selecting clipboard text

"restore the old behaviour that the primary doesn't get deleted by a simple
left click"

Patch by Daniel Tameling <tamelingdaniel@gmail.com>, thanks!

6 years agodon't modify argv, use a counter
Hiltjo Posthuma [Tue, 20 Mar 2018 20:22:27 +0000 (21:22 +0100)]
don't modify argv, use a counter

on some platforms (OpenBSD) this changes the exposed argv in tools using
the kvm_* interface, such as ps and pgrep.

6 years agoselextend: clarify: !sel.mode == SEL_IDLE
Hiltjo Posthuma [Sat, 17 Mar 2018 12:48:29 +0000 (13:48 +0100)]
selextend: clarify: !sel.mode == SEL_IDLE

6 years agoclipcopy: no need to check for free(NULL), set to NULL after free
Hiltjo Posthuma [Sat, 17 Mar 2018 12:48:10 +0000 (13:48 +0100)]
clipcopy: no need to check for free(NULL), set to NULL after free

6 years agominor code-style: whitespace fixes
Hiltjo Posthuma [Fri, 16 Mar 2018 15:45:58 +0000 (16:45 +0100)]
minor code-style: whitespace fixes

6 years agoFix title initialization
Quentin Rameau [Fri, 16 Mar 2018 15:19:18 +0000 (16:19 +0100)]
Fix title initialization

6 years agoFix regression from 69e32a6 when setting title.
Quentin Rameau [Fri, 16 Mar 2018 14:03:10 +0000 (15:03 +0100)]
Fix regression from 69e32a6 when setting title.

6 years agoLICENSE: fix a few years
Hiltjo Posthuma [Wed, 14 Mar 2018 19:06:42 +0000 (20:06 +0100)]
LICENSE: fix a few years

6 years agoupdate LICENSE: major contributors
Hiltjo Posthuma [Wed, 14 Mar 2018 19:00:35 +0000 (20:00 +0100)]
update LICENSE: major contributors

6 years agoMakefile: add all files to make dist
Hiltjo Posthuma [Wed, 14 Mar 2018 18:54:50 +0000 (19:54 +0100)]
Makefile: add all files to make dist

6 years agobump version to 0.8
Hiltjo Posthuma [Wed, 14 Mar 2018 18:50:37 +0000 (19:50 +0100)]
bump version to 0.8

6 years agouse math.h for ceilf
Hiltjo Posthuma [Fri, 9 Mar 2018 14:36:38 +0000 (15:36 +0100)]
use math.h for ceilf

6 years agoxhints: no need to initialize sizeh
Hiltjo Posthuma [Fri, 9 Mar 2018 14:36:25 +0000 (15:36 +0100)]
xhints: no need to initialize sizeh

6 years agoregression: include termios.h for tcsendbreak etc
Hiltjo Posthuma [Fri, 9 Mar 2018 14:35:34 +0000 (15:35 +0100)]
regression: include termios.h for tcsendbreak etc

6 years agoGeneral cleanup
Devin J. Pohly [Sat, 24 Feb 2018 23:09:13 +0000 (17:09 -0600)]
General cleanup

Simplifies logic in a couple places and removes a redundant function
call.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoClean up #includes
Devin J. Pohly [Sat, 24 Feb 2018 22:45:42 +0000 (16:45 -0600)]
Clean up #includes

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoReduce visibility wherever possible
Devin J. Pohly [Sat, 24 Feb 2018 22:32:20 +0000 (16:32 -0600)]
Reduce visibility wherever possible

When possible, declare functions/variables static and move struct
definitions out of headers.  In order to allow utf8decode to become
internal, use codepoint for DECSCUSR extension directly.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoLimit usage of extern to config.h globals
Devin J. Pohly [Sat, 24 Feb 2018 22:16:12 +0000 (16:16 -0600)]
Limit usage of extern to config.h globals

Prefer passing arguments to declaring external global variables.  The
only remaining usage of extern is for config.h variables which are
needed in st.c instead of x.c (where it is now included).

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoRemove x.c dependency on term
Devin J. Pohly [Sat, 24 Feb 2018 21:32:48 +0000 (15:32 -0600)]
Remove x.c dependency on term

The xinit function only needs to the rows/cols, so pass those in rather
than accessing term directly.  With a bit of arithmetic, we are able to
avoid the need for term.row and term.col in x2col, y2row, and
xdrawglyphfontspecs as well, completing the removal.

Term is now fully internal to st.c.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoPull term references out of xdrawcursor
Devin J. Pohly [Sat, 24 Feb 2018 20:58:54 +0000 (14:58 -0600)]
Pull term references out of xdrawcursor

Gradually reducing x.c dependency on Term object.  Old and new cursor
glyph/position are passed to xdrawcursor.  (There may be an opportunity
to refactor further if we can unify "clear old cursor" and "draw new
cursor" functionality.)

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoMove win-agnostic parts of draw/drawregion to st.c
Devin J. Pohly [Sat, 24 Feb 2018 20:53:23 +0000 (14:53 -0600)]
Move win-agnostic parts of draw/drawregion to st.c

Introduces three functions to encapsulate X-specific behavior:
 * xdrawline: draws a portion of a single line (used by drawregion)
 * xbegindraw: called to prepare for drawing (will be useful for e.g.
   Wayland) and returns true if drawing should happen
 * xfinishdraw: called to finish drawing (used by draw)

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoSplit mode bits between Term and TermWindow
Devin J. Pohly [Fri, 23 Feb 2018 20:16:52 +0000 (14:16 -0600)]
Split mode bits between Term and TermWindow

Moves the mode bits used by x.c from Term to TermWindow, absorbing
UI/input-related mode bits (visible/focused/numlock) along the way.

This is gradually reducing external references to Term.  Since
TermWindow is already internal to x.c, we add xsetmode() to allow st to
modify window bits in accordance with escape sequences.

IS_SET() is redefined accordingly (term.mode in st.c, win.mode in x.c).

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoMove CRLF input processing into ttywrite
Devin J. Pohly [Thu, 22 Feb 2018 07:05:12 +0000 (01:05 -0600)]
Move CRLF input processing into ttywrite

This also allows us to remove the crlf field from the Key struct, since
the only difference it made was converting "\r" to "\r\n" (which is now
done automatically in ttywrite).  In addition, MODE_CRLF is no longer
referenced from x.c.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoMove terminal echo logic into st.c
Devin J. Pohly [Thu, 22 Feb 2018 06:42:23 +0000 (00:42 -0600)]
Move terminal echo logic into st.c

The only thing differentiating ttywrite and ttysend was the potential
for echo; make this a parameter and remove ttysend.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoMove remaining selection mode logic into selextend
Devin J. Pohly [Thu, 22 Feb 2018 05:54:29 +0000 (23:54 -0600)]
Move remaining selection mode logic into selextend

The "done" parameter indicates a change which finalizes the selection
(e.g. a mouse button release as opposed to motion).

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoMove terminal-related selection logic into st.c
Devin J. Pohly [Thu, 22 Feb 2018 05:29:41 +0000 (23:29 -0600)]
Move terminal-related selection logic into st.c

The front-end determines information about mouse clicks and motion, and
the terminal handles the actual selection start/extend/dirty logic by
row and column.

While we're in the neighborhood, we'll also rename getbuttoninfo() to
mousesel() which is, at least, less wrong.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoMove X-specific selection info into XSelection
Devin J. Pohly [Thu, 22 Feb 2018 04:56:02 +0000 (22:56 -0600)]
Move X-specific selection info into XSelection

Data about PRIMARY/CLIPBOARD and clicks are part of the front-end, not
the terminal.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoHave selected() check whether selection exists
Devin J. Pohly [Thu, 22 Feb 2018 04:48:28 +0000 (22:48 -0600)]
Have selected() check whether selection exists

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoRely on ttyresize to set tty size
Devin J. Pohly [Thu, 22 Feb 2018 04:28:41 +0000 (22:28 -0600)]
Rely on ttyresize to set tty size

This removes ttynew's dependency on cresize being called first, and then
allows us to absorb the ttyresize call into cresize (which always
precedes it).

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoRemove X and fontconfig from st.c
Devin J. Pohly [Tue, 7 Nov 2017 00:30:45 +0000 (18:30 -0600)]
Remove X and fontconfig from st.c

None of the X-related includes are needed any longer.  In addition, move
the X modifier defines into x.c, as they are not used outside.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoRemove Time argument from xsetsel
Devin J. Pohly [Tue, 7 Nov 2017 00:25:58 +0000 (18:25 -0600)]
Remove Time argument from xsetsel

This is an X type and should be internal to x.c.

The selcopy() function was a single line and only used in one place, so
it was inlined to reduce LOC.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoMake win variable internal to x.c
Devin J. Pohly [Mon, 6 Nov 2017 23:57:45 +0000 (17:57 -0600)]
Make win variable internal to x.c

There was only a single reference to the `win` variable in st.c, so
exporting that to x.c allows us to rid ourselves of another extern.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoMove X-related config.h types into x.c
Devin J. Pohly [Tue, 17 Oct 2017 21:46:26 +0000 (16:46 -0500)]
Move X-related config.h types into x.c

No need to expose Shortcut, MouseShortcut, and Key anymore.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoRemove unneeded array-length variables
Devin J. Pohly [Tue, 17 Oct 2017 20:46:31 +0000 (15:46 -0500)]
Remove unneeded array-length variables

These were only used in x.c, which now has direct visibility of the
config.h arrays.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoInline clipboard functions
Devin J. Pohly [Tue, 17 Oct 2017 20:43:32 +0000 (15:43 -0500)]
Inline clipboard functions

No need to keep a function that only calls another function in the same
file.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoMove config.h include from st.c to x.c
Devin J. Pohly [Tue, 17 Oct 2017 20:21:04 +0000 (15:21 -0500)]
Move config.h include from st.c to x.c

config.h includes references to KeySyms and other X stuff.  Until we
come up with a cleaner way to separate configuration, it is simpler
(leads to more code removal) to have this here.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoFactor out equivalent code from ttyread/ttysend
Devin J. Pohly [Mon, 16 Oct 2017 01:35:48 +0000 (20:35 -0500)]
Factor out equivalent code from ttyread/ttysend

The echo-to-terminal portions of ttyread and ttysend were actually doing
the same thing.  New function twrite() now handles this.  The parameter
show_ctrl determines whether control characters are shown as "^A".  This
was the only difference between tputc and techo, and techo is now unused
and removed.

(This commit should not change st's behaviour.)

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoMove opt_* into same file as main()/run()
Devin J. Pohly [Fri, 13 Oct 2017 03:25:49 +0000 (22:25 -0500)]
Move opt_* into same file as main()/run()

This commit is purely about reducing externs and LOC.  If the main and
run functions ever move elsewhere (which will probably make sense
eventually), these should come along with them.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoMove key-matching functions into x.c
Devin J. Pohly [Wed, 11 Oct 2017 13:47:14 +0000 (08:47 -0500)]
Move key-matching functions into x.c

Modifiers and keysyms are specific to X, and the functions match and
kmap are only used in x.c.  Needed to global-ize the key arrays and
lengths from config.h (for now).

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoPass new dimensions into ttyresize
Devin J. Pohly [Tue, 10 Oct 2017 20:51:23 +0000 (15:51 -0500)]
Pass new dimensions into ttyresize

This removes another reference to TermWindow from st.c.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoMove window-manipulating functions into x.c
Devin J. Pohly [Tue, 10 Oct 2017 17:46:53 +0000 (12:46 -0500)]
Move window-manipulating functions into x.c

xresize is now internal to x.c

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoMove font/fontspec variables into x.c and XWindow
Devin J. Pohly [Tue, 10 Oct 2017 17:17:25 +0000 (12:17 -0500)]
Move font/fontspec variables into x.c and XWindow

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoMove window urgency handling entirely into x.c
Devin J. Pohly [Tue, 10 Oct 2017 17:01:18 +0000 (12:01 -0500)]
Move window urgency handling entirely into x.c

This allows us to make xseturgency internal.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoMove zoom functions into x.c
Devin J. Pohly [Tue, 10 Oct 2017 16:30:36 +0000 (11:30 -0500)]
Move zoom functions into x.c

This makes x(un)loadfonts internal to x.c.  Needed to reorder includes
and move a typedef to keep the compiler happy.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoMove usage() to be with run() in x.c
Devin J. Pohly [Tue, 10 Oct 2017 16:11:27 +0000 (11:11 -0500)]
Move usage() to be with run() in x.c

run/usage/xinit are now all internal to x.c

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoCall xsetenv() in main process instead of child
Devin J. Pohly [Tue, 10 Oct 2017 15:30:23 +0000 (10:30 -0500)]
Call xsetenv() in main process instead of child

This makes xsetenv internal to x.c, and allows iso14755's external
command to use $WINDOWID instead of having to snprintf it again.  (The
same benefit will apply to the externalpipe patch.)  The xwinid function
is no longer needed.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
6 years agoFix color with FAINT attribute
Benno Fünfstück [Tue, 26 Dec 2017 15:23:24 +0000 (16:23 +0100)]
Fix color with FAINT attribute

The alpha value needs to be initialized as well.

6 years agoApply ATTR_REVERSE after ATTR_FAINT
Benno Fünfstück [Tue, 26 Dec 2017 15:38:27 +0000 (16:38 +0100)]
Apply ATTR_REVERSE after ATTR_FAINT

An example where the new behaviour makes more sense:

Suppose some text is formatted with ATTR_FAINT for red for the foreground, so it
is rendered in a dark red. In that case, when selected with the mouse, the
intended behaviour is that foreground and background color are swapped: so the
selection should be rendered in dark red and the text in the default background
color.

Before this patch, what happened was that the selection would be in normal red
and the text in the darkened background color, making it almost unreadable.

For an example application that uses the FAINT attribute, try dmesg from
util-linux with color support, it uses FAINT for segfault messages.

6 years agoFix FAQ typo
George Ornbo [Wed, 20 Dec 2017 09:05:32 +0000 (09:05 +0000)]
Fix FAQ typo

7 years agoFix manpage typo
Paride Legovini [Tue, 10 Oct 2017 15:49:38 +0000 (17:49 +0200)]
Fix manpage typo

Signed-off-by: Paride Legovini <pl@ninthfloor.org>
7 years agoAdd an error for XftFontOpenPattern failure.
Gary Allen Vollink [Thu, 14 Sep 2017 19:30:02 +0000 (15:30 -0400)]
Add an error for XftFontOpenPattern failure.

7 years agoRevert "Revert "fixed STLDFLAG order in broken st Makefile""
Hiltjo Posthuma [Fri, 15 Sep 2017 09:16:37 +0000 (11:16 +0200)]
Revert "Revert "fixed STLDFLAG order in broken st Makefile""

This reverts commit 274d46ace00003d1df718b974d17642cbce167d5.

Sorry, the original commit was correct after all. It allows has the
correct link order and supports static-linking also.

Just a reminder: it is important to give a (brief) rationale of the
patch intentions.

7 years agobase64dec: skip non-printable characters like \r\n
Suraj N. Kurapati [Fri, 18 Aug 2017 06:00:10 +0000 (23:00 -0700)]
base64dec: skip non-printable characters like \r\n

Non-printable characters, such as line breaks, in a base64 encoded
string violate the "string length must be a multiple of four" rule.

This patch pads the result buffer by one extra unit of four bytes,
and skips over non-printable characters found in the input string.

7 years agoRevert "fixed STLDFLAG order in broken st Makefile"
Hiltjo Posthuma [Wed, 13 Sep 2017 20:40:36 +0000 (22:40 +0200)]
Revert "fixed STLDFLAG order in broken st Makefile"

This reverts commit 7f990328e4fec8dfaaad311cb8af2304b58c872e.

this was wrong as pointed out by k0ga:
"STLDFLAGS is about flags to the linker, for example -L
not about -l for that reason it must go before the object list".

7 years agoRevert "make clipboard patch obsolete"
Hiltjo Posthuma [Sat, 2 Sep 2017 11:52:33 +0000 (13:52 +0200)]
Revert "make clipboard patch obsolete"

This reverts commit 77c51c5a6b16387f1792e23acbcf2080f790aa25.

Having multiple clipboards are useful, for example for plumber scripts.
I've discussed this on IRC and it is useful to have.

7 years agomake clipboard patch obsolete
Anselm R Garbe [Fri, 1 Sep 2017 07:48:24 +0000 (09:48 +0200)]
make clipboard patch obsolete

7 years agofixed STLDFLAG order in broken st Makefile
Anselm R Garbe [Sun, 23 Jul 2017 09:17:26 +0000 (11:17 +0200)]
fixed STLDFLAG order in broken st Makefile

7 years agoRevert "Add bold off SGR"
Quentin Rameau [Tue, 11 Jul 2017 21:16:25 +0000 (23:16 +0200)]
Revert "Add bold off SGR"

This reverts commit 6cb6d61525931c88971cce323f63e40451a6d365.
This wasn't a useful thing after all.

7 years agoAdd dim/smxx/rmxx to terminfo, remove duplicate kich1
Quentin Rameau [Tue, 11 Jul 2017 21:03:27 +0000 (23:03 +0200)]
Add dim/smxx/rmxx to terminfo, remove duplicate kich1

7 years agoLet the user specify C and LD FLAGS
Quentin Rameau [Tue, 11 Jul 2017 22:26:35 +0000 (00:26 +0200)]
Let the user specify C and LD FLAGS

7 years agoDo not obfuscate what make is doing.
Quentin Rameau [Tue, 11 Jul 2017 22:24:51 +0000 (00:24 +0200)]
Do not obfuscate what make is doing.

Change some styling too while we're at it.

7 years agoAdd color change terminfo capabilities
Marc André Tanner [Mon, 15 May 2017 10:45:41 +0000 (12:45 +0200)]
Add color change terminfo capabilities

7 years agoAdd bold off SGR
Quentin Rameau [Sun, 28 May 2017 07:56:57 +0000 (09:56 +0200)]
Add bold off SGR

7 years agost.1: modify man page to accurately reflect default keybindings
greg.reagle@umbc.edu [Mon, 10 Apr 2017 16:24:03 +0000 (18:24 +0200)]
st.1: modify man page to accurately reflect default keybindings

Attached.

===> 2/ (text/x-patch) [file]
cp /mail/fs/mbox/298/2/body /usr/k0ga/0001-st.1-modify-man-page-to-accurately-reflect-default-k.patch

From 265db94b1eca5850d484f86b7db4af8e57822cfe Mon Sep 17 00:00:00 2001
From: Greg Reagle <greg.reagle@umbc.edu>
Date: Sun, 9 Apr 2017 23:05:47 -0400
Subject: [PATCH] st.1: modify man page to accurately reflect default
 keybindings

7 years agoSimplify how we keep ATTRs under cursor
Quentin Rameau [Tue, 4 Apr 2017 15:20:55 +0000 (17:20 +0200)]
Simplify how we keep ATTRs under cursor

Thanks to tarug0 for the suggestion/patch.

7 years agoFix commented out code
Alexander Krotov [Sat, 25 Mar 2017 20:02:42 +0000 (23:02 +0300)]
Fix commented out code

7 years agokeep some glyph modes for the cursor
Nils Reuße [Wed, 29 Mar 2017 16:34:12 +0000 (18:34 +0200)]
keep some glyph modes for the cursor

st currently does not keep any mode for the cursor that was active
in the underlying glyph (e.g. italic text), the mode is always
ATTR_NULL [1].  At [2] you can find a screenshot that shows the
implications.  Other terminals (at least vte-based, such as
XFCE-terminal) keep some modes for the cursor.  I find the current
behaviour very disruptive, so here is a patch that keeps a few
(arbitrarily chosen) modes for the cursor.

[1] http://git.suckless.org/st/tree/st.c#n3963
[2] http://i.imgur.com/R2yCEaC.png

7 years agoSupport xterm Ms feature to set clipboard
osandov@osandov.com [Sat, 18 Mar 2017 10:55:04 +0000 (11:55 +0100)]
Support xterm Ms feature to set clipboard

This is used by, e.g., tmux.

7 years agoChange default keybindings
Roberto E. Vargas Caballero [Wed, 25 Jan 2017 18:17:38 +0000 (19:17 +0100)]
Change default keybindings

CTRL+SHIFT is an impossible combination in the terminal world
(0x20 | x & 0x1F), so it is perfect to be used for internals
shortcuts of terminals, and being a double combination
reduces the prossibility of having comflicts.

7 years agoSplit X-specific code into x.c
Michael Forney [Fri, 20 Jan 2017 08:06:39 +0000 (00:06 -0800)]
Split X-specific code into x.c

7 years agoMove column and row default numbers into config.h
fpqc [Wed, 14 Dec 2016 06:51:27 +0000 (06:51 +0000)]
Move column and row default numbers into config.h

8 years agoRevert "Initial font size issue."
Roberto E. Vargas Caballero [Thu, 24 Nov 2016 19:21:19 +0000 (20:21 +0100)]
Revert "Initial font size issue."

This reverts commit 424202798b02554092ba84dd59fb7b79b59b7b75.

8 years agoFixed 'missing glyph doesn't use fontconfig config substitutions' bug
Spencer Phippen [Wed, 23 Nov 2016 18:17:59 +0000 (19:17 +0100)]
Fixed 'missing glyph doesn't use fontconfig config substitutions' bug

XftFontMatch does display-specific font configuration (commit 528241a).
Nice. Unfortunately, when we switched from FcFontMatch, we also stopped
storing the post-Fc{Config,Default}Substitute FcPattern for future
lookups. The result is that if a glyph isn't found in the primary font,
secondary font lookups use the original FcPattern, not the configured
one. If you have custom fontconfig rules (like me), this can be
disappointing.

I basically just copied the guts out of XftFontMatch[1] and saved
the intermediate configured FcPattern. Could be related to the bug that
inspired commit 4242027.

[1]: https://cgit.freedesktop.org/xorg/lib/libXft/tree/src/xftfont.c

8 years agomake the various combinations of arrow keys and shift/control/meta work
Manuel Tobias Schiller [Mon, 14 Nov 2016 17:25:51 +0000 (18:25 +0100)]
make the various combinations of arrow keys and shift/control/meta work

When using st with screen, I've bound next, prev, new screen to
combinations like Ctrl-Alt-Right,Left,Down; xterm and (u)rxvt work fine
when this combination of modifiers is pressed, st does not seem to
transport all of them; a single modifier key is fine (e.g. Ctrl-Up,
Alt-Down etc., but combinations are not). While I'm not terribly
familiar with this, I have tried to hack config.h in a more or less
systematic way to generate the expected sequences.

8 years agoInitial font size issue.
ian@remmler.org [Fri, 11 Nov 2016 16:52:07 +0000 (17:52 +0100)]
Initial font size issue.

Hi,

When I specify a font by point size (I'm using "Inconsolata:size=12"),
characters that are substituted from another font because they are not in the
main one appear too small.  Doing a zoom reset fixes it.  For example:

Before: http://i.imgur.com/G4Mfv4X.png
After:  http://i.imgur.com/PMDhfQA.png

I found that adding the pixel size (acquired from the initial font load) to the
pattern then reloading the font fixes the problem.  I'm not sure if this is a
proper fix, though.

8 years agotic -s -> tic -sx (Treat unknown capabilities as user-defined.)
pl@ninthfloor.org [Fri, 11 Nov 2016 16:45:45 +0000 (17:45 +0100)]
tic -s -> tic -sx (Treat unknown capabilities as user-defined.)

8 years agoAdd tmux capabilities to st.info
pl@ninthfloor.org [Fri, 11 Nov 2016 16:45:46 +0000 (17:45 +0100)]
Add tmux capabilities to st.info

8 years agoMake strdump(), csidump(), print to stderr
pl@ninthfloor.org [Fri, 11 Nov 2016 16:45:52 +0000 (17:45 +0100)]
Make strdump(), csidump(), print to stderr

The two functions strdump(), csidump() are called to show errors and
their output is introduced by a message printed to stderr. Thus, it it
more consistent to have them print to stderr.

Moreover stderr is unbuffered (at least on Linux), making problems
immediately visible.

8 years agoDo not use color when font attributes are supported
Quentin Rameau [Sat, 22 Oct 2016 14:36:10 +0000 (16:36 +0200)]
Do not use color when font attributes are supported

If fontconfig gives us a font without the attributes we asked for,
display an alternative color instead.

8 years agost.1: add an entry for ISO-14755 shortcut
Quentin Rameau [Sat, 22 Oct 2016 08:42:46 +0000 (10:42 +0200)]
st.1: add an entry for ISO-14755 shortcut

8 years agoAdd support for iso14755
Quentin Rameau [Sat, 8 Oct 2016 14:22:18 +0000 (16:22 +0200)]
Add support for iso14755

We launch dmenu for getting a codepoint, then convert it and send it to
the terminal.

8 years agoAdd missing device path to '-l' example
Klemens Nanni [Thu, 13 Oct 2016 14:28:50 +0000 (16:28 +0200)]
Add missing device path to '-l' example

Also, it's ttyS0 not ttySO.

8 years agoAdd parsing of DCS q sequences
Roberto E. Vargas Caballero [Wed, 14 Sep 2016 06:27:32 +0000 (08:27 +0200)]
Add parsing of DCS q sequences

These sequences are used to operate with sixels, but they are still
str sequences, so they are finished with \a, ST or with a C1 control
code. This patch also disables utf8 handling for the case of sixels.