mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Merge pull request #4799 from mglae/le10_sys_tools_st
System Tools: add st terminal emulator on Generic (rev 116)
This commit is contained in:
commit
4e458a0f72
@ -3,8 +3,8 @@
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="mc"
|
||||
PKG_VERSION="4.8.21"
|
||||
PKG_SHA256="8f37e546ac7c31c9c203a03b1c1d6cb2d2f623a300b86badfd367e5559fe148c"
|
||||
PKG_VERSION="4.8.25"
|
||||
PKG_SHA256="ffc19617f20ebb23330acd3998b7fd559a042d172fa55746d53d246697b2548a"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://www.midnight-commander.org"
|
||||
PKG_URL="http://ftp.midnight-commander.org/mc-${PKG_VERSION}.tar.xz"
|
||||
|
@ -0,0 +1,20 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="st"
|
||||
PKG_VERSION="0.8.4"
|
||||
PKG_SHA256="d42d3ceceb4d6a65e32e90a5336e3d446db612c3fbd9ebc1780bc6c9a03346a6"
|
||||
PKG_ARCH="x86_64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://st.suckless.org/"
|
||||
PKG_URL="https://dl.suckless.org/st/st-${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain libX11 libXft libXrender fontconfig freetype ncurses"
|
||||
PKG_LONGDESC="A simple terminal implementation for X"
|
||||
PKG_BUILD_FLAGS="-sysroot"
|
||||
|
||||
PKG_MAKE_OPTS_TARGET="X11INC=$(get_build_dir libXft)/include \
|
||||
X11LIB=$(get_build_dir libXft)/.$TARGET_NAME/src/.libs"
|
||||
|
||||
pre_configure_target() {
|
||||
LDFLAGS="-lXrender $LDFLAGS"
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
|
||||
- XftColorAllocName() is failing on "#rrggbb", use XParseColor()
|
||||
- Xutf8TextListToTextProperty() needs locale to be set.
|
||||
|
||||
--- a/x.c 2020-06-19 11:29:45.000000000 +0200
|
||||
+++ b/x.c 2020-06-26 01:07:13.000000000 +0200
|
||||
@@ -752,6 +752,7 @@
|
||||
xloadcolor(int i, const char *name, Color *ncolor)
|
||||
{
|
||||
XRenderColor color = { .alpha = 0xffff };
|
||||
+ XColor xcol;
|
||||
|
||||
if (!name) {
|
||||
if (BETWEEN(i, 16, 255)) { /* 256 color */
|
||||
@@ -769,6 +770,14 @@
|
||||
name = colorname[i];
|
||||
}
|
||||
|
||||
+ if (XParseColor(xw.dpy, xw.cmap, name, &xcol)) {
|
||||
+ color.green = xcol.green;
|
||||
+ color.blue = xcol.blue;
|
||||
+ color.red = xcol.red;
|
||||
+ return XftColorAllocValue(xw.dpy, xw.vis,
|
||||
+ xw.cmap, &color, ncolor);
|
||||
+ }
|
||||
+
|
||||
return XftColorAllocName(xw.dpy, xw.vis, xw.cmap, name, ncolor);
|
||||
}
|
||||
|
||||
@@ -1585,8 +1594,10 @@
|
||||
XTextProperty prop;
|
||||
DEFAULT(p, opt_title);
|
||||
|
||||
- Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle,
|
||||
- &prop);
|
||||
+ if (Xutf8TextListToTextProperty(xw.dpy, &p, 1, XUTF8StringStyle,
|
||||
+ &prop) < 0)
|
||||
+ return;
|
||||
+
|
||||
XSetWMName(xw.dpy, xw.win, &prop);
|
||||
XSetTextProperty(xw.dpy, xw.win, &prop, xw.netwmname);
|
||||
XFree(prop.value);
|
@ -0,0 +1,351 @@
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index 0895a1f..eef24df 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -188,6 +188,8 @@ static Shortcut shortcuts[] = {
|
||||
{ TERMMOD, XK_Y, selpaste, {.i = 0} },
|
||||
{ ShiftMask, XK_Insert, selpaste, {.i = 0} },
|
||||
{ TERMMOD, XK_Num_Lock, numlock, {.i = 0} },
|
||||
+ { ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },
|
||||
+ { ShiftMask, XK_Page_Down, kscrolldown, {.i = -1} },
|
||||
};
|
||||
|
||||
/*
|
||||
diff --git a/st.c b/st.c
|
||||
index 0ce6ac2..641edc0 100644
|
||||
--- a/st.c
|
||||
+++ b/st.c
|
||||
@@ -35,6 +35,7 @@
|
||||
#define ESC_ARG_SIZ 16
|
||||
#define STR_BUF_SIZ ESC_BUF_SIZ
|
||||
#define STR_ARG_SIZ ESC_ARG_SIZ
|
||||
+#define HISTSIZE 2000
|
||||
|
||||
/* macros */
|
||||
#define IS_SET(flag) ((term.mode & (flag)) != 0)
|
||||
@@ -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 TLINE(y) ((y) < term.scr ? term.hist[((y) + term.histi - \
|
||||
+ term.scr + HISTSIZE + 1) % HISTSIZE] : \
|
||||
+ term.line[(y) - term.scr])
|
||||
|
||||
enum term_mode {
|
||||
MODE_WRAP = 1 << 0,
|
||||
@@ -117,6 +121,9 @@ typedef struct {
|
||||
int col; /* nb col */
|
||||
Line *line; /* screen */
|
||||
Line *alt; /* alternate screen */
|
||||
+ Line hist[HISTSIZE]; /* history buffer */
|
||||
+ int histi; /* history index */
|
||||
+ int scr; /* scroll back */
|
||||
int *dirty; /* dirtyness of lines */
|
||||
TCursor c; /* cursor */
|
||||
int ocx; /* old cursor col */
|
||||
@@ -185,8 +192,8 @@ static void tnewline(int);
|
||||
static void tputtab(int);
|
||||
static void tputc(Rune);
|
||||
static void treset(void);
|
||||
-static void tscrollup(int, int);
|
||||
-static void tscrolldown(int, int);
|
||||
+static void tscrollup(int, int, int);
|
||||
+static void tscrolldown(int, int, int);
|
||||
static void tsetattr(int *, int);
|
||||
static void tsetchar(Rune, Glyph *, int, int);
|
||||
static void tsetdirt(int, int);
|
||||
@@ -415,10 +422,10 @@ tlinelen(int y)
|
||||
{
|
||||
int i = term.col;
|
||||
|
||||
- if (term.line[y][i - 1].mode & ATTR_WRAP)
|
||||
+ if (TLINE(y)[i - 1].mode & ATTR_WRAP)
|
||||
return i;
|
||||
|
||||
- while (i > 0 && term.line[y][i - 1].u == ' ')
|
||||
+ while (i > 0 && TLINE(y)[i - 1].u == ' ')
|
||||
--i;
|
||||
|
||||
return i;
|
||||
@@ -527,7 +534,7 @@ selsnap(int *x, int *y, int direction)
|
||||
* Snap around if the word wraps around at the end or
|
||||
* beginning of a line.
|
||||
*/
|
||||
- prevgp = &term.line[*y][*x];
|
||||
+ prevgp = &TLINE(*y)[*x];
|
||||
prevdelim = ISDELIM(prevgp->u);
|
||||
for (;;) {
|
||||
newx = *x + direction;
|
||||
@@ -542,14 +549,14 @@ selsnap(int *x, int *y, int direction)
|
||||
yt = *y, xt = *x;
|
||||
else
|
||||
yt = newy, xt = newx;
|
||||
- if (!(term.line[yt][xt].mode & ATTR_WRAP))
|
||||
+ if (!(TLINE(yt)[xt].mode & ATTR_WRAP))
|
||||
break;
|
||||
}
|
||||
|
||||
if (newx >= tlinelen(newy))
|
||||
break;
|
||||
|
||||
- gp = &term.line[newy][newx];
|
||||
+ gp = &TLINE(newy)[newx];
|
||||
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)
|
||||
*x = (direction < 0) ? 0 : term.col - 1;
|
||||
if (direction < 0) {
|
||||
for (; *y > 0; *y += direction) {
|
||||
- if (!(term.line[*y-1][term.col-1].mode
|
||||
+ if (!(TLINE(*y-1)[term.col-1].mode
|
||||
& ATTR_WRAP)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if (direction > 0) {
|
||||
for (; *y < term.row-1; *y += direction) {
|
||||
- if (!(term.line[*y][term.col-1].mode
|
||||
+ if (!(TLINE(*y)[term.col-1].mode
|
||||
& ATTR_WRAP)) {
|
||||
break;
|
||||
}
|
||||
@@ -608,13 +615,13 @@ getsel(void)
|
||||
}
|
||||
|
||||
if (sel.type == SEL_RECTANGULAR) {
|
||||
- gp = &term.line[y][sel.nb.x];
|
||||
+ gp = &TLINE(y)[sel.nb.x];
|
||||
lastx = sel.ne.x;
|
||||
} else {
|
||||
- gp = &term.line[y][sel.nb.y == y ? sel.nb.x : 0];
|
||||
+ gp = &TLINE(y)[sel.nb.y == y ? sel.nb.x : 0];
|
||||
lastx = (sel.ne.y == y) ? sel.ne.x : term.col-1;
|
||||
}
|
||||
- last = &term.line[y][MIN(lastx, linelen-1)];
|
||||
+ last = &TLINE(y)[MIN(lastx, linelen-1)];
|
||||
while (last >= gp && last->u == ' ')
|
||||
--last;
|
||||
|
||||
@@ -849,6 +856,9 @@ void
|
||||
ttywrite(const char *s, size_t n, int may_echo)
|
||||
{
|
||||
const char *next;
|
||||
+ Arg arg = (Arg) { .i = term.scr };
|
||||
+
|
||||
+ kscrolldown(&arg);
|
||||
|
||||
if (may_echo && IS_SET(MODE_ECHO))
|
||||
twrite(s, n, 1);
|
||||
@@ -1060,13 +1070,53 @@ tswapscreen(void)
|
||||
}
|
||||
|
||||
void
|
||||
-tscrolldown(int orig, int n)
|
||||
+kscrolldown(const Arg* a)
|
||||
+{
|
||||
+ int n = a->i;
|
||||
+
|
||||
+ if (n < 0)
|
||||
+ n = term.row + n;
|
||||
+
|
||||
+ if (n > term.scr)
|
||||
+ n = term.scr;
|
||||
+
|
||||
+ if (term.scr > 0) {
|
||||
+ term.scr -= n;
|
||||
+ selscroll(0, -n);
|
||||
+ tfulldirt();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+kscrollup(const Arg* a)
|
||||
+{
|
||||
+ int n = a->i;
|
||||
+
|
||||
+ if (n < 0)
|
||||
+ n = term.row + n;
|
||||
+
|
||||
+ if (term.scr <= HISTSIZE-n) {
|
||||
+ term.scr += n;
|
||||
+ selscroll(0, n);
|
||||
+ tfulldirt();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+tscrolldown(int orig, int n, int copyhist)
|
||||
{
|
||||
int i;
|
||||
Line temp;
|
||||
|
||||
LIMIT(n, 0, term.bot-orig+1);
|
||||
|
||||
+ if (copyhist) {
|
||||
+ term.histi = (term.histi - 1 + HISTSIZE) % HISTSIZE;
|
||||
+ temp = term.hist[term.histi];
|
||||
+ term.hist[term.histi] = term.line[term.bot];
|
||||
+ term.line[term.bot] = temp;
|
||||
+ }
|
||||
+
|
||||
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);
|
||||
}
|
||||
|
||||
void
|
||||
-tscrollup(int orig, int n)
|
||||
+tscrollup(int orig, int n, int copyhist)
|
||||
{
|
||||
int i;
|
||||
Line temp;
|
||||
|
||||
LIMIT(n, 0, term.bot-orig+1);
|
||||
|
||||
+ if (copyhist) {
|
||||
+ term.histi = (term.histi + 1) % HISTSIZE;
|
||||
+ temp = term.hist[term.histi];
|
||||
+ term.hist[term.histi] = term.line[orig];
|
||||
+ term.line[orig] = temp;
|
||||
+ }
|
||||
+
|
||||
+ if (term.scr > 0 && term.scr < HISTSIZE)
|
||||
+ term.scr = MIN(term.scr + n, HISTSIZE-1);
|
||||
+
|
||||
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)
|
||||
int y = term.c.y;
|
||||
|
||||
if (y == term.bot) {
|
||||
- tscrollup(term.top, 1);
|
||||
+ tscrollup(term.top, 1, 1);
|
||||
} else {
|
||||
y++;
|
||||
}
|
||||
@@ -1300,14 +1362,14 @@ void
|
||||
tinsertblankline(int n)
|
||||
{
|
||||
if (BETWEEN(term.c.y, term.top, term.bot))
|
||||
- tscrolldown(term.c.y, n);
|
||||
+ tscrolldown(term.c.y, n, 0);
|
||||
}
|
||||
|
||||
void
|
||||
tdeleteline(int n)
|
||||
{
|
||||
if (BETWEEN(term.c.y, term.top, term.bot))
|
||||
- tscrollup(term.c.y, n);
|
||||
+ tscrollup(term.c.y, n, 0);
|
||||
}
|
||||
|
||||
int32_t
|
||||
@@ -1738,11 +1800,11 @@ csihandle(void)
|
||||
break;
|
||||
case 'S': /* SU -- Scroll <n> line up */
|
||||
DEFAULT(csiescseq.arg[0], 1);
|
||||
- tscrollup(term.top, csiescseq.arg[0]);
|
||||
+ tscrollup(term.top, csiescseq.arg[0], 0);
|
||||
break;
|
||||
case 'T': /* SD -- Scroll <n> line down */
|
||||
DEFAULT(csiescseq.arg[0], 1);
|
||||
- tscrolldown(term.top, csiescseq.arg[0]);
|
||||
+ tscrolldown(term.top, csiescseq.arg[0], 0);
|
||||
break;
|
||||
case 'L': /* IL -- Insert <n> blank lines */
|
||||
DEFAULT(csiescseq.arg[0], 1);
|
||||
@@ -2248,7 +2310,7 @@ eschandle(uchar ascii)
|
||||
return 0;
|
||||
case 'D': /* IND -- Linefeed */
|
||||
if (term.c.y == term.bot) {
|
||||
- tscrollup(term.top, 1);
|
||||
+ tscrollup(term.top, 1, 1);
|
||||
} else {
|
||||
tmoveto(term.c.x, term.c.y+1);
|
||||
}
|
||||
@@ -2261,7 +2323,7 @@ eschandle(uchar ascii)
|
||||
break;
|
||||
case 'M': /* RI -- Reverse index */
|
||||
if (term.c.y == term.top) {
|
||||
- tscrolldown(term.top, 1);
|
||||
+ tscrolldown(term.top, 1, 1);
|
||||
} else {
|
||||
tmoveto(term.c.x, term.c.y-1);
|
||||
}
|
||||
@@ -2482,7 +2544,7 @@ twrite(const char *buf, int buflen, int show_ctrl)
|
||||
void
|
||||
tresize(int col, int row)
|
||||
{
|
||||
- int i;
|
||||
+ int i, j;
|
||||
int minrow = MIN(row, term.row);
|
||||
int mincol = MIN(col, term.col);
|
||||
int *bp;
|
||||
@@ -2519,6 +2581,14 @@ tresize(int col, int row)
|
||||
term.dirty = xrealloc(term.dirty, row * sizeof(*term.dirty));
|
||||
term.tabs = xrealloc(term.tabs, col * sizeof(*term.tabs));
|
||||
|
||||
+ for (i = 0; i < HISTSIZE; i++) {
|
||||
+ term.hist[i] = xrealloc(term.hist[i], col * sizeof(Glyph));
|
||||
+ for (j = mincol; j < col; j++) {
|
||||
+ term.hist[i][j] = term.c.attr;
|
||||
+ term.hist[i][j].u = ' ';
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* 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)
|
||||
continue;
|
||||
|
||||
term.dirty[y] = 0;
|
||||
- xdrawline(term.line[y], x1, y, x2);
|
||||
+ xdrawline(TLINE(y), x1, y, x2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2598,8 +2668,9 @@ draw(void)
|
||||
cx--;
|
||||
|
||||
drawregion(0, 0, term.col, term.row);
|
||||
- xdrawcursor(cx, term.c.y, term.line[term.c.y][cx],
|
||||
- term.ocx, term.ocy, term.line[term.ocy][term.ocx]);
|
||||
+ 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;
|
||||
xfinishdraw();
|
||||
diff --git a/st.h b/st.h
|
||||
index d978458..b9a4eeb 100644
|
||||
--- a/st.h
|
||||
+++ b/st.h
|
||||
@@ -81,6 +81,8 @@ void die(const char *, ...);
|
||||
void redraw(void);
|
||||
void draw(void);
|
||||
|
||||
+void kscrolldown(const Arg *);
|
||||
+void kscrollup(const Arg *);
|
||||
void printscreen(const Arg *);
|
||||
void printsel(const Arg *);
|
||||
void sendbreak(const Arg *);
|
@ -2,8 +2,8 @@
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="unrar"
|
||||
PKG_VERSION="5.9.3"
|
||||
PKG_SHA256="28c176c29da86d7efe3cb9a227255d8340f761ba95969195982ec87c8eb2dd69"
|
||||
PKG_VERSION="6.0.3"
|
||||
PKG_SHA256="1def53392d879f9e304aa6eac1339cf41f9bce1111a2f5845071665738c4aca0"
|
||||
PKG_LICENSE="free"
|
||||
PKG_SITE="https://www.rarlab.com/rar_add.htm"
|
||||
PKG_URL="http://www.rarlab.com/rar/unrarsrc-${PKG_VERSION}.tar.gz"
|
||||
|
@ -1,25 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="ytop"
|
||||
PKG_VERSION="0.6.2"
|
||||
PKG_SHA256="d9fd6ce00e27de894bc0790947fbeab40e81e34afa5ead5a53d126c458d50e99"
|
||||
PKG_LICENSE="MIT"
|
||||
PKG_SITE="https://github.com/cjbassi/ytop"
|
||||
PKG_URL="https://github.com/cjbassi/ytop/archive/$PKG_VERSION.tar.gz"
|
||||
PKG_DEPENDS_TARGET="toolchain rust"
|
||||
PKG_LONGDESC="A TUI system monitor written in Rust."
|
||||
PKG_TOOLCHAIN="manual"
|
||||
|
||||
make_target() {
|
||||
. "$(get_build_dir rust)/cargo/env"
|
||||
cargo build \
|
||||
--release \
|
||||
--locked \
|
||||
--all-features
|
||||
}
|
||||
|
||||
makeinstall_target() {
|
||||
mkdir -p $INSTALL
|
||||
cp $PKG_BUILD/.$TARGET_NAME/*/release/ytop $INSTALL
|
||||
}
|
@ -1,3 +1,9 @@
|
||||
116
|
||||
- added st (Generic only)
|
||||
- updated unrar to 6.0.3
|
||||
- updated mc to 4.8.25
|
||||
- removed ytop
|
||||
|
||||
115
|
||||
- updated strace to 5.9
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
PKG_NAME="system-tools"
|
||||
PKG_VERSION="1.0"
|
||||
PKG_REV="115"
|
||||
PKG_REV="116"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="https://libreelec.tv"
|
||||
@ -11,7 +11,7 @@ PKG_URL=""
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_SECTION="virtual"
|
||||
PKG_SHORTDESC="A bundle of system tools and programs"
|
||||
PKG_LONGDESC="This bundle currently includes autossh, diffutils, dstat, dtach, efibootmgr, encfs, evtest, fdupes, file, getscancodes, hddtemp, hd-idle, hid_mapper, htop, i2c-tools, inotify-tools, jq, lm_sensors, lshw, mc, mtpfs, nmon, p7zip, patch, pv, screen, smartmontools, strace, stress-ng, unrar, usb-modeswitch, vim and ytop."
|
||||
PKG_LONGDESC="This bundle currently includes autossh, diffutils, dstat, dtach, efibootmgr, encfs, evtest, fdupes, file, getscancodes, hddtemp, hd-idle, hid_mapper, htop, i2c-tools, inotify-tools, jq, lm_sensors, lshw, mc, mtpfs, nmon, p7zip, patch, pv, screen, smartmontools, strace, stress-ng, unrar, usb-modeswitch and vim."
|
||||
|
||||
PKG_IS_ADDON="yes"
|
||||
PKG_ADDON_NAME="System Tools"
|
||||
@ -48,11 +48,10 @@ PKG_DEPENDS_TARGET="toolchain \
|
||||
stress-ng \
|
||||
unrar \
|
||||
usb-modeswitch \
|
||||
vim \
|
||||
ytop"
|
||||
vim"
|
||||
|
||||
if [ "$TARGET_ARCH" = "x86_64" ]; then
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET efibootmgr"
|
||||
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET efibootmgr st"
|
||||
fi
|
||||
|
||||
addon() {
|
||||
@ -146,6 +145,9 @@ addon() {
|
||||
# smartmontools
|
||||
cp -P $(get_install_dir smartmontools)/usr/sbin/smartctl $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
|
||||
# st
|
||||
cp -P $(get_build_dir st)/st $ADDON_BUILD/$PKG_ADDON_ID/bin 2>/dev/null || :
|
||||
|
||||
# strace
|
||||
cp -P $(get_install_dir strace)/usr/bin/strace $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
|
||||
@ -161,7 +163,4 @@ addon() {
|
||||
# vim
|
||||
cp -P $(get_install_dir vim)/usr/bin/vim $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
cp -Pa $(get_install_dir vim)/storage/.kodi/addons/virtual.system-tools/data/vim/ $ADDON_BUILD/$PKG_ADDON_ID/data
|
||||
|
||||
# ytop
|
||||
cp -P $(get_install_dir ytop)/ytop $ADDON_BUILD/$PKG_ADDON_ID/bin
|
||||
}
|
||||
|
@ -1,10 +1,14 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
import xbmcaddon
|
||||
import xbmcgui
|
||||
import subprocess
|
||||
import os.path
|
||||
|
||||
yes = xbmcgui.Dialog().yesno('', 'This is a console-only addon','','Open a terminal window?','No','Yes')
|
||||
if yes:
|
||||
subprocess.Popen(["systemd-run","sh","-c",". /etc/profile;cd;exec mrxvt -ls"], shell=False, close_fds=True)
|
||||
|
||||
if os.path.exists(os.path.join(xbmcaddon.Addon().getAddonInfo('path'), 'bin/st')):
|
||||
yes = xbmcgui.Dialog().yesno('System Tools', 'This is a console-only addon.[CR][CR]Open a terminal window?',nolabel='No',yeslabel='Yes')
|
||||
if yes:
|
||||
subprocess.Popen(["systemd-run","sh","-c",". /etc/profile;cd;exec st -e sh -l"], shell=False, close_fds=True)
|
||||
else:
|
||||
xbmcgui.Dialog().ok('System Tools', 'This is a console-only addon')
|
||||
|
@ -32,7 +32,7 @@ PKG_CONFIGURE_OPTS_TARGET="--without-ada \
|
||||
--without-dmalloc \
|
||||
--disable-rpath \
|
||||
--disable-database \
|
||||
--with-fallbacks=linux,screen,xterm,xterm-color,dumb \
|
||||
--with-fallbacks=linux,screen,xterm,xterm-color,st-256color \
|
||||
--with-termpath=/storage/.config/termcap \
|
||||
--disable-big-core \
|
||||
--enable-termcap \
|
||||
|
@ -9,7 +9,7 @@ export PS1="\[\e[1;32m\]\h\[\e[1;32m\]:\[\e[1;34m\]\w \[\e[0m\]\\$ "
|
||||
export HISTFILESIZE=200
|
||||
# k0p
|
||||
case "$TERM" in
|
||||
linux|nxterm|screen|xterm|xterm-color)
|
||||
linux|nxterm|screen|xterm|xterm-color|st-256color)
|
||||
;;
|
||||
"")
|
||||
export TERM="linux"
|
||||
|
Loading…
x
Reference in New Issue
Block a user