Now that the ubi backend is built-in to mise, so the UBI binary is no
longer required, let's switch most things which can be installed by UBI,
to be installed by UBI.
This reduces the number of separate/external asdf plugins used to
install all my tooling.
When waking macOS from sleep with multiple external monitors, it does
not correctly display the wallpaper on all screens, and can sometimes
get confused about window placement boundaries. The fix is to simply
restart the Dock process which handles these things.
This simply adds a cmd+ctrl+alt+k keybinding to trigger this via
Hammerspoon. This is particularly useful in the rare occasion you wake a
laptop without external displays which were disconnected when it was
asleep, as it sometimes gets confused to the point it thinks there are
external displays, and does not consider the internal display as part of
the usable desktop space, meaning there's no way to open a terminal
window to execute `killall Dock`. While this VERY rare, it does still
happen, which more than justifies the few lines of lua here.
Biggest change is embracing fzf for all shell completion. This includes
using tmux popup windows to effectively render completions as floating
popups with fuzzy matching via fzf.
Shell history has also been improved, with appending each command to the
history file one by one, rather than only at end of a shell session when
the shell exists. This should ensure I don't have any more lost commands
cause the shell didn't exit cleanly.
1Password's shell plugin integration is nice, but it currently uses
aliases to run various CLI tools through `op plugin run -- <tool>`.
This leads to shell completion for those tools not working correctly in
bash and zsh.
While zsh can work around that with `setopt completealiases`, it causes
shorthand aliases to break instead. Hence the only reasonable solution
is to replace the aliases with shell functions.
Previously I had manually been editing ~/.config/op/plugins.sh replacing
the aliases with functions. This is an automated solution that generates
unalias calls and function definitions for all 1Password aliases. It is
also efficient by means of writing the generated functions to a cache
file which is only updated when needed.
When using Arc and having new links open in Little Arc while having
Hammerspoon set as the default browser, clicking a link first switches
to and focuses on the most recent main Arc window, before then opening
Little Arc.
While if Arc itself is the default browser, no such focus switching
happens, and instead Little Arc just opens and gets focus.