From 513ddbd8cee63cd8b09086d343a99123d782c940 Mon Sep 17 00:00:00 2001 From: iceyrazor Date: Fri, 23 Oct 2026 23:48:32 -0500 Subject: Squashed commit of the following: lessons loop change added tld to newsboat changed mimes manpager is using mktemp now added paste bind. so autoindent dont indent clipboard vis. made file browser not close vis on cancel added telemetry disable line to lua updated README.me removed nitrogen and swaybg. wallpaper is now set with setwll removed cava from backup fixed way alias removed cava shaders --- env/.config/vis/visrc.lua | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) (limited to 'env/.config/vis/visrc.lua') diff --git a/env/.config/vis/visrc.lua b/env/.config/vis/visrc.lua index d1a2e32..3d7f90c 100644 --- a/env/.config/vis/visrc.lua +++ b/env/.config/vis/visrc.lua @@ -4,27 +4,41 @@ require('vis') local leader = ' ' +local function count_windows() + local n = 0 + for _ in vis.windows(vis) do + n = n + 1 + end + return n +end + + vis:map(vis.modes.NORMAL, ' ', '') vis:map(vis.modes.VISUAL,leader.."y", '"+y"') -- global configuration options vis.events.subscribe(vis.events.INIT, function() - vis:command("set theme caelus") + vis:command("set theme caelus") end) -- per-window configuration options vis.events.subscribe(vis.events.WIN_OPEN, function(win) - vis:command("set tabwidth 4") - vis:command("set relativenumbers true") - vis:command("set autoindent true") - vis:command("set expandtab true") - vis:command("set ignorecase true") - vis:map(vis.modes.NORMAL, leader.."pv", function() - vis:command("open .") - vis:feedkeys("k") - vis:command("wq!") - end, "") + vis:command("set tabwidth 4") + vis:command("set relativenumbers true") + vis:command("set autoindent true") + vis:command("set expandtab true") + vis:command("set ignorecase true") + vis:map(vis.modes.NORMAL, leader.."fm", function() + local windows = count_windows() + vis:command("open .") + if count_windows() == windows then + return + end + vis:feedkeys("k") + vis:command("wq!") + end, "") + vis:map(vis.modes.NORMAL, leader.."p", '"+p') end) vis.ftdetect.filetypes["greyscript"] = { ext = { "%.src$" } } -- cgit v1.3