linux-qubasis

linux oasis port as a qubes template

git clone https://9o.is/git/linux-qubasis.git

commit 586acb660a1f22069ce1a03ca3f97f03ab28af18
parent 0736d09738a08d2c4f233be630309d414fcd0c82
Author: Jul <jul@9o.is>
Date:   Mon, 28 Jul 2025 15:28:09 +0800

add noice

Diffstat:
M.gitmodules | 5+++++
Apkg/noice/build | 17+++++++++++++++++
Apkg/noice/noiceconf.h | 86+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/noice/repo | 1+
4 files changed, 109 insertions(+), 0 deletions(-)

diff --git a/.gitmodules b/.gitmodules @@ -22,3 +22,8 @@ [submodule "ag"] path = pkg/ag/repo url = https://github.com/ggreer/the_silver_searcher.git + ignore = all +[submodule "noice"] + path = pkg/noice/repo + url = git://git.2f30.org/noice + ignore = all diff --git a/pkg/noice/build b/pkg/noice/build @@ -0,0 +1,17 @@ +#!/bin/sh +set -euo pipefail + +repodir="$srcdir/repo" + +rm -rf "$outdir" +cp "$srcdir/noiceconf.h" "$repodir" + +make -C "$repodir" + +if [ "$local_install" == "true" ]; then + sudo make -C "$repodir" PREFIX=/usr install +else + export DESTDIR="$outdir" + make -C "$repodir" PREFIX=/usr install +fi + diff --git a/pkg/noice/noiceconf.h b/pkg/noice/noiceconf.h @@ -0,0 +1,86 @@ +/* See LICENSE file for copyright and license details. */ +#define CWD "" +#define CURSR " > " +#define EMPTY " " + +#define NOPEN "nopen" + +int dirorder = 1; /* Set to 1 to sort by directory first */ +int mtimeorder = 0; /* Set to 1 to sort by time modified */ +int icaseorder = 1; /* Set to 1 to sort by ignoring case */ +int versorder = 0; /* Set to 1 to sort by version number */ +int idletimeout = 0; /* Screensaver timeout in seconds, 0 to disable */ +int showhidden = 1; /* Set to 1 to show hidden files by default */ +int usecolor = 1; /* Set to 1 to enable color attributes */ +char *idlecmd = "rain"; /* The screensaver program */ + +/* See curs_attr(3) for valid video attributes */ +#define CURSR_ATTR A_NORMAL +#define DIR_ATTR A_NORMAL | COLOR_PAIR(4) +#define LINK_ATTR A_NORMAL | COLOR_PAIR(6) +#define SOCK_ATTR A_NORMAL | COLOR_PAIR(1) +#define FIFO_ATTR A_NORMAL | COLOR_PAIR(5) +#define EXEC_ATTR A_NORMAL | COLOR_PAIR(2) + +/* Colors to use with COLOR_PAIR(n) as attributes */ +struct cpair pairs[] = { + { .fg = 0, .bg = 0 }, + /* pairs start at 1 */ + { COLOR_RED, -1 }, + { COLOR_GREEN, -1 }, + { COLOR_YELLOW, -1 }, + { COLOR_BLUE, -1 }, + { COLOR_MAGENTA, -1 }, + { COLOR_CYAN, -1 }, +}; + +struct key bindings[] = { + /* Quit */ + { 'q', SEL_QUIT }, + /* Back */ + { KEY_BACKSPACE, SEL_BACK }, + { KEY_LEFT, SEL_BACK }, + { '-', SEL_BACK }, + /* Inside */ + { KEY_ENTER, SEL_GOIN }, + { KEY_RIGHT, SEL_GOIN }, + { '\r', SEL_GOIN }, + /* Filter */ + { '/', SEL_FLTR }, + /* Next */ + { KEY_DOWN, SEL_NEXT }, + /* Previous */ + { KEY_UP, SEL_PREV }, + /* Page down */ + { KEY_NPAGE, SEL_PGDN }, + { CONTROL('D'), SEL_PGDN }, + /* Page up */ + { KEY_PPAGE, SEL_PGUP }, + { CONTROL('U'), SEL_PGUP }, + /* Home */ + { KEY_HOME, SEL_HOME }, + { 'g', SEL_HOME }, + /* End */ + { KEY_END, SEL_END }, + { 'G', SEL_END }, + /* Change dir */ + { 'c', SEL_CD }, + { '~', SEL_CDHOME }, + /* Toggle hide .dot files */ + { '.', SEL_TOGGLEDOT }, + /* Toggle sort by directory first */ + { 'd', SEL_DSORT }, + /* Toggle sort by time */ + { 't', SEL_MTIME }, + /* Toggle case sensitivity */ + { 'i', SEL_ICASE }, + /* Toggle sort by version number */ + { 'v', SEL_VERS }, + { CONTROL('L'), SEL_REDRAW }, + /* Run command */ + { '!', SEL_RUN, "sh", "SHELL" }, + /* Run command with argument */ + { 'e', SEL_RUNARG, "vi", "EDITOR" }, + { 'p', SEL_RUNARG, "less", "PAGER" }, +}; + diff --git a/pkg/noice/repo b/pkg/noice/repo @@ -0,0 +1 @@ +Subproject commit bfe589ac250853518ac38eabd7618ebbb4236535