diff --git a/src/.config/fish/aliases.fish b/src/.config/fish/aliases.fish index 82c705b..9073c33 100644 --- a/src/.config/fish/aliases.fish +++ b/src/.config/fish/aliases.fish @@ -14,9 +14,6 @@ alias cp='cp -n' # run this before opening, e.g., mpv or zathura abbr -a -- ds swal; -# neovide -alias nv 'swal -c neovide; neovide' - # zathura alias thur='zathura' # stricter sandbox zathura diff --git a/src/.config/nvim/lua/theme.lua b/src/.config/nvim/lua/theme.lua index e1290c2..8f340e7 100644 --- a/src/.config/nvim/lua/theme.lua +++ b/src/.config/nvim/lua/theme.lua @@ -1,3 +1,6 @@ +local confutil = require("confutil") +local keymap = confutil.keymap + ------ -- color theme ------ @@ -112,10 +115,13 @@ if vim.g.neovide then once = true, callback = function() vim.g.neovide_scale_factor = 1.01 - vim.uv.new_timer():start(20, 0, vim.schedule_wrap(function() + vim.uv.new_timer():start(40, 0, vim.schedule_wrap(function() vim.g.neovide_scale_factor = 1 end)) end, } ) + + -- no terminal, no Ctrl-Shift-V paste + keymap("", '"+p', { mode = { "n", "i" } }) end diff --git a/src/.config/vars b/src/.config/vars index 0176e5d..967901f 100644 --- a/src/.config/vars +++ b/src/.config/vars @@ -53,9 +53,9 @@ export MRSS_DIR="$HOME/dox/rss" export REM_FILE="$HOME/dox/not/rem" # Set default programs -export EDITOR="nvim" +export EDITOR="nv" export BROWSER="qutebrowser" -# man pager +# man pager (neovide doesn't support this yet https://github.com/neovide/neovide/issues/1865) export MANPAGER='nvim +Man!' export MANWIDTH=165 diff --git a/src/.local/bin/nv b/src/.local/bin/nv new file mode 100755 index 0000000..6151695 --- /dev/null +++ b/src/.local/bin/nv @@ -0,0 +1,15 @@ +#!/bin/sh +# Small wrapper over neovide/neovim + +swal() { + if command -v dwmswallow > /dev/null; then + dwmswallow "$WINDOWID" -c neovide + fi +} + +if ! command -v neovide > /dev/null || [ -z "$DISPLAY" ]; then + nvim "$@" +else + swal + neovide "$@" +fi