diff options
-rw-r--r-- | config.def.h | 3 | ||||
-rw-r--r-- | st.1 | 4 | ||||
-rw-r--r-- | st.c | 13 |
3 files changed, 16 insertions, 4 deletions
diff --git a/config.def.h b/config.def.h index 693bdbd..2c97266 100644 --- a/config.def.h +++ b/config.def.h | |||
@@ -13,6 +13,9 @@ static char shell[] = "/bin/sh"; | |||
13 | static unsigned int doubleclicktimeout = 300; | 13 | static unsigned int doubleclicktimeout = 300; |
14 | static unsigned int tripleclicktimeout = 600; | 14 | static unsigned int tripleclicktimeout = 600; |
15 | 15 | ||
16 | /* alt screens */ | ||
17 | static bool allowaltscreen = true; | ||
18 | |||
16 | /* frames per second st should at maximum draw to the screen */ | 19 | /* frames per second st should at maximum draw to the screen */ |
17 | static unsigned int xfps = 60; | 20 | static unsigned int xfps = 60; |
18 | static unsigned int actionfps = 30; | 21 | static unsigned int actionfps = 30; |
@@ -3,6 +3,7 @@ | |||
3 | st \- simple terminal | 3 | st \- simple terminal |
4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
5 | .B st | 5 | .B st |
6 | .RB [ \-a ] | ||
6 | .RB [ \-c | 7 | .RB [ \-c |
7 | .IR class ] | 8 | .IR class ] |
8 | .RB [ \-f | 9 | .RB [ \-f |
@@ -23,6 +24,9 @@ st \- simple terminal | |||
23 | is a simple terminal emulator. | 24 | is a simple terminal emulator. |
24 | .SH OPTIONS | 25 | .SH OPTIONS |
25 | .TP | 26 | .TP |
27 | .B \-a | ||
28 | disable alternate screens in terminal | ||
29 | .TP | ||
26 | .BI \-c " class" | 30 | .BI \-c " class" |
27 | defines the window class (default $TERM). | 31 | defines the window class (default $TERM). |
28 | .TP | 32 | .TP |
@@ -43,7 +43,7 @@ | |||
43 | 43 | ||
44 | #define USAGE \ | 44 | #define USAGE \ |
45 | "st " VERSION " (c) 2010-2013 st engineers\n" \ | 45 | "st " VERSION " (c) 2010-2013 st engineers\n" \ |
46 | "usage: st [-v] [-c class] [-f font] [-g geometry] [-o file]" \ | 46 | "usage: st [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]" \ |
47 | " [-t title] [-w windowid] [-e command ...]\n" | 47 | " [-t title] [-w windowid] [-e command ...]\n" |
48 | 48 | ||
49 | /* XEMBED messages */ | 49 | /* XEMBED messages */ |
@@ -1615,7 +1615,10 @@ tsetmode(bool priv, bool set, int *args, int narg) { | |||
1615 | break; | 1615 | break; |
1616 | case 1049: /* = 1047 and 1048 */ | 1616 | case 1049: /* = 1047 and 1048 */ |
1617 | case 47: | 1617 | case 47: |
1618 | case 1047: { | 1618 | case 1047: |
1619 | if (!allowaltscreen) | ||
1620 | break; | ||
1621 | |||
1619 | alt = IS_SET(MODE_ALTSCREEN); | 1622 | alt = IS_SET(MODE_ALTSCREEN); |
1620 | if(alt) { | 1623 | if(alt) { |
1621 | tclearregion(0, 0, term.col-1, | 1624 | tclearregion(0, 0, term.col-1, |
@@ -1625,8 +1628,7 @@ tsetmode(bool priv, bool set, int *args, int narg) { | |||
1625 | tswapscreen(); | 1628 | tswapscreen(); |
1626 | if(*args != 1049) | 1629 | if(*args != 1049) |
1627 | break; | 1630 | break; |
1628 | } | 1631 | /* FALLTRU */ |
1629 | /* pass through */ | ||
1630 | case 1048: | 1632 | case 1048: |
1631 | tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD); | 1633 | tcursor((set) ? CURSOR_SAVE : CURSOR_LOAD); |
1632 | break; | 1634 | break; |
@@ -3316,6 +3318,9 @@ main(int argc, char *argv[]) { | |||
3316 | 3318 | ||
3317 | for(i = 1; i < argc; i++) { | 3319 | for(i = 1; i < argc; i++) { |
3318 | switch(argv[i][0] != '-' || argv[i][2] ? -1 : argv[i][1]) { | 3320 | switch(argv[i][0] != '-' || argv[i][2] ? -1 : argv[i][1]) { |
3321 | case 'a': | ||
3322 | allowaltscreen = false; | ||
3323 | break; | ||
3319 | case 'c': | 3324 | case 'c': |
3320 | if(++i < argc) | 3325 | if(++i < argc) |
3321 | opt_class = argv[i]; | 3326 | opt_class = argv[i]; |