Compare commits
1 Commits
wip
...
389a5ad784
| Author | SHA1 | Date | |
|---|---|---|---|
| 389a5ad784 |
@@ -17,13 +17,10 @@ function M.terminalbg()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function M.update_colorscheme(only_if_changed)
|
function M.update_colorscheme()
|
||||||
local next = M.terminalbg()
|
vim.o.background = M.terminalbg()
|
||||||
if not only_if_changed or next ~= vim.o.background then
|
if colorschemes then
|
||||||
vim.o.background = next
|
vim.cmd.colorscheme(colorschemes[vim.o.background])
|
||||||
if colorschemes then
|
|
||||||
vim.cmd.colorscheme(colorschemes[next])
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -45,7 +42,7 @@ local function watch(fname)
|
|||||||
fname,
|
fname,
|
||||||
{},
|
{},
|
||||||
vim.schedule_wrap(function(...)
|
vim.schedule_wrap(function(...)
|
||||||
M.update_colorscheme(true)
|
M.update_colorscheme()
|
||||||
w:stop()
|
w:stop()
|
||||||
watch(fname)
|
watch(fname)
|
||||||
end)
|
end)
|
||||||
|
|||||||
@@ -183,3 +183,26 @@ local function jump(keys)
|
|||||||
end
|
end
|
||||||
|
|
||||||
vis:map(vis.modes.NORMAL, '\\', jump)
|
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)
|
||||||
|
|||||||
5
vis/.config/vis/lexers/mail.lua
Normal file
5
vis/.config/vis/lexers/mail.lua
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
local lexer = lexer
|
||||||
|
|
||||||
|
local lex = lexer.new(...)
|
||||||
|
|
||||||
|
return lex
|
||||||
@@ -56,7 +56,7 @@ XTerm.vt100.color14: #8FBCBB
|
|||||||
XTerm.vt100.color7: #E5E9F0
|
XTerm.vt100.color7: #E5E9F0
|
||||||
XTerm.vt100.color15: #ECEFF4
|
XTerm.vt100.color15: #ECEFF4
|
||||||
|
|
||||||
st.font: FiraCode Nerd Font:size=10
|
st.font: Fira Code Retina:size=10
|
||||||
|
|
||||||
#ifdef THEME_DARK
|
#ifdef THEME_DARK
|
||||||
st.lightmode: 0
|
st.lightmode: 0
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
Net/ThemeName "Materia-dark"
|
Net/ThemeName "Sunrise-Compact-Dark"
|
||||||
|
|||||||
@@ -6,8 +6,9 @@ fi
|
|||||||
|
|
||||||
xset b off
|
xset b off
|
||||||
xrandr --auto
|
xrandr --auto
|
||||||
xrandr --output DP-0 --left-of DP-2 --primary
|
#xrandr --output DP-0 --left-of DP-2 --primary
|
||||||
xrandr --output HDMI-0 --left-of DP-0
|
#xrandr --output HDMI-0 --left-of DP-0
|
||||||
|
xrandr --output HDMI-A-0 --mode 3840x2160 --right-of eDP --auto
|
||||||
xrdb -merge ~/.Xresources
|
xrdb -merge ~/.Xresources
|
||||||
setxkbmap pl -option ctrl:nocaps
|
setxkbmap pl -option ctrl:nocaps
|
||||||
|
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ if [ "$THEME" = "toggle" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$THEME" = dark ]; then
|
if [ "$THEME" = dark ]; then
|
||||||
GTK_THEME=Materia-dark
|
GTK_THEME=Sunrise-Compact-Dark
|
||||||
rm -f ~/.lightmode
|
rm -f ~/.lightmode
|
||||||
elif [ "$THEME" = light ]; then
|
elif [ "$THEME" = light ]; then
|
||||||
GTK_THEME=Materia-light
|
GTK_THEME=Sunrise-Compact-Light
|
||||||
touch ~/.lightmode
|
touch ~/.lightmode
|
||||||
else
|
else
|
||||||
echo "error: unknown theme: should be either dark, light or toggle" >&2
|
echo "error: unknown theme: should be either dark, light or toggle" >&2
|
||||||
|
|||||||
Reference in New Issue
Block a user