summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmut/bin/pnsh-nvim7
-rw-r--r--mut/ghostty/config1
-rw-r--r--mut/nushell/config.nu1
-rw-r--r--mut/vis/themes/base16-twilight.lua63
-rw-r--r--mut/vis/visrc.lua52
5 files changed, 99 insertions, 25 deletions
diff --git a/mut/bin/pnsh-nvim b/mut/bin/pnsh-nvim
index 61bc47c..8a967e9 100755
--- a/mut/bin/pnsh-nvim
+++ b/mut/bin/pnsh-nvim
@@ -7,13 +7,13 @@ if not ($desktop_open_pipe | path exists) {
let args = (
"--init" +
-" --entrypoint=/usr/bin/nu" +
+" --entrypoint=/usr/local/bin/oksh" +
" --env=TERM=xterm-ghostty" +
$" --env=EDITOR=vis" +
$" --volume=($env.TERMINFO)/78/xterm-ghostty:/usr/share/terminfo/x/xterm-ghostty" +
" --env=_ZO_DATA_DIR=/hostfs/.local/share/zoxide" +
" --volume=/etc/profiles/per-user/ivi/etc/profile.d:/etc/profiles/per-user/ivi/etc/profile.d" +
-" --env=SHELL=/usr/bin/nu" +
+" --env=SHELL=/usr/local/bin/oksh" +
" --env=DISPLAY" +
" --env=XDG_RUNTIME_DIR" +
" --volume=/tmp/.X11-unix:/tmp/.X11-unix" +
@@ -33,9 +33,8 @@ $" --volume=($env | default "/var/run" XDG_RUNTIME_DIR | get XDG_RUNTIME_DIR)/do
(
^pnsh
- --pnsh-host-bindfs-disabled
--pnsh-docker-extra-args=$"($args)"
--with-docker
- --docker-image=pionativedev.azurecr.io/pionative/pnsh-vis
+ --docker-image=oksh
--docker-tag=latest
)
diff --git a/mut/ghostty/config b/mut/ghostty/config
index d682f8c..7f3a858 100644
--- a/mut/ghostty/config
+++ b/mut/ghostty/config
@@ -6,6 +6,7 @@ keybind = alt+c=copy_to_clipboard
keybind = alt+v=paste_from_clipboard
keybind = alt+shift+k=increase_font_size:1
keybind = alt+shift+j=decrease_font_size:1
+keybind = super+q=unbind
keybind = ctrl+zero=unbind
keybind = ctrl+enter=unbind
diff --git a/mut/nushell/config.nu b/mut/nushell/config.nu
index c13da9f..ba7cac7 100644
--- a/mut/nushell/config.nu
+++ b/mut/nushell/config.nu
@@ -919,3 +919,4 @@ $env.PISTARCHIO_STACKS_DIR = $pistarchio_dir + "/stacks"
$env.PISTARCHIO_LIBRARY_DIR = $pistarchio_dir + "/library"
$env.PISTARCHIO_VENDOR_DESTINATION_DIR = ($pistarchio_dir + "/../clients") | path expand
# overlay use ~/Programming/Pionative/quickstart/.venv/bin/activate.nu
+. ~/Programming/Pionative/quickstart/.venv/bin/activate
diff --git a/mut/vis/themes/base16-twilight.lua b/mut/vis/themes/base16-twilight.lua
new file mode 100644
index 0000000..62d1ea6
--- /dev/null
+++ b/mut/vis/themes/base16-twilight.lua
@@ -0,0 +1,63 @@
+-- base16-vis (https://github.com/pshevtsov/base16-vis)
+-- by Petr Shevtsov
+-- Twilight scheme by David Hart (https://github.com/hartbit)
+
+local lexers = vis.lexers
+
+local colors = {
+ ['base00'] = '#1e1e1e',
+ ['base01'] = '#323537',
+ ['base02'] = '#464b50',
+ ['base03'] = '#5f5a60',
+ ['base04'] = '#838184',
+ ['base05'] = '#a7a7a7',
+ ['base06'] = '#c3c3c3',
+ ['base07'] = '#ffffff',
+ ['base08'] = '#cf6a4c',
+ ['base09'] = '#cda869',
+ ['base0A'] = '#f9ee98',
+ ['base0B'] = '#8f9d6a',
+ ['base0C'] = '#afc4db',
+ ['base0D'] = '#7587a6',
+ ['base0E'] = '#9b859d',
+ ['base0F'] = '#9b703f',
+}
+
+lexers.colors = colors
+
+local fg = ',fore:'..colors.base05..','
+local bg = ',back:'..colors.base00..','
+
+lexers.STYLE_DEFAULT = bg..fg
+lexers.STYLE_NOTHING = bg
+lexers.STYLE_CLASS = 'fore:'..colors.base0A
+lexers.STYLE_COMMENT = 'fore:'..colors.base03..',italics'
+lexers.STYLE_CONSTANT = 'fore:'..colors.base09
+lexers.STYLE_DEFINITION = 'fore:'..colors.base0E
+lexers.STYLE_ERROR = 'fore:'..colors.base08..',italics'
+lexers.STYLE_FUNCTION = 'fore:'..colors.base0D
+lexers.STYLE_KEYWORD = 'fore:'..colors.base0E
+lexers.STYLE_LABEL = 'fore:'..colors.base0A
+lexers.STYLE_NUMBER = 'fore:'..colors.base09
+lexers.STYLE_OPERATOR = 'fore:'..colors.base05
+lexers.STYLE_REGEX = 'fore:'..colors.base0C
+lexers.STYLE_STRING = 'fore:'..colors.base0B
+lexers.STYLE_PREPROCESSOR = 'fore:'..colors.base0A
+lexers.STYLE_TAG = 'fore:'..colors.base0A
+lexers.STYLE_TYPE = 'fore:'..colors.base0A
+lexers.STYLE_VARIABLE = 'fore:'..colors.base0D
+lexers.STYLE_WHITESPACE = 'fore:'..colors.base02
+lexers.STYLE_EMBEDDED = 'fore:'..colors.base0F
+lexers.STYLE_IDENTIFIER = 'fore:'..colors.base08
+
+lexers.STYLE_LINENUMBER = 'fore:'..colors.base02..',back:'..colors.base00
+lexers.STYLE_CURSOR = 'fore:'..colors.base00..',back:'..colors.base05
+lexers.STYLE_CURSOR_PRIMARY = 'fore:'..colors.base00..',back:'..colors.base05
+lexers.STYLE_CURSOR_LINE = 'back:'..colors.base01
+lexers.STYLE_COLOR_COLUMN = 'back:'..colors.base01
+lexers.STYLE_SELECTION = 'back:'..colors.base02
+lexers.STYLE_STATUS = 'fore:'..colors.base04..',back:'..colors.base01
+lexers.STYLE_STATUS_FOCUSED = 'fore:'..colors.base09..',back:'..colors.base01
+lexers.STYLE_SEPARATOR = lexers.STYLE_DEFAULT
+lexers.STYLE_INFO = 'fore:default,back:default,bold'
+lexers.STYLE_EOF = ''
diff --git a/mut/vis/visrc.lua b/mut/vis/visrc.lua
index 898df9c..4f87b50 100644
--- a/mut/vis/visrc.lua
+++ b/mut/vis/visrc.lua
@@ -19,6 +19,7 @@ format.formatters.terraform = format.stdio_formatter("terraform fmt -", {on_save
vis.events.subscribe(vis.events.INIT, function()
vis:command"set shell '/usr/bin/bash'"
vis:command"set edconfhooks on"
+ vis:command"set change256colors off"
vis:command"set theme lemonsoda"
vis:map(m.INSERT, '<C-r>"', '<C-r>+')
@@ -39,6 +40,9 @@ end)
local files = {}
vis.events.subscribe(vis.events.WIN_OPEN, function(win)
vis:command"set cul on"
+ vis:command"set number"
+ vis:command"set relativenumber"
+ vis:command"set change256colors off"
local radix = files[vis.win.file.path]
for p, i in pairs(files) do
if (radix == nil) or (radix >= i) then
@@ -50,7 +54,7 @@ vis.events.subscribe(vis.events.WIN_OPEN, function(win)
end
end)
-vis:map(m.NORMAL, "<M-x>b", function()
+vis:map(m.NORMAL, "<C-x>b", function()
local keys = {}
for k in pairs(files) do if k ~= vis.win.file.path then table.insert(keys, k) end end
if next(keys) == nil then
@@ -64,35 +68,41 @@ vis:map(m.NORMAL, "<M-x>b", function()
return true;
end)
-vis:map(m.NORMAL, "<M-x>~", function()
- vis:command("cd " .. vis.win.file.path:match("(.+)/[^/]+$"))
+local parent = function(filename)
+ if filename ~= nil then
+ return filename:match("(.+)/[^/]+$")
+ end
+ return nil
+end
+
+local lfcd = function(cd_or_select_path)
+ local code, result, err = vis:pipe("", "lf --print-selection " .. cd_or_select_path)
+ vis:command("cd " .. err)
+ if result then
+ vis:command("e " .. result)
+ end
+ return true;
+end
+
+vis:map(m.NORMAL, "<C-x>~", function()
+ vis:command("cd " .. (parent(vis.win.file.path) or "."))
return true;
end)
-vis:map(m.NORMAL, "<M-x>f", function()
- local code, result, err = vis:pipe("", "vis-open .")
+vis:map(m.NORMAL, "<C-x><C-f>", function()
+ local code, result, err = vis:pipe("", "vis-open " .. (parent(vis.win.file.path) or "."))
if result then
-
if not os.execute("cd " .. result) then
vis:command("e " .. result)
else
- vis:command("cd " .. result)
- local code, result, err = vis:pipe("", "lf --print-selection")
- if not result then return true end
- local lines = {}
- for line in result:gmatch("[^\n]+") do table.insert(lines, line) end
- if lines[1] then
- vis:command("e " .. lines[1])
- end
+ return lfcd(result)
end
return true;
end
return true;
end)
-vis:map(m.NORMAL, "<M-x>-", function()
- local code, result, err = vis:pipe("", "lf --print-selection")
- vis:command("cd " .. err)
- if result then
- vis:command("e " .. result)
- end
- return true;
+vis:map(m.NORMAL, "<C-x>-", function()
+ return lfcd(parent(vis.win.file.path) or "")
+end)
+vis:map(m.NORMAL, "<C-x>_", function()
+ return lfcd(".")
end)