Compare commits

..

1 Commits

Author SHA1 Message Date
4a698f6e1f nvim: migrate to paq package manager 2025-11-24 22:10:13 +01:00
7 changed files with 14 additions and 40 deletions

View File

@@ -17,10 +17,13 @@ function M.terminalbg()
end
end
function M.update_colorscheme()
vim.o.background = M.terminalbg()
function M.update_colorscheme(only_if_changed)
local next = M.terminalbg()
if not only_if_changed or next ~= vim.o.background then
vim.o.background = next
if colorschemes then
vim.cmd.colorscheme(colorschemes[vim.o.background])
vim.cmd.colorscheme(colorschemes[next])
end
end
end
@@ -42,7 +45,7 @@ local function watch(fname)
fname,
{},
vim.schedule_wrap(function(...)
M.update_colorscheme()
M.update_colorscheme(true)
w:stop()
watch(fname)
end)

View File

@@ -183,26 +183,3 @@ local function jump(keys)
end
vis:map(vis.modes.NORMAL, '\\', jump)
local function oneJump()
local v = vis.win.viewport.bytes
local data = vis.win.file:content(v)
local data = 'echo abc'
local code, out, err = vis:pipe(vis.win.file, v, 'chars-jump', false)
-- local code, out, err = vis:pipe(vis.win.file, v, 'cat', true)
-- local code, out, err = vis:pipe('chars-jump')
if code ~= 0 then
vis:info(err or ('fzf exit code ' .. code))
else
local p = jumps[out:sub(1, 1)]
if p then
vis.win.selection.pos = p
else
vis:info('not found')
end
end
return ret
end
vis:map(vis.modes.NORMAL, '-', oneJump)

View File

@@ -1,5 +0,0 @@
local lexer = lexer
local lex = lexer.new(...)
return lex

View File

@@ -56,7 +56,7 @@ XTerm.vt100.color14: #8FBCBB
XTerm.vt100.color7: #E5E9F0
XTerm.vt100.color15: #ECEFF4
st.font: Fira Code Retina:size=10
st.font: FiraCode Nerd Font:size=10
#ifdef THEME_DARK
st.lightmode: 0

View File

@@ -1 +1 @@
Net/ThemeName "Sunrise-Compact-Dark"
Net/ThemeName "Materia-dark"

View File

@@ -6,9 +6,8 @@ fi
xset b off
xrandr --auto
#xrandr --output DP-0 --left-of DP-2 --primary
#xrandr --output HDMI-0 --left-of DP-0
xrandr --output HDMI-A-0 --mode 3840x2160 --right-of eDP --auto
xrandr --output DP-0 --left-of DP-2 --primary
xrandr --output HDMI-0 --left-of DP-0
xrdb -merge ~/.Xresources
setxkbmap pl -option ctrl:nocaps

View File

@@ -11,10 +11,10 @@ if [ "$THEME" = "toggle" ]; then
fi
if [ "$THEME" = dark ]; then
GTK_THEME=Sunrise-Compact-Dark
GTK_THEME=Materia-dark
rm -f ~/.lightmode
elif [ "$THEME" = light ]; then
GTK_THEME=Sunrise-Compact-Light
GTK_THEME=Materia-light
touch ~/.lightmode
else
echo "error: unknown theme: should be either dark, light or toggle" >&2