working
This commit is contained in:
parent
73f6a950ad
commit
dd0b463434
44
config.h
44
config.h
|
@ -1,14 +1,12 @@
|
||||||
/* See LICENSE file for copyright and license details. */
|
/* See LICENSE file for copyright and license details. */
|
||||||
|
|
||||||
void clearhistory(const Arg *arg);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* appearance
|
* appearance
|
||||||
*
|
*
|
||||||
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
|
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
|
||||||
*/
|
*/
|
||||||
static char *font = "DejaVu Sans Mono:pixelsize=16:antialias=true:autohint=true";
|
static char *font = "Mononoki Nerd Font:pixelsize=20:antialias=true:autohint=true";
|
||||||
static int borderpx = 2;
|
static int borderpx = 16;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* What program is execed by st depends of these precedence rules:
|
* What program is execed by st depends of these precedence rules:
|
||||||
|
@ -100,30 +98,30 @@ static const int alpha = 0xff;
|
||||||
/* Terminal colors (16 first used in escape sequence) */
|
/* Terminal colors (16 first used in escape sequence) */
|
||||||
static const char *colorname[] = {
|
static const char *colorname[] = {
|
||||||
/* 8 normal colors */
|
/* 8 normal colors */
|
||||||
"#3B4252", /* nord1 */
|
"#222222",
|
||||||
"#BF616A", /* nord11 */
|
"#FF5555",
|
||||||
"#A3BE8C", /* nord14 */
|
"#5FD38D",
|
||||||
"#EBCB8B", /* nord13 */
|
"#FF9955",
|
||||||
"#81A1C1", /* nord9 */
|
"#3771C8",
|
||||||
"#B48EAD", /* nord15 */
|
"#BC5FD3",
|
||||||
"#88C0D0", /* nord8 */
|
"#5FD3BC",
|
||||||
"#E5E9F0", /* nord5 */
|
"#999999",
|
||||||
|
|
||||||
/* 8 bright colors */
|
/* 8 bright colors */
|
||||||
"#4C566A", /* nord3 */
|
"#666666",
|
||||||
"#D08770", /* nord12 */
|
"#FF8080",
|
||||||
"#8FBCBB", /* nord7 */
|
"#87DEAA",
|
||||||
"#EBCB8B", /* nord13 */
|
"#FFB380",
|
||||||
"#5E81AC", /* nord10 */
|
"#5F8DD3",
|
||||||
"#B48EAD", /* nord15 (same as normal magenta) */
|
"#CD87DE",
|
||||||
"#88C0D0", /* nord8 (same as normal cyan) */
|
"#87DECD",
|
||||||
"#ECEFF4", /* nord6 */
|
"#CCCCCC",
|
||||||
|
|
||||||
[255] = 0,
|
[255] = 0,
|
||||||
|
|
||||||
/* more colors can be added after 255 to use with DefaultXX */
|
/* more colors can be added after 255 to use with DefaultXX */
|
||||||
"#D8DEE9", /* nord4 (default foreground colour) */
|
"#CCCCCC", /* nord4 (default foreground colour) */
|
||||||
"#2E3440", /* nord0 (default background colour) */
|
"#222222", /* nord0 (default background colour) */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -201,9 +199,7 @@ static Shortcut shortcuts[] = {
|
||||||
{ TERMMOD, XK_C, clipcopy, {.i = 0} },
|
{ TERMMOD, XK_C, clipcopy, {.i = 0} },
|
||||||
{ TERMMOD, XK_V, clippaste, {.i = 0} },
|
{ TERMMOD, XK_V, clippaste, {.i = 0} },
|
||||||
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
|
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
|
||||||
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
|
|
||||||
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
|
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
|
||||||
{ ControlMask, XK_L, clearhistory, {.i = 0} },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
19
st.c
19
st.c
|
@ -225,8 +225,6 @@ static char base64dec_getc(const char **);
|
||||||
|
|
||||||
static ssize_t xwrite(int, const char *, size_t);
|
static ssize_t xwrite(int, const char *, size_t);
|
||||||
|
|
||||||
void clearhistory(const Arg *arg);
|
|
||||||
|
|
||||||
/* Globals */
|
/* Globals */
|
||||||
static Term term;
|
static Term term;
|
||||||
static Selection sel;
|
static Selection sel;
|
||||||
|
@ -241,23 +239,6 @@ static const uchar utfmask[UTF_SIZ + 1] = {0xC0, 0x80, 0xE0, 0xF0, 0xF8};
|
||||||
static const Rune utfmin[UTF_SIZ + 1] = { 0, 0, 0x80, 0x800, 0x10000};
|
static const Rune utfmin[UTF_SIZ + 1] = { 0, 0, 0x80, 0x800, 0x10000};
|
||||||
static const Rune utfmax[UTF_SIZ + 1] = {0x10FFFF, 0x7F, 0x7FF, 0xFFFF, 0x10FFFF};
|
static const Rune utfmax[UTF_SIZ + 1] = {0x10FFFF, 0x7F, 0x7FF, 0xFFFF, 0x10FFFF};
|
||||||
|
|
||||||
void
|
|
||||||
clearhistory(const Arg *arg) {
|
|
||||||
// Clear the visible screen
|
|
||||||
tclearregion(0, 0, term.col-1, term.row-1);
|
|
||||||
tsetdirt(0, term.row);
|
|
||||||
|
|
||||||
// Clear the scrollback buffer
|
|
||||||
term.scr = 0;
|
|
||||||
term.histi = 0;
|
|
||||||
for (int i = 0; i < HISTSIZE; i++) {
|
|
||||||
memset(term.hist[i], 0, term.col * sizeof(Line));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Redraw to apply changes
|
|
||||||
tfulldirt();
|
|
||||||
}
|
|
||||||
|
|
||||||
ssize_t
|
ssize_t
|
||||||
xwrite(int fd, const char *s, size_t len)
|
xwrite(int fd, const char *s, size_t len)
|
||||||
{
|
{
|
||||||
|
|
1
x.c
1
x.c
|
@ -273,6 +273,7 @@ void
|
||||||
clippaste(const Arg *dummy)
|
clippaste(const Arg *dummy)
|
||||||
{
|
{
|
||||||
Atom clipboard;
|
Atom clipboard;
|
||||||
|
printf("test");
|
||||||
|
|
||||||
clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0);
|
clipboard = XInternAtom(xw.dpy, "CLIPBOARD", 0);
|
||||||
XConvertSelection(xw.dpy, clipboard, xsel.xtarget, clipboard,
|
XConvertSelection(xw.dpy, clipboard, xsel.xtarget, clipboard,
|
||||||
|
|
Loading…
Reference in a new issue