mirror of
https://github.com/alrayyes/st
synced 2023-11-14 15:56:30 +00:00
Compare commits
No commits in common. "372e01a0f315c511c638651ae57146991a12e519" and "5b53d50751587ba268894d77b2617822a0a9abbb" have entirely different histories.
372e01a0f3
...
5b53d50751
29
PKGBUILD
29
PKGBUILD
@ -1,7 +1,7 @@
|
||||
# Maintainer: Ryan Kes <alrayyes gmail com>
|
||||
|
||||
pkgname=higherlearning-st
|
||||
pkgver=0.8.4
|
||||
pkgver=0.8.2
|
||||
pkgrel=1
|
||||
pkgdesc='A simple virtual terminal emulator for X.'
|
||||
arch=('i686' 'x86_64')
|
||||
@ -11,28 +11,25 @@ makedepends=('ncurses')
|
||||
conflicts=('st')
|
||||
url="http://st.suckless.org"
|
||||
|
||||
_patches=("st-clipboard-0.8.3.diff"
|
||||
"st-scrollback-20200419-72e3f6c.diff"
|
||||
"st-scrollback-mouse-20191024-a2c479c.diff"
|
||||
"st-scrollback-mouse-altscreen-20200416-5703aa0.diff"
|
||||
_patches=("st-clipboard-0.8.2.diff"
|
||||
"st-scrollback-20190122-3be4cf1.diff"
|
||||
"st-scrollback-mouse-0.8.diff"
|
||||
"st-vertcenter-20180320-6ac8c8a.diff"
|
||||
"st-alpha-0.8.2.diff"
|
||||
"st-ligatures-alpha-scrollback-20200430-0.8.3.diff"
|
||||
)
|
||||
"local-st-alpha-0.8.2.diff"
|
||||
"local-disable-bold-italic-fonts.diff")
|
||||
|
||||
source=("http://dl.suckless.org/st/st-$pkgver.tar.gz"
|
||||
"config.h"
|
||||
"${_patches[@]}")
|
||||
|
||||
sha256sums=('d42d3ceceb4d6a65e32e90a5336e3d446db612c3fbd9ebc1780bc6c9a03346a6'
|
||||
'7dad11c04d2c869bc14f70ee23dd27cbb1b88934f12ae59a39b59ecbbf1b2291'
|
||||
'0f5ce33953abce74a9da3088ea35bf067a9a4cfeb9fe6ea9800268ce69e436c0'
|
||||
'1e41fe17a5ef5a8194eea07422b49d815e2c2bb4d58d84771f793be423005310'
|
||||
'319458d980195d18fa0f81a6898d58f8d046c5ff982ab872d741f54bb60e267d'
|
||||
'cb87eb654985da46ff63663407184402393ad3d3013c8795570552fe56a15b9d'
|
||||
sha256sums=('aeb74e10aa11ed364e1bcc635a81a523119093e63befd2f231f8b0705b15bf35'
|
||||
'2842d6e1030ff0afad7420c4a93062e6da4e498295222005eae2581a38c45913'
|
||||
'7be1a09831f13361f5659aaad55110bde99b25c8ba826c11d1d7fcec21f32945'
|
||||
'30c9bcec5801614dd5cc8b96f470d7431e83d5d2af87bb2305df60082e5ab4ed'
|
||||
'3fb38940cc3bad3f9cd1e2a0796ebd0e48950a07860ecf8523a5afd0cd1b5a44'
|
||||
'04e6a4696293f668260b2f54a7240e379dbfabbc209de07bd5d4d57e9f513360'
|
||||
'9c5b4b4f23de80de78ca5ec3739dc6ce5e7f72666186cf4a9c6b614ac90fb285'
|
||||
'a7b3681d849fd8cca75cd38022a14fef2e26dc085bed1ebd8dcf0a65baa14898')
|
||||
'67b1bdc717e3f7914d04f0c72bc8a3f6efe91790248611c0a2c2dc905bf206bd'
|
||||
'59d5719a68e2f0e25c44b6ad9fab0d62ee8a6c5bcbcffb38176e9950cda16b15')
|
||||
|
||||
prepare() {
|
||||
cd $srcdir/st-$pkgver
|
||||
|
36
README.org
36
README.org
@ -1,33 +1,55 @@
|
||||
* My Suckless Terminal Build
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: my-suckless-terminal-build
|
||||
:END:
|
||||
|
||||
** Description
|
||||
[[https://st.suckless.org][Suckless Terminal]] Arch package with a few patches installed to keep things nice:
|
||||
[[https://st.suckless.org][Suckless Terminal]]
|
||||
[[https://www.archlinux.org/][Arch]] package with a few patches
|
||||
installed to keep things nice:
|
||||
|
||||
- [[https://st.suckless.org/patches/alpha/][alpha]]
|
||||
- [[https://st.suckless.org/patches/clipboard/][clipboard]]
|
||||
- [[https://st.suckless.org/patches/ligatures/][ligatures]]
|
||||
- [[https://st.suckless.org/patches/solarized/][solarized]]
|
||||
- [[https://st.suckless.org/patches/vertcenter/][vertcenter]]
|
||||
- [[https://st.suckless.org/patches/scrollback/][scrollback]]
|
||||
- [[https://st.suckless.org/patches/scrollback/][scrollback-mouse]]
|
||||
- [[https://st.suckless.org/patches/scrollback/][scrollback-mouse-altscreen]]
|
||||
- [[https://st.suckless.org/patches/vertcenter/][vertcenter]]
|
||||
- [[https://st.suckless.org/patches/disable_bold_italic_fonts/][disable_bold_italic_fonts]]
|
||||
|
||||
** Terminal-specific mappings
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: terminal-specific-mappings
|
||||
:END:
|
||||
|
||||
- Scroll through history -- Shift+PageUp/PageDown or Shift+Mouse wheel
|
||||
- Increase/decrease font size -- Ctrl+Shift+PageUp/PageDown
|
||||
- Return to default font size -- Ctrl+Alt+Home
|
||||
- Alt-k and Alt-j scroll back/foward in history one line at a time
|
||||
- Alt-u and Alt-d scroll back/foward in history a page at a time
|
||||
- Increase/decrease font size -- Shift+Alt+PageUp/PageDown
|
||||
- Return to default font size -- Shift+Alt+Home
|
||||
- Paste -- Shift+Insert
|
||||
|
||||
** Installation
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: installation
|
||||
:END:
|
||||
|
||||
#+BEGIN_SRC shell
|
||||
makepkg -si
|
||||
#+END_SRC
|
||||
|
||||
** Further Notes
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: further-notes
|
||||
:END:
|
||||
|
||||
- Change the transparency value by modifying the =alpha= variable in [[https://github.com/alrayyes/st/blob/master/config.h][config.h]].
|
||||
- Default font is [[https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/FiraCode][Fira Code Nerd Font Mono]]
|
||||
- When modifying [[https://github.com/alrayyes/st/blob/master/config.h][config.h]] be sure to run =updpkgsums= to update checksums before
|
||||
running =makepkg -si=
|
||||
|
||||
** License
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: license
|
||||
:END:
|
||||
|
||||
This theme is released under the MIT License. For more information read
|
||||
the [[file:LICENSE.org][license]].
|
||||
|
141
config.h
141
config.h
@ -5,23 +5,25 @@
|
||||
*
|
||||
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
|
||||
*/
|
||||
static char *font =
|
||||
"FuraCode Nerd Font "
|
||||
"Mono:style=Regular:pixelsize=18:antialias=true:autohint=true";
|
||||
static char *font = "FuraCode Nerd Font Mono:style=Regular:pixelsize=18:antialias=true:autohint=true";
|
||||
|
||||
/* disable bold, italic and roman fonts globally */
|
||||
int disablebold = 0;
|
||||
int disableitalic = 0;
|
||||
int disableroman = 0;
|
||||
|
||||
static int borderpx = 2;
|
||||
|
||||
/*
|
||||
* What program is execed by st depends of these precedence rules:
|
||||
* 1: program passed with -e
|
||||
* 2: scroll and/or utmp
|
||||
* 2: utmp option
|
||||
* 3: SHELL environment variable
|
||||
* 4: value of shell in /etc/passwd
|
||||
* 5: value of shell in config.h
|
||||
*/
|
||||
static char *shell = "/bin/sh";
|
||||
char *utmp = NULL;
|
||||
/* scroll program: to enable use a string like "scroll" */
|
||||
char *scroll = NULL;
|
||||
char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
|
||||
|
||||
/* identification sequence returned in DA and DECID */
|
||||
@ -34,9 +36,9 @@ static float chscale = 1.0;
|
||||
/*
|
||||
* word delimiter string
|
||||
*
|
||||
* More advanced example: L" `'\"()[]{}"
|
||||
* More advanced example: " `'\"()[]{}"
|
||||
*/
|
||||
wchar_t *worddelimiters = L" ";
|
||||
char *worddelimiters = " ";
|
||||
|
||||
/* selection timeouts (in milliseconds) */
|
||||
static unsigned int doubleclicktimeout = 300;
|
||||
@ -45,18 +47,9 @@ static unsigned int tripleclicktimeout = 600;
|
||||
/* alt screens */
|
||||
int allowaltscreen = 1;
|
||||
|
||||
/* allow certain non-interactive (insecure) window operations such as:
|
||||
setting the clipboard text */
|
||||
int allowwindowops = 0;
|
||||
|
||||
/*
|
||||
* draw latency range in ms - from new content/keypress/etc until drawing.
|
||||
* within this range, st draws when content stops arriving (idle). mostly it's
|
||||
* near minlatency, but it waits longer for slow updates to avoid partial draw.
|
||||
* low minlatency will tear/flicker more, as it can "detect" idle too early.
|
||||
*/
|
||||
static double minlatency = 8;
|
||||
static double maxlatency = 33;
|
||||
/* frames per second st should at maximum draw to the screen */
|
||||
static unsigned int xfps = 120;
|
||||
static unsigned int actionfps = 30;
|
||||
|
||||
/*
|
||||
* blinking timeout (set to 0 to disable blinking) for the terminal blinking
|
||||
@ -76,7 +69,7 @@ static unsigned int cursorthickness = 2;
|
||||
static int bellvolume = 0;
|
||||
|
||||
/* default TERM value */
|
||||
char *termname = "st-256color";
|
||||
char *termname = "xterm-256color";
|
||||
|
||||
/*
|
||||
* spaces per tab
|
||||
@ -100,42 +93,32 @@ float alpha = 0.8;
|
||||
|
||||
/* Terminal colors (16 first used in escape sequence) */
|
||||
static const char *colorname[] = {
|
||||
/* 8 normal colors */
|
||||
"black",
|
||||
"red3",
|
||||
"green3",
|
||||
"yellow3",
|
||||
"blue2",
|
||||
"magenta3",
|
||||
"cyan3",
|
||||
"gray90",
|
||||
|
||||
/* 8 bright colors */
|
||||
"gray50",
|
||||
"red",
|
||||
"green",
|
||||
"yellow",
|
||||
"#5c5cff",
|
||||
"magenta",
|
||||
"cyan",
|
||||
"white",
|
||||
|
||||
[255] = 0,
|
||||
|
||||
/* more colors can be added after 255 to use with DefaultXX */
|
||||
"#cccccc",
|
||||
"#555555",
|
||||
"black",
|
||||
"#282828", /* hard contrast: #1d2021 / soft contrast: #32302f */
|
||||
"#cc241d",
|
||||
"#98971a",
|
||||
"#d79921",
|
||||
"#458588",
|
||||
"#b16286",
|
||||
"#689d6a",
|
||||
"#a89984",
|
||||
"#928374",
|
||||
"#fb4934",
|
||||
"#b8bb26",
|
||||
"#fabd2f",
|
||||
"#83a598",
|
||||
"#d3869b",
|
||||
"#8ec07c",
|
||||
"#ebdbb2",
|
||||
};
|
||||
|
||||
/*
|
||||
* Default colors (colorname index)
|
||||
* foreground, background, cursor, reverse cursor
|
||||
*/
|
||||
unsigned int defaultfg = 7;
|
||||
unsigned int defaultfg = 12;
|
||||
unsigned int defaultbg = 258;
|
||||
static unsigned int defaultcs = 256;
|
||||
static unsigned int defaultrcs = 257;
|
||||
static unsigned int defaultcs = 14;
|
||||
static unsigned int defaultrcs = 15;
|
||||
|
||||
/*
|
||||
* Default shape of cursor
|
||||
@ -166,31 +149,24 @@ static unsigned int mousebg = 0;
|
||||
*/
|
||||
static unsigned int defaultattr = 11;
|
||||
|
||||
/*
|
||||
* Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set).
|
||||
* Note that if you want to use ShiftMask with selmasks, set this to an other
|
||||
* modifier, set to 0 to not use it.
|
||||
*/
|
||||
static uint forcemousemod = ShiftMask;
|
||||
|
||||
/*
|
||||
* Internal mouse shortcuts.
|
||||
* Beware that overloading Button1 will disable the selection.
|
||||
*/
|
||||
static MouseShortcut mshortcuts[] = {
|
||||
/* mask button function argument release */
|
||||
{XK_ANY_MOD, Button4, kscrollup, {.i = 1}, 0, /* !alt */ -1},
|
||||
{XK_ANY_MOD, Button5, kscrolldown, {.i = 1}, 0, /* !alt */ -1},
|
||||
{XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1},
|
||||
{ShiftMask, Button4, ttysend, {.s = "\033[5;2~"}},
|
||||
{XK_ANY_MOD, Button4, ttysend, {.s = "\031"}},
|
||||
{ShiftMask, Button5, ttysend, {.s = "\033[6;2~"}},
|
||||
{XK_ANY_MOD, Button5, ttysend, {.s = "\005"}},
|
||||
/* button mask string */
|
||||
{ Button4, XK_NO_MOD, "\031" },
|
||||
{ Button5, XK_NO_MOD, "\005" },
|
||||
};
|
||||
|
||||
MouseKey mkeys[] = {
|
||||
/* button mask function argument */
|
||||
{ Button4, ShiftMask, kscrollup, {.i = 1} },
|
||||
{ Button5, ShiftMask, kscrolldown, {.i = 1} },
|
||||
};
|
||||
|
||||
/* Internal keyboard shortcuts. */
|
||||
#define MODKEY Mod1Mask
|
||||
#define TERMMOD (ControlMask | ShiftMask)
|
||||
|
||||
static Shortcut shortcuts[] = {
|
||||
/* mask keysym function argument */
|
||||
@ -198,16 +174,21 @@ static Shortcut shortcuts[] = {
|
||||
{ ControlMask, XK_Print, toggleprinter, {.i = 0} },
|
||||
{ ShiftMask, XK_Print, printscreen, {.i = 0} },
|
||||
{ XK_ANY_MOD, XK_Print, printsel, {.i = 0} },
|
||||
{TERMMOD, XK_Prior, zoom, {.f = +1}},
|
||||
{TERMMOD, XK_Next, zoom, {.f = -1}},
|
||||
{TERMMOD, XK_Home, zoomreset, {.f = 0}},
|
||||
{TERMMOD, XK_C, clipcopy, {.i = 0}},
|
||||
{TERMMOD, XK_V, clippaste, {.i = 0}},
|
||||
{TERMMOD, XK_Y, selpaste, {.i = 0}},
|
||||
{ MODKEY|ShiftMask, XK_Prior, zoom, {.f = +1} },
|
||||
{ MODKEY|ShiftMask, XK_Next, zoom, {.f = -1} },
|
||||
{ MODKEY|ShiftMask, XK_Home, zoomreset, {.f = 0} },
|
||||
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
|
||||
{TERMMOD, XK_Num_Lock, numlock, {.i = 0}},
|
||||
{ MODKEY|ShiftMask, XK_Insert, clippaste, {.i = 0} },
|
||||
{ MODKEY|ShiftMask, XK_C, clipcopy, {.i = 0} },
|
||||
{ MODKEY|ShiftMask, XK_V, clippaste, {.i = 0} },
|
||||
{ MODKEY, XK_Num_Lock, numlock, {.i = 0} },
|
||||
// { MODKEY, XK_Control_L, iso14755, {.i = 0} },
|
||||
{ ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },
|
||||
{ ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} },
|
||||
{ MODKEY, XK_k, kscrollup, {.i = 1} },
|
||||
{ MODKEY, XK_j, kscrolldown, {.i = 1} },
|
||||
{ MODKEY, XK_u, kscrollup, {.i = -1} },
|
||||
{ MODKEY, XK_d, kscrolldown, {.i = -1} },
|
||||
};
|
||||
|
||||
/*
|
||||
@ -225,6 +206,10 @@ static Shortcut shortcuts[] = {
|
||||
* * 0: no value
|
||||
* * > 0: cursor application mode enabled
|
||||
* * < 0: cursor application mode disabled
|
||||
* crlf value
|
||||
* * 0: no value
|
||||
* * > 0: crlf mode is enabled
|
||||
* * < 0: crlf mode is disabled
|
||||
*
|
||||
* Be careful with the order of the definitions because st searches in
|
||||
* this table sequentially, so any XK_ANY_MOD must be in the last
|
||||
@ -243,6 +228,13 @@ static KeySym mappedkeys[] = {-1};
|
||||
*/
|
||||
static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;
|
||||
|
||||
/*
|
||||
* Override mouse-select while mask is active (when MODE_MOUSE is set).
|
||||
* Note that if you want to use ShiftMask with selmasks, set this to an other
|
||||
* modifier, set to 0 to not use it.
|
||||
*/
|
||||
static uint forceselmod = ShiftMask;
|
||||
|
||||
/*
|
||||
* This is the huge key array which defines all compatibility to the Linux
|
||||
* world. Please decide about changes wisely.
|
||||
@ -475,6 +467,7 @@ static uint selmasks[] = {
|
||||
* Printable characters in ASCII, used to estimate the advance width
|
||||
* of single wide characters.
|
||||
*/
|
||||
static char ascii_printable[] = " !\"#$%&'()*+,-./0123456789:;<=>?"
|
||||
static char ascii_printable[] =
|
||||
" !\"#$%&'()*+,-./0123456789:;<=>?"
|
||||
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
|
||||
"`abcdefghijklmnopqrstuvwxyz{|}~";
|
||||
|
141
config_desktop.h
141
config_desktop.h
@ -5,23 +5,25 @@
|
||||
*
|
||||
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
|
||||
*/
|
||||
static char *font =
|
||||
"FuraCode Nerd Font "
|
||||
"Mono:style=Regular:pixelsize=12:antialias=true:autohint=true";
|
||||
static char *font = "FuraCode Nerd Font Mono:style=Regular:pixelsize=12:antialias=true:autohint=true";
|
||||
|
||||
/* disable bold, italic and roman fonts globally */
|
||||
int disablebold = 0;
|
||||
int disableitalic = 0;
|
||||
int disableroman = 0;
|
||||
|
||||
static int borderpx = 2;
|
||||
|
||||
/*
|
||||
* What program is execed by st depends of these precedence rules:
|
||||
* 1: program passed with -e
|
||||
* 2: scroll and/or utmp
|
||||
* 2: utmp option
|
||||
* 3: SHELL environment variable
|
||||
* 4: value of shell in /etc/passwd
|
||||
* 5: value of shell in config.h
|
||||
*/
|
||||
static char *shell = "/bin/sh";
|
||||
char *utmp = NULL;
|
||||
/* scroll program: to enable use a string like "scroll" */
|
||||
char *scroll = NULL;
|
||||
char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
|
||||
|
||||
/* identification sequence returned in DA and DECID */
|
||||
@ -34,9 +36,9 @@ static float chscale = 1.0;
|
||||
/*
|
||||
* word delimiter string
|
||||
*
|
||||
* More advanced example: L" `'\"()[]{}"
|
||||
* More advanced example: " `'\"()[]{}"
|
||||
*/
|
||||
wchar_t *worddelimiters = L" ";
|
||||
char *worddelimiters = " ";
|
||||
|
||||
/* selection timeouts (in milliseconds) */
|
||||
static unsigned int doubleclicktimeout = 300;
|
||||
@ -45,18 +47,9 @@ static unsigned int tripleclicktimeout = 600;
|
||||
/* alt screens */
|
||||
int allowaltscreen = 1;
|
||||
|
||||
/* allow certain non-interactive (insecure) window operations such as:
|
||||
setting the clipboard text */
|
||||
int allowwindowops = 0;
|
||||
|
||||
/*
|
||||
* draw latency range in ms - from new content/keypress/etc until drawing.
|
||||
* within this range, st draws when content stops arriving (idle). mostly it's
|
||||
* near minlatency, but it waits longer for slow updates to avoid partial draw.
|
||||
* low minlatency will tear/flicker more, as it can "detect" idle too early.
|
||||
*/
|
||||
static double minlatency = 8;
|
||||
static double maxlatency = 33;
|
||||
/* frames per second st should at maximum draw to the screen */
|
||||
static unsigned int xfps = 120;
|
||||
static unsigned int actionfps = 30;
|
||||
|
||||
/*
|
||||
* blinking timeout (set to 0 to disable blinking) for the terminal blinking
|
||||
@ -76,7 +69,7 @@ static unsigned int cursorthickness = 2;
|
||||
static int bellvolume = 0;
|
||||
|
||||
/* default TERM value */
|
||||
char *termname = "st-256color";
|
||||
char *termname = "xterm-256color";
|
||||
|
||||
/*
|
||||
* spaces per tab
|
||||
@ -100,42 +93,32 @@ float alpha = 0.8;
|
||||
|
||||
/* Terminal colors (16 first used in escape sequence) */
|
||||
static const char *colorname[] = {
|
||||
/* 8 normal colors */
|
||||
"black",
|
||||
"red3",
|
||||
"green3",
|
||||
"yellow3",
|
||||
"blue2",
|
||||
"magenta3",
|
||||
"cyan3",
|
||||
"gray90",
|
||||
|
||||
/* 8 bright colors */
|
||||
"gray50",
|
||||
"red",
|
||||
"green",
|
||||
"yellow",
|
||||
"#5c5cff",
|
||||
"magenta",
|
||||
"cyan",
|
||||
"white",
|
||||
|
||||
[255] = 0,
|
||||
|
||||
/* more colors can be added after 255 to use with DefaultXX */
|
||||
"#cccccc",
|
||||
"#555555",
|
||||
"black",
|
||||
"#282828", /* hard contrast: #1d2021 / soft contrast: #32302f */
|
||||
"#cc241d",
|
||||
"#98971a",
|
||||
"#d79921",
|
||||
"#458588",
|
||||
"#b16286",
|
||||
"#689d6a",
|
||||
"#a89984",
|
||||
"#928374",
|
||||
"#fb4934",
|
||||
"#b8bb26",
|
||||
"#fabd2f",
|
||||
"#83a598",
|
||||
"#d3869b",
|
||||
"#8ec07c",
|
||||
"#ebdbb2",
|
||||
};
|
||||
|
||||
/*
|
||||
* Default colors (colorname index)
|
||||
* foreground, background, cursor, reverse cursor
|
||||
*/
|
||||
unsigned int defaultfg = 7;
|
||||
unsigned int defaultfg = 12;
|
||||
unsigned int defaultbg = 258;
|
||||
static unsigned int defaultcs = 256;
|
||||
static unsigned int defaultrcs = 257;
|
||||
static unsigned int defaultcs = 14;
|
||||
static unsigned int defaultrcs = 15;
|
||||
|
||||
/*
|
||||
* Default shape of cursor
|
||||
@ -166,31 +149,24 @@ static unsigned int mousebg = 0;
|
||||
*/
|
||||
static unsigned int defaultattr = 11;
|
||||
|
||||
/*
|
||||
* Force mouse select/shortcuts while mask is active (when MODE_MOUSE is set).
|
||||
* Note that if you want to use ShiftMask with selmasks, set this to an other
|
||||
* modifier, set to 0 to not use it.
|
||||
*/
|
||||
static uint forcemousemod = ShiftMask;
|
||||
|
||||
/*
|
||||
* Internal mouse shortcuts.
|
||||
* Beware that overloading Button1 will disable the selection.
|
||||
*/
|
||||
static MouseShortcut mshortcuts[] = {
|
||||
/* mask button function argument release */
|
||||
{XK_ANY_MOD, Button4, kscrollup, {.i = 1}, 0, /* !alt */ -1},
|
||||
{XK_ANY_MOD, Button5, kscrolldown, {.i = 1}, 0, /* !alt */ -1},
|
||||
{XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1},
|
||||
{ShiftMask, Button4, ttysend, {.s = "\033[5;2~"}},
|
||||
{XK_ANY_MOD, Button4, ttysend, {.s = "\031"}},
|
||||
{ShiftMask, Button5, ttysend, {.s = "\033[6;2~"}},
|
||||
{XK_ANY_MOD, Button5, ttysend, {.s = "\005"}},
|
||||
/* button mask string */
|
||||
{ Button4, XK_NO_MOD, "\031" },
|
||||
{ Button5, XK_NO_MOD, "\005" },
|
||||
};
|
||||
|
||||
MouseKey mkeys[] = {
|
||||
/* button mask function argument */
|
||||
{ Button4, ShiftMask, kscrollup, {.i = 1} },
|
||||
{ Button5, ShiftMask, kscrolldown, {.i = 1} },
|
||||
};
|
||||
|
||||
/* Internal keyboard shortcuts. */
|
||||
#define MODKEY Mod1Mask
|
||||
#define TERMMOD (ControlMask | ShiftMask)
|
||||
|
||||
static Shortcut shortcuts[] = {
|
||||
/* mask keysym function argument */
|
||||
@ -198,16 +174,21 @@ static Shortcut shortcuts[] = {
|
||||
{ ControlMask, XK_Print, toggleprinter, {.i = 0} },
|
||||
{ ShiftMask, XK_Print, printscreen, {.i = 0} },
|
||||
{ XK_ANY_MOD, XK_Print, printsel, {.i = 0} },
|
||||
{TERMMOD, XK_Prior, zoom, {.f = +1}},
|
||||
{TERMMOD, XK_Next, zoom, {.f = -1}},
|
||||
{TERMMOD, XK_Home, zoomreset, {.f = 0}},
|
||||
{TERMMOD, XK_C, clipcopy, {.i = 0}},
|
||||
{TERMMOD, XK_V, clippaste, {.i = 0}},
|
||||
{TERMMOD, XK_Y, selpaste, {.i = 0}},
|
||||
{ MODKEY|ShiftMask, XK_Prior, zoom, {.f = +1} },
|
||||
{ MODKEY|ShiftMask, XK_Next, zoom, {.f = -1} },
|
||||
{ MODKEY|ShiftMask, XK_Home, zoomreset, {.f = 0} },
|
||||
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
|
||||
{TERMMOD, XK_Num_Lock, numlock, {.i = 0}},
|
||||
{ MODKEY|ShiftMask, XK_Insert, clippaste, {.i = 0} },
|
||||
{ MODKEY|ShiftMask, XK_C, clipcopy, {.i = 0} },
|
||||
{ MODKEY|ShiftMask, XK_V, clippaste, {.i = 0} },
|
||||
{ MODKEY, XK_Num_Lock, numlock, {.i = 0} },
|
||||
// { MODKEY, XK_Control_L, iso14755, {.i = 0} },
|
||||
{ ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },
|
||||
{ ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} },
|
||||
{ MODKEY, XK_k, kscrollup, {.i = 1} },
|
||||
{ MODKEY, XK_j, kscrolldown, {.i = 1} },
|
||||
{ MODKEY, XK_u, kscrollup, {.i = -1} },
|
||||
{ MODKEY, XK_d, kscrolldown, {.i = -1} },
|
||||
};
|
||||
|
||||
/*
|
||||
@ -225,6 +206,10 @@ static Shortcut shortcuts[] = {
|
||||
* * 0: no value
|
||||
* * > 0: cursor application mode enabled
|
||||
* * < 0: cursor application mode disabled
|
||||
* crlf value
|
||||
* * 0: no value
|
||||
* * > 0: crlf mode is enabled
|
||||
* * < 0: crlf mode is disabled
|
||||
*
|
||||
* Be careful with the order of the definitions because st searches in
|
||||
* this table sequentially, so any XK_ANY_MOD must be in the last
|
||||
@ -243,6 +228,13 @@ static KeySym mappedkeys[] = {-1};
|
||||
*/
|
||||
static uint ignoremod = Mod2Mask|XK_SWITCH_MOD;
|
||||
|
||||
/*
|
||||
* Override mouse-select while mask is active (when MODE_MOUSE is set).
|
||||
* Note that if you want to use ShiftMask with selmasks, set this to an other
|
||||
* modifier, set to 0 to not use it.
|
||||
*/
|
||||
static uint forceselmod = ShiftMask;
|
||||
|
||||
/*
|
||||
* This is the huge key array which defines all compatibility to the Linux
|
||||
* world. Please decide about changes wisely.
|
||||
@ -475,6 +467,7 @@ static uint selmasks[] = {
|
||||
* Printable characters in ASCII, used to estimate the advance width
|
||||
* of single wide characters.
|
||||
*/
|
||||
static char ascii_printable[] = " !\"#$%&'()*+,-./0123456789:;<=>?"
|
||||
static char ascii_printable[] =
|
||||
" !\"#$%&'()*+,-./0123456789:;<=>?"
|
||||
"@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_"
|
||||
"`abcdefghijklmnopqrstuvwxyz{|}~";
|
||||
|
43
local-disable-bold-italic-fonts.diff
Normal file
43
local-disable-bold-italic-fonts.diff
Normal file
@ -0,0 +1,43 @@
|
||||
diff -up a/config.def.h b/config.def.h
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -6,6 +6,12 @@
|
||||
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
|
||||
*/
|
||||
static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true";
|
||||
+
|
||||
+/* disable bold, italic and roman fonts globally */
|
||||
+int disablebold = 0;
|
||||
+int disableitalic = 0;
|
||||
+int disableroman = 0;
|
||||
+
|
||||
static int borderpx = 2;
|
||||
|
||||
/*
|
||||
diff -up a/x.c b/x.c
|
||||
--- a/x.c
|
||||
+++ b/x.c
|
||||
@@ -231,6 +231,11 @@ static char *usedfont = NULL;
|
||||
static double usedfontsize = 0;
|
||||
static double defaultfontsize = 0;
|
||||
|
||||
+/* declared in config.h */
|
||||
+extern int disablebold;
|
||||
+extern int disableitalic;
|
||||
+extern int disableroman;
|
||||
+
|
||||
static char *opt_alpha = NULL;
|
||||
static char *opt_class = NULL;
|
||||
static char **opt_cmd = NULL;
|
||||
@@ -979,7 +984,10 @@ xloadfonts(char *fontstr, double fontsiz
|
||||
win.cyo = ceilf(dc.font.height * (chscale - 1) / 2);
|
||||
|
||||
FcPatternDel(pattern, FC_SLANT);
|
||||
- FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC);
|
||||
+ if (!disableitalic)
|
||||
+ FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ITALIC);
|
||||
+ if (!disableroman)
|
||||
+ FcPatternAddInteger(pattern, FC_SLANT, FC_SLANT_ROMAN);
|
||||
if (xloadfont(&dc.ifont, pattern))
|
||||
die("can't open font %s\n", fontstr);
|
||||
|
@ -1,5 +1,4 @@
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index 0e01717..e116631 100644
|
||||
diff -up a/config.def.h b/config.def.h
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -82,6 +82,9 @@ char *termname = "st-256color";
|
||||
@ -29,8 +28,7 @@ index 0e01717..e116631 100644
|
||||
static unsigned int defaultcs = 256;
|
||||
static unsigned int defaultrcs = 257;
|
||||
|
||||
diff --git a/config.mk b/config.mk
|
||||
index 0cbb002..1d2f0e2 100644
|
||||
diff -up a/config.mk b/config.mk
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -16,7 +16,7 @@ PKG_CONFIG = pkg-config
|
||||
@ -42,20 +40,19 @@ index 0cbb002..1d2f0e2 100644
|
||||
`$(PKG_CONFIG) --libs fontconfig` \
|
||||
`$(PKG_CONFIG) --libs freetype2`
|
||||
|
||||
diff --git a/st.h b/st.h
|
||||
index 38c61c4..b7634ab 100644
|
||||
diff -up a/st.h b/st.h
|
||||
--- a/st.h
|
||||
+++ b/st.h
|
||||
@@ -120,3 +120,4 @@ extern char *termname;
|
||||
@@ -129,4 +129,5 @@ extern char *termname;
|
||||
extern unsigned int tabspaces;
|
||||
extern unsigned int defaultfg;
|
||||
extern unsigned int defaultbg;
|
||||
+extern float alpha;
|
||||
diff --git a/x.c b/x.c
|
||||
index 0422421..588dec3 100644
|
||||
extern MouseKey mkeys[];
|
||||
diff -up a/x.c b/x.c
|
||||
--- a/x.c
|
||||
+++ b/x.c
|
||||
@@ -98,6 +98,7 @@ typedef struct {
|
||||
@@ -99,6 +99,7 @@ typedef struct {
|
||||
XSetWindowAttributes attrs;
|
||||
int scr;
|
||||
int isfixed; /* is fixed geometry? */
|
||||
@ -63,7 +60,7 @@ index 0422421..588dec3 100644
|
||||
int l, t; /* left and top offset */
|
||||
int gm; /* geometry mask */
|
||||
} XWindow;
|
||||
@@ -229,6 +230,7 @@ static char *usedfont = NULL;
|
||||
@@ -230,6 +231,7 @@ static char *usedfont = NULL;
|
||||
static double usedfontsize = 0;
|
||||
static double defaultfontsize = 0;
|
||||
|
||||
@ -71,7 +68,7 @@ index 0422421..588dec3 100644
|
||||
static char *opt_class = NULL;
|
||||
static char **opt_cmd = NULL;
|
||||
static char *opt_embed = NULL;
|
||||
@@ -688,7 +690,7 @@ xresize(int col, int row)
|
||||
@@ -700,7 +702,7 @@ xresize(int col, int row)
|
||||
|
||||
XFreePixmap(xw.dpy, xw.buf);
|
||||
xw.buf = XCreatePixmap(xw.dpy, xw.win, win.w, win.h,
|
||||
@ -80,7 +77,7 @@ index 0422421..588dec3 100644
|
||||
XftDrawChange(xw.draw, xw.buf);
|
||||
xclear(0, 0, win.w, win.h);
|
||||
|
||||
@@ -748,6 +750,13 @@ xloadcols(void)
|
||||
@@ -760,6 +762,13 @@ xloadcols(void)
|
||||
else
|
||||
die("could not allocate color %d\n", i);
|
||||
}
|
||||
@ -94,7 +91,7 @@ index 0422421..588dec3 100644
|
||||
loaded = 1;
|
||||
}
|
||||
|
||||
@@ -1004,11 +1013,23 @@ xinit(int cols, int rows)
|
||||
@@ -1017,12 +1026,25 @@ xinit(int cols, int rows)
|
||||
Window parent;
|
||||
pid_t thispid = getpid();
|
||||
XColor xmousefg, xmousebg;
|
||||
@ -104,8 +101,8 @@ index 0422421..588dec3 100644
|
||||
if (!(xw.dpy = XOpenDisplay(NULL)))
|
||||
die("can't open display\n");
|
||||
xw.scr = XDefaultScreen(xw.dpy);
|
||||
- xw.vis = XDefaultVisual(xw.dpy, xw.scr);
|
||||
+
|
||||
xw.vis = XDefaultVisual(xw.dpy, xw.scr);
|
||||
|
||||
+ if (!(opt_embed && (parent = strtol(opt_embed, NULL, 0)))) {
|
||||
+ parent = XRootWindow(xw.dpy, xw.scr);
|
||||
+ xw.depth = 32;
|
||||
@ -116,10 +113,11 @@ index 0422421..588dec3 100644
|
||||
+
|
||||
+ XMatchVisualInfo(xw.dpy, xw.scr, xw.depth, TrueColor, &vis);
|
||||
+ xw.vis = vis.visual;
|
||||
|
||||
+
|
||||
/* font */
|
||||
if (!FcInit())
|
||||
@@ -1018,7 +1039,7 @@ xinit(int cols, int rows)
|
||||
die("could not init fontconfig.\n");
|
||||
@@ -1031,7 +1053,7 @@ xinit(int cols, int rows)
|
||||
xloadfonts(usedfont, 0);
|
||||
|
||||
/* colors */
|
||||
@ -128,7 +126,7 @@ index 0422421..588dec3 100644
|
||||
xloadcols();
|
||||
|
||||
/* adjust fixed window geometry */
|
||||
@@ -1038,19 +1059,15 @@ xinit(int cols, int rows)
|
||||
@@ -1051,19 +1073,15 @@ xinit(int cols, int rows)
|
||||
| ButtonMotionMask | ButtonPressMask | ButtonReleaseMask;
|
||||
xw.attrs.colormap = xw.cmap;
|
||||
|
||||
@ -151,7 +149,7 @@ index 0422421..588dec3 100644
|
||||
XSetForeground(xw.dpy, dc.gc, dc.col[defaultbg].pixel);
|
||||
XFillRectangle(xw.dpy, xw.buf, dc.gc, 0, 0, win.w, win.h);
|
||||
|
||||
@@ -1894,6 +1911,9 @@ main(int argc, char *argv[])
|
||||
@@ -1907,6 +1925,9 @@ main(int argc, char *argv[])
|
||||
case 'a':
|
||||
allowaltscreen = 0;
|
||||
break;
|
22
st-clipboard-0.8.2.diff
Normal file
22
st-clipboard-0.8.2.diff
Normal file
@ -0,0 +1,22 @@
|
||||
diff --git a/x.c b/x.c
|
||||
index 0422421..e00d930 100644
|
||||
--- a/x.c
|
||||
+++ b/x.c
|
||||
@@ -627,6 +627,8 @@ setsel(char *str, Time t)
|
||||
XSetSelectionOwner(xw.dpy, XA_PRIMARY, xw.win, t);
|
||||
if (XGetSelectionOwner(xw.dpy, XA_PRIMARY) != xw.win)
|
||||
selclear();
|
||||
+
|
||||
+ clipcopy(NULL);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -644,7 +646,7 @@ brelease(XEvent *e)
|
||||
}
|
||||
|
||||
if (e->xbutton.button == Button2)
|
||||
- selpaste(NULL);
|
||||
+ clippaste(NULL);
|
||||
else if (e->xbutton.button == Button1)
|
||||
mousesel(e, 1);
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
diff --git a/x.c b/x.c
|
||||
index e5f1737..5cabd60 100644
|
||||
--- a/x.c
|
||||
+++ b/x.c
|
||||
@@ -673,6 +673,7 @@ setsel(char *str, Time t)
|
||||
XSetSelectionOwner(xw.dpy, XA_PRIMARY, xw.win, t);
|
||||
if (XGetSelectionOwner(xw.dpy, XA_PRIMARY) != xw.win)
|
||||
selclear();
|
||||
+ clipcopy(NULL);
|
||||
}
|
||||
|
||||
void
|
@ -1,307 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 470ac86..38240da 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
include config.mk
|
||||
|
||||
-SRC = st.c x.c
|
||||
+SRC = st.c x.c hb.c
|
||||
OBJ = $(SRC:.c=.o)
|
||||
|
||||
all: options st
|
||||
@@ -22,7 +22,8 @@ config.h:
|
||||
$(CC) $(STCFLAGS) -c $<
|
||||
|
||||
st.o: config.h st.h win.h
|
||||
-x.o: arg.h config.h st.h win.h
|
||||
+x.o: arg.h config.h st.h win.h hb.h
|
||||
+hb.o: st.h
|
||||
|
||||
$(OBJ): config.h config.mk
|
||||
|
||||
diff --git a/config.mk b/config.mk
|
||||
index ddc65ae..07a3d14 100644
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -15,10 +15,12 @@ PKG_CONFIG = pkg-config
|
||||
# includes and libs
|
||||
INCS = -I$(X11INC) \
|
||||
`$(PKG_CONFIG) --cflags fontconfig` \
|
||||
- `$(PKG_CONFIG) --cflags freetype2`
|
||||
+ `$(PKG_CONFIG) --cflags freetype2` \
|
||||
+ `$(PKG_CONFIG) --cflags harfbuzz`
|
||||
LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft -lXrender\
|
||||
`$(PKG_CONFIG) --libs fontconfig` \
|
||||
- `$(PKG_CONFIG) --libs freetype2`
|
||||
+ `$(PKG_CONFIG) --libs freetype2` \
|
||||
+ `$(PKG_CONFIG) --libs harfbuzz`
|
||||
|
||||
# flags
|
||||
STCPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600
|
||||
diff --git a/hb.c b/hb.c
|
||||
new file mode 100644
|
||||
index 0000000..7df2828
|
||||
--- /dev/null
|
||||
+++ b/hb.c
|
||||
@@ -0,0 +1,136 @@
|
||||
+#include <stdlib.h>
|
||||
+#include <stdio.h>
|
||||
+#include <math.h>
|
||||
+#include <X11/Xft/Xft.h>
|
||||
+#include <hb.h>
|
||||
+#include <hb-ft.h>
|
||||
+
|
||||
+#include "st.h"
|
||||
+
|
||||
+void hbtransformsegment(XftFont *xfont, const Glyph *string, hb_codepoint_t *codepoints, int start, int length);
|
||||
+hb_font_t *hbfindfont(XftFont *match);
|
||||
+
|
||||
+typedef struct {
|
||||
+ XftFont *match;
|
||||
+ hb_font_t *font;
|
||||
+} HbFontMatch;
|
||||
+
|
||||
+static int hbfontslen = 0;
|
||||
+static HbFontMatch *hbfontcache = NULL;
|
||||
+
|
||||
+void
|
||||
+hbunloadfonts()
|
||||
+{
|
||||
+ for (int i = 0; i < hbfontslen; i++) {
|
||||
+ hb_font_destroy(hbfontcache[i].font);
|
||||
+ XftUnlockFace(hbfontcache[i].match);
|
||||
+ }
|
||||
+
|
||||
+ if (hbfontcache != NULL) {
|
||||
+ free(hbfontcache);
|
||||
+ hbfontcache = NULL;
|
||||
+ }
|
||||
+ hbfontslen = 0;
|
||||
+}
|
||||
+
|
||||
+hb_font_t *
|
||||
+hbfindfont(XftFont *match)
|
||||
+{
|
||||
+ for (int i = 0; i < hbfontslen; i++) {
|
||||
+ if (hbfontcache[i].match == match)
|
||||
+ return hbfontcache[i].font;
|
||||
+ }
|
||||
+
|
||||
+ /* Font not found in cache, caching it now. */
|
||||
+ hbfontcache = realloc(hbfontcache, sizeof(HbFontMatch) * (hbfontslen + 1));
|
||||
+ FT_Face face = XftLockFace(match);
|
||||
+ hb_font_t *font = hb_ft_font_create(face, NULL);
|
||||
+ if (font == NULL)
|
||||
+ die("Failed to load Harfbuzz font.");
|
||||
+
|
||||
+ hbfontcache[hbfontslen].match = match;
|
||||
+ hbfontcache[hbfontslen].font = font;
|
||||
+ hbfontslen += 1;
|
||||
+
|
||||
+ return font;
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+hbtransform(XftGlyphFontSpec *specs, const Glyph *glyphs, size_t len, int x, int y)
|
||||
+{
|
||||
+ int start = 0, length = 1, gstart = 0;
|
||||
+ hb_codepoint_t *codepoints = calloc(len, sizeof(hb_codepoint_t));
|
||||
+
|
||||
+ for (int idx = 1, specidx = 1; idx < len; idx++) {
|
||||
+ if (glyphs[idx].mode & ATTR_WDUMMY) {
|
||||
+ length += 1;
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ if (specs[specidx].font != specs[start].font || ATTRCMP(glyphs[gstart], glyphs[idx]) || selected(x + idx, y) != selected(x + gstart, y)) {
|
||||
+ hbtransformsegment(specs[start].font, glyphs, codepoints, gstart, length);
|
||||
+
|
||||
+ /* Reset the sequence. */
|
||||
+ length = 1;
|
||||
+ start = specidx;
|
||||
+ gstart = idx;
|
||||
+ } else {
|
||||
+ length += 1;
|
||||
+ }
|
||||
+
|
||||
+ specidx++;
|
||||
+ }
|
||||
+
|
||||
+ /* EOL. */
|
||||
+ hbtransformsegment(specs[start].font, glyphs, codepoints, gstart, length);
|
||||
+
|
||||
+ /* Apply the transformation to glyph specs. */
|
||||
+ for (int i = 0, specidx = 0; i < len; i++) {
|
||||
+ if (glyphs[i].mode & ATTR_WDUMMY)
|
||||
+ continue;
|
||||
+
|
||||
+ if (codepoints[i] != specs[specidx].glyph)
|
||||
+ ((Glyph *)glyphs)[i].mode |= ATTR_LIGA;
|
||||
+
|
||||
+ specs[specidx++].glyph = codepoints[i];
|
||||
+ }
|
||||
+
|
||||
+ free(codepoints);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+hbtransformsegment(XftFont *xfont, const Glyph *string, hb_codepoint_t *codepoints, int start, int length)
|
||||
+{
|
||||
+ hb_font_t *font = hbfindfont(xfont);
|
||||
+ if (font == NULL)
|
||||
+ return;
|
||||
+
|
||||
+ Rune rune;
|
||||
+ ushort mode = USHRT_MAX;
|
||||
+ hb_buffer_t *buffer = hb_buffer_create();
|
||||
+ hb_buffer_set_direction(buffer, HB_DIRECTION_LTR);
|
||||
+
|
||||
+ /* Fill buffer with codepoints. */
|
||||
+ for (int i = start; i < (start+length); i++) {
|
||||
+ rune = string[i].u;
|
||||
+ mode = string[i].mode;
|
||||
+ if (mode & ATTR_WDUMMY)
|
||||
+ rune = 0x0020;
|
||||
+ hb_buffer_add_codepoints(buffer, &rune, 1, 0, 1);
|
||||
+ }
|
||||
+
|
||||
+ /* Shape the segment. */
|
||||
+ hb_shape(font, buffer, NULL, 0);
|
||||
+
|
||||
+ /* Get new glyph info. */
|
||||
+ hb_glyph_info_t *info = hb_buffer_get_glyph_infos(buffer, NULL);
|
||||
+
|
||||
+ /* Write new codepoints. */
|
||||
+ for (int i = 0; i < length; i++) {
|
||||
+ hb_codepoint_t gid = info[i].codepoint;
|
||||
+ codepoints[start+i] = gid;
|
||||
+ }
|
||||
+
|
||||
+ /* Cleanup. */
|
||||
+ hb_buffer_destroy(buffer);
|
||||
+}
|
||||
diff --git a/hb.h b/hb.h
|
||||
new file mode 100644
|
||||
index 0000000..b3e02d0
|
||||
--- /dev/null
|
||||
+++ b/hb.h
|
||||
@@ -0,0 +1,7 @@
|
||||
+#include <X11/Xft/Xft.h>
|
||||
+#include <hb.h>
|
||||
+#include <hb-ft.h>
|
||||
+
|
||||
+void hbunloadfonts();
|
||||
+void hbtransform(XftGlyphFontSpec *, const Glyph *, size_t, int, int);
|
||||
+
|
||||
diff --git a/st.c b/st.c
|
||||
index 641edc0..14a0b66 100644
|
||||
--- a/st.c
|
||||
+++ b/st.c
|
||||
@@ -2670,7 +2670,8 @@ draw(void)
|
||||
drawregion(0, 0, term.col, term.row);
|
||||
if (term.scr == 0)
|
||||
xdrawcursor(cx, term.c.y, term.line[term.c.y][cx],
|
||||
- term.ocx, term.ocy, term.line[term.ocy][term.ocx]);
|
||||
+ term.ocx, term.ocy, term.line[term.ocy][term.ocx],
|
||||
+ term.line[term.ocy], term.col);
|
||||
term.ocx = cx;
|
||||
term.ocy = term.c.y;
|
||||
xfinishdraw();
|
||||
diff --git a/st.h b/st.h
|
||||
index 2b2ba94..01bfb05 100644
|
||||
--- a/st.h
|
||||
+++ b/st.h
|
||||
@@ -11,7 +11,8 @@
|
||||
#define DIVCEIL(n, d) (((n) + ((d) - 1)) / (d))
|
||||
#define DEFAULT(a, b) (a) = (a) ? (a) : (b)
|
||||
#define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x)
|
||||
-#define ATTRCMP(a, b) ((a).mode != (b).mode || (a).fg != (b).fg || \
|
||||
+#define ATTRCMP(a, b) (((a).mode & (~ATTR_WRAP) & (~ATTR_LIGA)) != ((b).mode & (~ATTR_WRAP) & (~ATTR_LIGA)) || \
|
||||
+ (a).fg != (b).fg || \
|
||||
(a).bg != (b).bg)
|
||||
#define TIMEDIFF(t1, t2) ((t1.tv_sec-t2.tv_sec)*1000 + \
|
||||
(t1.tv_nsec-t2.tv_nsec)/1E6)
|
||||
@@ -33,6 +34,7 @@ enum glyph_attribute {
|
||||
ATTR_WRAP = 1 << 8,
|
||||
ATTR_WIDE = 1 << 9,
|
||||
ATTR_WDUMMY = 1 << 10,
|
||||
+ ATTR_LIGA = 1 << 11,
|
||||
ATTR_BOLD_FAINT = ATTR_BOLD | ATTR_FAINT,
|
||||
};
|
||||
|
||||
diff --git a/win.h b/win.h
|
||||
index a6ef1b9..bc0d180 100644
|
||||
--- a/win.h
|
||||
+++ b/win.h
|
||||
@@ -25,7 +25,7 @@ enum win_mode {
|
||||
|
||||
void xbell(void);
|
||||
void xclipcopy(void);
|
||||
-void xdrawcursor(int, int, Glyph, int, int, Glyph);
|
||||
+void xdrawcursor(int, int, Glyph, int, int, Glyph, Line, int);
|
||||
void xdrawline(Line, int, int, int);
|
||||
void xfinishdraw(void);
|
||||
void xloadcols(void);
|
||||
diff --git a/x.c b/x.c
|
||||
index 50da23c..bec3e76 100644
|
||||
--- a/x.c
|
||||
+++ b/x.c
|
||||
@@ -19,6 +19,7 @@ char *argv0;
|
||||
#include "arg.h"
|
||||
#include "st.h"
|
||||
#include "win.h"
|
||||
+#include "hb.h"
|
||||
|
||||
/* types used in config.h */
|
||||
typedef struct {
|
||||
@@ -1040,6 +1041,9 @@ xunloadfont(Font *f)
|
||||
void
|
||||
xunloadfonts(void)
|
||||
{
|
||||
+ /* Clear Harfbuzz font cache. */
|
||||
+ hbunloadfonts();
|
||||
+
|
||||
/* Free the loaded fonts in the font cache. */
|
||||
while (frclen > 0)
|
||||
XftFontClose(xw.dpy, frc[--frclen].font);
|
||||
@@ -1246,7 +1250,7 @@ xmakeglyphfontspecs(XftGlyphFontSpec *specs, const Glyph *glyphs, int len, int x
|
||||
mode = glyphs[i].mode;
|
||||
|
||||
/* Skip dummy wide-character spacing. */
|
||||
- if (mode == ATTR_WDUMMY)
|
||||
+ if (mode & ATTR_WDUMMY)
|
||||
continue;
|
||||
|
||||
/* Determine font for glyph if different from previous glyph. */
|
||||
@@ -1353,6 +1357,9 @@ xmakeglyphfontspecs(XftGlyphFontSpec *specs, const Glyph *glyphs, int len, int x
|
||||
numspecs++;
|
||||
}
|
||||
|
||||
+ /* Harfbuzz transformation for ligatures. */
|
||||
+ hbtransform(specs, glyphs, len, x, y);
|
||||
+
|
||||
return numspecs;
|
||||
}
|
||||
|
||||
@@ -1502,14 +1509,17 @@ xdrawglyph(Glyph g, int x, int y)
|
||||
}
|
||||
|
||||
void
|
||||
-xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og)
|
||||
+xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og, Line line, int len)
|
||||
{
|
||||
Color drawcol;
|
||||
|
||||
/* remove the old cursor */
|
||||
if (selected(ox, oy))
|
||||
og.mode ^= ATTR_REVERSE;
|
||||
- xdrawglyph(og, ox, oy);
|
||||
+
|
||||
+ /* Redraw the line where cursor was previously.
|
||||
+ * It will restore the ligatures broken by the cursor. */
|
||||
+ xdrawline(line, 0, oy, len);
|
||||
|
||||
if (IS_SET(MODE_HIDE))
|
||||
return;
|
@ -1,8 +1,8 @@
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index 0895a1f..eef24df 100644
|
||||
index 823e79f..f6278a3 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -188,6 +188,8 @@ static Shortcut shortcuts[] = {
|
||||
@@ -178,6 +178,8 @@ static Shortcut shortcuts[] = {
|
||||
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
|
||||
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
|
||||
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
|
||||
@ -12,7 +12,7 @@ index 0895a1f..eef24df 100644
|
||||
|
||||
/*
|
||||
diff --git a/st.c b/st.c
|
||||
index 0ce6ac2..641edc0 100644
|
||||
index b8e6077..218ae73 100644
|
||||
--- a/st.c
|
||||
+++ b/st.c
|
||||
@@ -35,6 +35,7 @@
|
||||
@ -26,7 +26,7 @@ index 0ce6ac2..641edc0 100644
|
||||
@@ -42,6 +43,9 @@
|
||||
#define ISCONTROLC1(c) (BETWEEN(c, 0x80, 0x9f))
|
||||
#define ISCONTROL(c) (ISCONTROLC0(c) || ISCONTROLC1(c))
|
||||
#define ISDELIM(u) (u && wcschr(worddelimiters, u))
|
||||
#define ISDELIM(u) (utf8strchr(worddelimiters, u) != NULL)
|
||||
+#define TLINE(y) ((y) < term.scr ? term.hist[((y) + term.histi - \
|
||||
+ term.scr + HISTSIZE + 1) % HISTSIZE] : \
|
||||
+ term.line[(y) - term.scr])
|
||||
@ -43,7 +43,7 @@ index 0ce6ac2..641edc0 100644
|
||||
int *dirty; /* dirtyness of lines */
|
||||
TCursor c; /* cursor */
|
||||
int ocx; /* old cursor col */
|
||||
@@ -185,8 +192,8 @@ static void tnewline(int);
|
||||
@@ -184,8 +191,8 @@ static void tnewline(int);
|
||||
static void tputtab(int);
|
||||
static void tputc(Rune);
|
||||
static void treset(void);
|
||||
@ -54,7 +54,7 @@ index 0ce6ac2..641edc0 100644
|
||||
static void tsetattr(int *, int);
|
||||
static void tsetchar(Rune, Glyph *, int, int);
|
||||
static void tsetdirt(int, int);
|
||||
@@ -415,10 +422,10 @@ tlinelen(int y)
|
||||
@@ -427,10 +434,10 @@ tlinelen(int y)
|
||||
{
|
||||
int i = term.col;
|
||||
|
||||
@ -67,7 +67,7 @@ index 0ce6ac2..641edc0 100644
|
||||
--i;
|
||||
|
||||
return i;
|
||||
@@ -527,7 +534,7 @@ selsnap(int *x, int *y, int direction)
|
||||
@@ -539,7 +546,7 @@ selsnap(int *x, int *y, int direction)
|
||||
* Snap around if the word wraps around at the end or
|
||||
* beginning of a line.
|
||||
*/
|
||||
@ -76,7 +76,7 @@ index 0ce6ac2..641edc0 100644
|
||||
prevdelim = ISDELIM(prevgp->u);
|
||||
for (;;) {
|
||||
newx = *x + direction;
|
||||
@@ -542,14 +549,14 @@ selsnap(int *x, int *y, int direction)
|
||||
@@ -554,14 +561,14 @@ selsnap(int *x, int *y, int direction)
|
||||
yt = *y, xt = *x;
|
||||
else
|
||||
yt = newy, xt = newx;
|
||||
@ -93,7 +93,7 @@ index 0ce6ac2..641edc0 100644
|
||||
delim = ISDELIM(gp->u);
|
||||
if (!(gp->mode & ATTR_WDUMMY) && (delim != prevdelim
|
||||
|| (delim && gp->u != prevgp->u)))
|
||||
@@ -570,14 +577,14 @@ selsnap(int *x, int *y, int direction)
|
||||
@@ -582,14 +589,14 @@ selsnap(int *x, int *y, int direction)
|
||||
*x = (direction < 0) ? 0 : term.col - 1;
|
||||
if (direction < 0) {
|
||||
for (; *y > 0; *y += direction) {
|
||||
@ -110,7 +110,7 @@ index 0ce6ac2..641edc0 100644
|
||||
& ATTR_WRAP)) {
|
||||
break;
|
||||
}
|
||||
@@ -608,13 +615,13 @@ getsel(void)
|
||||
@@ -620,13 +627,13 @@ getsel(void)
|
||||
}
|
||||
|
||||
if (sel.type == SEL_RECTANGULAR) {
|
||||
@ -192,13 +192,7 @@ index 0ce6ac2..641edc0 100644
|
||||
tsetdirt(orig, term.bot-n);
|
||||
tclearregion(0, term.bot-n+1, term.col-1, term.bot);
|
||||
|
||||
@@ -1076,17 +1126,28 @@ tscrolldown(int orig, int n)
|
||||
term.line[i-n] = temp;
|
||||
}
|
||||
|
||||
- selscroll(orig, n);
|
||||
+ if (term.scr == 0)
|
||||
+ selscroll(orig, n);
|
||||
@@ -1080,13 +1130,23 @@ tscrolldown(int orig, int n)
|
||||
}
|
||||
|
||||
void
|
||||
@ -223,17 +217,7 @@ index 0ce6ac2..641edc0 100644
|
||||
tclearregion(0, orig, term.col-1, orig+n-1);
|
||||
tsetdirt(orig+n, term.bot);
|
||||
|
||||
@@ -1096,7 +1157,8 @@ tscrollup(int orig, int n)
|
||||
term.line[i+n] = temp;
|
||||
}
|
||||
|
||||
- selscroll(orig, -n);
|
||||
+ if (term.scr == 0)
|
||||
+ selscroll(orig, -n);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -1135,7 +1197,7 @@ tnewline(int first_col)
|
||||
@@ -1135,7 +1195,7 @@ tnewline(int first_col)
|
||||
int y = term.c.y;
|
||||
|
||||
if (y == term.bot) {
|
||||
@ -242,7 +226,7 @@ index 0ce6ac2..641edc0 100644
|
||||
} else {
|
||||
y++;
|
||||
}
|
||||
@@ -1300,14 +1362,14 @@ void
|
||||
@@ -1300,14 +1360,14 @@ void
|
||||
tinsertblankline(int n)
|
||||
{
|
||||
if (BETWEEN(term.c.y, term.top, term.bot))
|
||||
@ -259,7 +243,7 @@ index 0ce6ac2..641edc0 100644
|
||||
}
|
||||
|
||||
int32_t
|
||||
@@ -1738,11 +1800,11 @@ csihandle(void)
|
||||
@@ -1737,11 +1797,11 @@ csihandle(void)
|
||||
break;
|
||||
case 'S': /* SU -- Scroll <n> line up */
|
||||
DEFAULT(csiescseq.arg[0], 1);
|
||||
@ -273,7 +257,7 @@ index 0ce6ac2..641edc0 100644
|
||||
break;
|
||||
case 'L': /* IL -- Insert <n> blank lines */
|
||||
DEFAULT(csiescseq.arg[0], 1);
|
||||
@@ -2248,7 +2310,7 @@ eschandle(uchar ascii)
|
||||
@@ -2243,7 +2303,7 @@ eschandle(uchar ascii)
|
||||
return 0;
|
||||
case 'D': /* IND -- Linefeed */
|
||||
if (term.c.y == term.bot) {
|
||||
@ -282,7 +266,7 @@ index 0ce6ac2..641edc0 100644
|
||||
} else {
|
||||
tmoveto(term.c.x, term.c.y+1);
|
||||
}
|
||||
@@ -2261,7 +2323,7 @@ eschandle(uchar ascii)
|
||||
@@ -2256,7 +2316,7 @@ eschandle(uchar ascii)
|
||||
break;
|
||||
case 'M': /* RI -- Reverse index */
|
||||
if (term.c.y == term.top) {
|
||||
@ -291,7 +275,7 @@ index 0ce6ac2..641edc0 100644
|
||||
} else {
|
||||
tmoveto(term.c.x, term.c.y-1);
|
||||
}
|
||||
@@ -2482,7 +2544,7 @@ twrite(const char *buf, int buflen, int show_ctrl)
|
||||
@@ -2475,7 +2535,7 @@ twrite(const char *buf, int buflen, int show_ctrl)
|
||||
void
|
||||
tresize(int col, int row)
|
||||
{
|
||||
@ -300,7 +284,7 @@ index 0ce6ac2..641edc0 100644
|
||||
int minrow = MIN(row, term.row);
|
||||
int mincol = MIN(col, term.col);
|
||||
int *bp;
|
||||
@@ -2519,6 +2581,14 @@ tresize(int col, int row)
|
||||
@@ -2512,6 +2572,14 @@ tresize(int col, int row)
|
||||
term.dirty = xrealloc(term.dirty, row * sizeof(*term.dirty));
|
||||
term.tabs = xrealloc(term.tabs, col * sizeof(*term.tabs));
|
||||
|
||||
@ -315,7 +299,7 @@ index 0ce6ac2..641edc0 100644
|
||||
/* resize each row to new width, zero-pad if needed */
|
||||
for (i = 0; i < minrow; i++) {
|
||||
term.line[i] = xrealloc(term.line[i], col * sizeof(Glyph));
|
||||
@@ -2577,7 +2647,7 @@ drawregion(int x1, int y1, int x2, int y2)
|
||||
@@ -2569,7 +2637,7 @@ drawregion(int x1, int y1, int x2, int y2)
|
||||
continue;
|
||||
|
||||
term.dirty[y] = 0;
|
||||
@ -324,7 +308,7 @@ index 0ce6ac2..641edc0 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2598,8 +2668,9 @@ draw(void)
|
||||
@@ -2590,8 +2658,9 @@ draw(void)
|
||||
cx--;
|
||||
|
||||
drawregion(0, 0, term.col, term.row);
|
||||
@ -333,14 +317,14 @@ index 0ce6ac2..641edc0 100644
|
||||
+ if (term.scr == 0)
|
||||
+ xdrawcursor(cx, term.c.y, term.line[term.c.y][cx],
|
||||
+ term.ocx, term.ocy, term.line[term.ocy][term.ocx]);
|
||||
term.ocx = cx;
|
||||
term.ocy = term.c.y;
|
||||
term.ocx = cx, term.ocy = term.c.y;
|
||||
xfinishdraw();
|
||||
}
|
||||
diff --git a/st.h b/st.h
|
||||
index d978458..b9a4eeb 100644
|
||||
index 38c61c4..17a79e0 100644
|
||||
--- a/st.h
|
||||
+++ b/st.h
|
||||
@@ -81,6 +81,8 @@ void die(const char *, ...);
|
||||
@@ -80,6 +80,8 @@ void die(const char *, ...);
|
||||
void redraw(void);
|
||||
void draw(void);
|
||||
|
71
st-scrollback-mouse-0.8.diff
Normal file
71
st-scrollback-mouse-0.8.diff
Normal file
@ -0,0 +1,71 @@
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index 27d42ca..feec7e2 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -156,8 +156,14 @@ static unsigned int defaultattr = 11;
|
||||
*/
|
||||
static MouseShortcut mshortcuts[] = {
|
||||
/* button mask string */
|
||||
- { Button4, XK_ANY_MOD, "\031" },
|
||||
- { Button5, XK_ANY_MOD, "\005" },
|
||||
+ { Button4, XK_NO_MOD, "\031" },
|
||||
+ { Button5, XK_NO_MOD, "\005" },
|
||||
+};
|
||||
+
|
||||
+MouseKey mkeys[] = {
|
||||
+ /* button mask function argument */
|
||||
+ { Button4, ShiftMask, kscrollup, {.i = 1} },
|
||||
+ { Button5, ShiftMask, kscrolldown, {.i = 1} },
|
||||
};
|
||||
|
||||
/* Internal keyboard shortcuts. */
|
||||
diff --git a/st.h b/st.h
|
||||
index 628e876..cdd25ae 100644
|
||||
--- a/st.h
|
||||
+++ b/st.h
|
||||
@@ -81,6 +81,13 @@ typedef union {
|
||||
const void *v;
|
||||
} Arg;
|
||||
|
||||
+typedef struct {
|
||||
+ uint b;
|
||||
+ uint mask;
|
||||
+ void (*func)(const Arg *);
|
||||
+ const Arg arg;
|
||||
+} MouseKey;
|
||||
+
|
||||
void die(const char *, ...);
|
||||
void redraw(void);
|
||||
void draw(void);
|
||||
@@ -129,3 +136,4 @@ extern char *termname;
|
||||
extern unsigned int tabspaces;
|
||||
extern unsigned int defaultfg;
|
||||
extern unsigned int defaultbg;
|
||||
+extern MouseKey mkeys[];
|
||||
diff --git a/x.c b/x.c
|
||||
index d43a529..754d859 100644
|
||||
--- a/x.c
|
||||
+++ b/x.c
|
||||
@@ -409,6 +409,7 @@ bpress(XEvent *e)
|
||||
{
|
||||
struct timespec now;
|
||||
MouseShortcut *ms;
|
||||
+ MouseKey *mk;
|
||||
int snap;
|
||||
|
||||
if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forceselmod)) {
|
||||
@@ -424,6 +425,14 @@ bpress(XEvent *e)
|
||||
}
|
||||
}
|
||||
|
||||
+ for (mk = mkeys; mk < mkeys + LEN(mkeys); mk++) {
|
||||
+ if (e->xbutton.button == mk->b
|
||||
+ && match(mk->mask, e->xbutton.state)) {
|
||||
+ mk->func(&mk->arg);
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (e->xbutton.button == Button1) {
|
||||
/*
|
||||
* If the user clicks below predefined timeouts specific
|
@ -1,13 +0,0 @@
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index ec1b576..4b3bf15 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -163,6 +163,8 @@ static uint forcemousemod = ShiftMask;
|
||||
*/
|
||||
static MouseShortcut mshortcuts[] = {
|
||||
/* mask button function argument release */
|
||||
+ { ShiftMask, Button4, kscrollup, {.i = 1} },
|
||||
+ { ShiftMask, Button5, kscrolldown, {.i = 1} },
|
||||
{ XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 },
|
||||
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
|
||||
{ XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
|
@ -1,63 +0,0 @@
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index 4b3bf15..1986316 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -163,8 +163,8 @@ static uint forcemousemod = ShiftMask;
|
||||
*/
|
||||
static MouseShortcut mshortcuts[] = {
|
||||
/* mask button function argument release */
|
||||
- { ShiftMask, Button4, kscrollup, {.i = 1} },
|
||||
- { ShiftMask, Button5, kscrolldown, {.i = 1} },
|
||||
+ { XK_ANY_MOD, Button4, kscrollup, {.i = 1}, 0, /* !alt */ -1 },
|
||||
+ { XK_ANY_MOD, Button5, kscrolldown, {.i = 1}, 0, /* !alt */ -1 },
|
||||
{ XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 },
|
||||
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} },
|
||||
{ XK_ANY_MOD, Button5, ttysend, {.s = "\005"} },
|
||||
diff --git a/st.c b/st.c
|
||||
index f8b6f67..dd4cb31 100644
|
||||
--- st.c
|
||||
+++ st.c
|
||||
@@ -1045,6 +1045,11 @@ tnew(int col, int row)
|
||||
treset();
|
||||
}
|
||||
|
||||
+int tisaltscr(void)
|
||||
+{
|
||||
+ return IS_SET(MODE_ALTSCREEN);
|
||||
+}
|
||||
+
|
||||
void
|
||||
tswapscreen(void)
|
||||
{
|
||||
diff --git a/st.h b/st.h
|
||||
index 1332cf1..f9ad815 100644
|
||||
--- st.h
|
||||
+++ st.h
|
||||
@@ -89,6 +89,7 @@ void sendbreak(const Arg *);
|
||||
void toggleprinter(const Arg *);
|
||||
|
||||
int tattrset(int);
|
||||
+int tisaltscr(void);
|
||||
void tnew(int, int);
|
||||
void tresize(int, int);
|
||||
void tsetdirtattr(int);
|
||||
diff --git a/x.c b/x.c
|
||||
index e5f1737..b8fbd7b 100644
|
||||
--- x.c
|
||||
+++ x.c
|
||||
@@ -34,6 +34,7 @@ typedef struct {
|
||||
void (*func)(const Arg *);
|
||||
const Arg arg;
|
||||
uint release;
|
||||
+ int altscrn; /* 0: don't care, -1: not alt screen, 1: alt screen */
|
||||
} MouseShortcut;
|
||||
|
||||
typedef struct {
|
||||
@@ -446,6 +447,7 @@ mouseaction(XEvent *e, uint release)
|
||||
for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) {
|
||||
if (ms->release == release &&
|
||||
ms->button == e->xbutton.button &&
|
||||
+ (!ms->altscrn || (ms->altscrn == (tisaltscr() ? 1 : -1))) &&
|
||||
(match(ms->mod, state) || /* exact or forced */
|
||||
match(ms->mod, state & ~forcemousemod))) {
|
||||
ms->func(&(ms->arg));
|
Loading…
Reference in New Issue
Block a user