Compare commits
1 Commits
389a5ad784
...
wip
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a698f6e1f |
@@ -17,10 +17,13 @@ function M.terminalbg()
|
||||
end
|
||||
end
|
||||
|
||||
function M.update_colorscheme()
|
||||
vim.o.background = M.terminalbg()
|
||||
if colorschemes then
|
||||
vim.cmd.colorscheme(colorschemes[vim.o.background])
|
||||
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[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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
local lexer = lexer
|
||||
|
||||
local lex = lexer.new(...)
|
||||
|
||||
return lex
|
||||
@@ -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
|
||||
|
||||
@@ -1 +1 @@
|
||||
Net/ThemeName "Sunrise-Compact-Dark"
|
||||
Net/ThemeName "Materia-dark"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user