sev [Sat, 26 Oct 2024 00:47:59 +0000 (19:47 -0500)]
vimrc: enable modeline explicitly
modelines are enabled by default in most installations, but in cases where rhey
aren't, explicitly enable them. modern vim is protected against exploit by
running modelines in a sandbox and blocking expressions. they shouls be pretty
safe. nvim is planning to do more with it eventually to make it moreso.
sev [Fri, 25 Oct 2024 23:17:08 +0000 (18:17 -0500)]
vim: fix vimrc, remove todo plugin, add lastplace
- comments were updated and some sections reordered
- removed todo.txt plugin as I have not used it in forever
- added lastplace plugin for missing cursor return in nvim
- removed vimStartup autocmd from defaults.vim, as lastplace plugin replaces it
- made commentary plugin optional and only load under vim, as nvim has built in
comment handling now
- fix lots of autocmds to use the correct events and actually do things
- add autocmd to some options that needed it, such as autoindent under vim
- change default colorscheme to murphy
- modify space coloration logic and highlight group names
- add CTRL-L :noh to vim like with sensible.vim and nvim
- add a few new options to override sensible.vim if loaded (like in termux)
sev [Fri, 18 Oct 2024 21:23:36 +0000 (16:23 -0500)]
vim: update config, support nvim, del editorconfig
- many config options were not being applied globally, since they were not
global options themselves. they have been made global using autocommands.
- nvim did not work properly as some options are not compatible/not necessary
with it.
- editorconfig is built-in as of vim 9, so the repo is no longer necessary. it
has been removed, and the editorconfig optional package loaded when vim
starts.
sev [Mon, 16 Sep 2024 13:36:23 +0000 (08:36 -0500)]
zshenv: fix tmp and .local [for termux proot]
there have been some issues with tmpdir that were uncovered thanks to
using proot in termux. this better supports home dir changes, paths that
already exist, and an incorrect var name used in proot, for tmpdir
generation. it also fixes .local permissions, to support accessing it
during zsu (which still isn't implemented lol!)
sev [Tue, 28 Nov 2023 18:51:22 +0000 (12:51 -0600)]
zsh: fixup env vars and update a comment
- removed graphical env vars as they aren't really doing anything. would be
useful for unmanaged invocations of xorg/wayland, but I don't do those
anymore. if graphical configuration is ever needed it should be added to site
local rc anyway since it relies heavily on underlying system configuration.
- scoped vars inside functions instead of unsetting.
- scoped some arithmetic vars inside _sev_setpath that were not being unset.
- added /opt/<provider>/<package>/bin and /opt/<package>/bin to path per FHS.
- be more aggressive in unsetting GNUPGHOME after forwarding.
- updated a gpg comment for clarification while there.
sev [Fri, 20 Oct 2023 19:26:06 +0000 (14:26 -0500)]
zshenv: fix xdg array logic
$xdg_*_dirs parameter expansion was augmented to use :# to remove empty
elements, to replace the old system that used the scalar $XDG_*_DIRS
parameters. the old code was originally added to remove the first value of the
DIRS arrays if they were empty. however, the $XDG_*_HOME vars were unquoted a
while ago, and zsh should already remove empty elements from unquoted array
expansions, rendering that safeguard unnecessary. the newest change also
introduced a regression where the arrays were being flattened into scalars.
this also caused KDE to not start due to being unable to find necessary system
files elided by the broken vars.
this was all fixed by removing the empty var removal code, and simply unquoting
everything. since SH_WORDSPLIT is not set, the parameters will not be
wordsplit.
this also fixed an issue where duplicate array values were not being removed
due to the presence of a trailing slash.
sev [Fri, 20 Oct 2023 17:03:44 +0000 (12:03 -0500)]
more zsh fixes
- various comment updates
- moved some stuff out of zprofile and into zshenv for earlier use
- fixed zoxide bug until upstream fixes it
- PATH will now be updated twice, once in zshenv and once in zprofile
- rehash alias will update PATH before rehashing
- FPATH is now deduplicated like PATH is
Arch Linux and other systems (especially FreeBSD around version 10 and 11, last
I used it) do a lot of stuff to your shell environment via /etc/profile{,d},
and this may end up being sourced by the system zprofile for compatibility.
rather than shove everything into our local zprofile to override this aberrant
and often unwanted behavior as was previously done, let's just set things up in
zshenv as it should be, and if there are any problems, use load-site-dotfile
to fix things up instead. system profile scripts that make use of env vars will
also be taken care of with this approach, like flatpak-bindir.sh in the Arch
Linux flatpak package for example.
we also now update PATH twice so it can be set up early for our own purposes,
and so that any weird changes made by system profile scripts can be fixed.
sev [Mon, 16 Oct 2023 23:41:05 +0000 (18:41 -0500)]
more zsh refactoring
- fixed bug where zshenv would not be called after setting ZDOTDIR since it
lives in $HOME
- moved some stuff from .zprofile to .zshenv and fixed ordering
- added load-site-dotfile instead of sourcing per-file
- _sev_home still not done yet... just ignore it
sev [Wed, 11 Oct 2023 22:10:05 +0000 (17:10 -0500)]
zsh: reorder zshrc, fix zoxide, git aliases
zoxide completion was not working since compinit was being loaded after zoxide
init was being run, so compinit was moved to the top. also added some git
aliases while there.
sev [Sun, 27 Aug 2023 02:51:17 +0000 (21:51 -0500)]
ykman-oath-reload: new + restored features
- pull in codes from local files, or from stdin if not present
- look for binaries outside of *nix PATH for cygwin/msys2 envs
- handle non-*nix line endings sent by ykman
- ignore blank lines and comments (#) in input
- add script comments