Update aerospace keybinds, remove skhd, consolidate some theme scripts

This commit is contained in:
2025-11-02 22:28:18 -06:00
parent 392b24e18b
commit f4baf50cf1
14 changed files with 96 additions and 101 deletions

View File

@@ -25,51 +25,51 @@ default-root-container-orientation = 'vertical' # opts: horizontal vertical auto
outer.right = 0
[mode.main.binding]
alt-comma = 'layout v_accordion'
alt-period = 'layout h_tiles'
alt-slash = 'layout horizontal vertical'
cmd-comma = 'layout v_accordion'
cmd-period = 'layout h_tiles'
cmd-slash = 'layout horizontal vertical'
alt-minus = 'resize smart -50'
alt-equal = 'resize smart +50'
# in stack mode, new windows are added "below" the current, so swap up and down
alt-j = 'focus up'
alt-k = 'focus down'
alt-l = 'focus right'
alt-h = 'focus left'
alt-shift-j = 'move up'
alt-shift-k = 'move down'
alt-shift-h = 'move left'
alt-shift-l = 'move right'
cmd-j = 'focus up'
cmd-k = 'focus down'
cmd-l = 'focus right'
cmd-h = 'focus left'
cmd-shift-j = 'move up'
cmd-shift-k = 'move down'
cmd-shift-h = 'move left'
cmd-shift-l = 'move right'
alt-1 = 'workspace 1'
alt-2 = 'workspace 2'
alt-3 = 'workspace 3'
alt-4 = 'workspace 4'
alt-5 = 'workspace 5'
alt-6 = 'workspace 6'
alt-7 = 'workspace 7'
alt-8 = 'workspace 8'
alt-9 = 'workspace 9'
alt-0 = 'workspace 0'
alt-shift-1 = 'move-node-to-workspace 1'
alt-shift-2 = 'move-node-to-workspace 2'
alt-shift-3 = 'move-node-to-workspace 3'
alt-shift-4 = 'move-node-to-workspace 4'
alt-shift-5 = 'move-node-to-workspace 5'
alt-shift-6 = 'move-node-to-workspace 6'
alt-shift-7 = 'move-node-to-workspace 7'
alt-shift-8 = 'move-node-to-workspace 8'
alt-shift-9 = 'move-node-to-workspace 9'
alt-shift-0 = 'move-node-to-workspace 0'
cmd-1 = 'workspace 1'
cmd-2 = 'workspace 2'
cmd-3 = 'workspace 3'
cmd-4 = 'workspace 4'
cmd-5 = 'workspace 5'
cmd-6 = 'workspace 6'
cmd-7 = 'workspace 7'
cmd-8 = 'workspace 8'
cmd-9 = 'workspace 9'
cmd-0 = 'workspace 0'
cmd-shift-1 = 'move-node-to-workspace 1'
cmd-shift-2 = 'move-node-to-workspace 2'
cmd-shift-3 = 'move-node-to-workspace 3'
cmd-shift-4 = 'move-node-to-workspace 4'
cmd-shift-5 = 'move-node-to-workspace 5'
cmd-shift-6 = 'move-node-to-workspace 6'
cmd-shift-7 = 'move-node-to-workspace 7'
cmd-shift-8 = 'move-node-to-workspace 8'
cmd-shift-9 = 'move-node-to-workspace 9'
cmd-shift-0 = 'move-node-to-workspace 0'
alt-shift-semicolon = 'mode service'
cmd-shift-semicolon = 'mode service'
[mode.service.binding]
r = ['reload-config', 'flatten-workspace-tree', 'mode main'] # reset layout
f = ['flatten-workspace-tree', 'layout floating', 'mode main']
alt-h = ['join-with left', 'mode main']
alt-j = ['join-with down', 'mode main']
alt-k = ['join-with up', 'mode main']
alt-l = ['join-with right', 'mode main']
cmd-h = ['join-with left', 'mode main']
cmd-j = ['join-with down', 'mode main']
cmd-k = ['join-with up', 'mode main']
cmd-l = ['join-with right', 'mode main']

View File

@@ -113,7 +113,7 @@ kmgAutocmd('LspAttach', {
callback = function(e)
local opts = { buffer = e.buf }
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
vim.keymap.set("n", "<leader>h", function() vim.lsp.buf.hover() end, opts)
vim.keymap.set("n", "<leader>lh", function() vim.lsp.buf.hover() end, opts)
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
vim.keymap.set("n", "<leader>lv", function() vim.diagnostic.open_float() end, opts)
vim.keymap.set("n", "<leader>lq", function() vim.diagnostic.setqflist() end, opts)
@@ -135,6 +135,7 @@ vim.keymap.set("n", "<leader>gg", function()
TmpBuff()
ReadShellCmd('git ' .. vim.fn.input('git '))
end)
vim.keymap.set("n", "<leader>gG", ":Git ") -- use fugitive plugin's generic git command
------------------------------------------------------------------------------------------
-- plugins

View File

@@ -1,5 +0,0 @@
# ref: built-in keywords, https://github.com/koekeishiya/skhd/issues/1
ctrl + shift - h : $(which skhd) -k "ctrl + shift - tab"
ctrl + shift - l : $(which skhd) -k "ctrl - tab"

View File

@@ -5,7 +5,7 @@ unbind C-b
set-option -g prefix C-Space
bind-key C-Space send-prefix
source-file "$XDG_CONFIG_HOME/tmux/theme.conf"
set -g base-index 0
set -g base-index 1
# unbind keys
unbind-key f; unbind-key C-f; unbind-key s; unbind-key C-s

View File

@@ -15,7 +15,8 @@ alias cls='clear;ls'
alias n='nvim'
alias nv='nvim'
alias ths='theme-set'
alias tms='tmux-session-init'
alias thw='theme-update-wallpaper'
alias tmi='tmux-session-init'
# executable overrides
alias ls='ls -F'

View File

@@ -9,6 +9,35 @@
##########################################################################################
theme_update_terminal() {
case "$TERMINAL" in
("havoc" | "foot")
echo "TODO: theme update for havoc or foot not yet implemented"
;;
("kitty")
killall -SIGUSR1 kitty
;;
esac
}
theme_update_tmux() {
tmux source-file $DIR_THEME_SETTINGS/.current-theme/tmux.conf
}
theme_update_neovim() {
nvim_stdpath_run=$(dirname $(
nvim -l <(echo "vim.cmd.echo('stdpath(\"run\")')") > /dev/stdout 2>&1
))
find "$nvim_stdpath_run" -type s -name "nvim*" 2> /dev/null |
while IFS= read -r nvim_server; do
timeout 2s nvim --server "$nvim_server" \
--remote-expr "execute('lua ThemeUpdate()')" \
> /dev/null 2>&1
done
}
##########################################################################################
[[ ! -z $1 ]] && raw_target="$1" ||
raw_target=$(
find $DIR_THEME_SETTINGS -mindepth 1 -maxdepth 1 -type d -exec basename -- {} \; |
@@ -20,14 +49,12 @@ target_theme="$DIR_THEME_SETTINGS/$(echo $raw_target | tr ' ' '-' | tr '[:upper:
ln -sF "$target_theme" $DIR_THEME_SETTINGS/.current-theme
theme-update-terminal
theme-update-tmux
theme-update-neovim &
# theme-update-obsidian # TODO: implement
# theme-update-browser # TODO: implement
# theme-update-reaper # TODO: implement
# theme-update-gimp # TODO: possible and actually desired? my main use case is just a blackboard, maybe let it be
# theme-update-mutt # TODO: possible and actually desired?
# theme-update-irc # TODO: possible and actually desired?
theme_update_terminal
theme_update_tmux
theme_update_neovim &
# theme_update_obsidian # TODO: decide if theming beyond transparency is worth it, if so, implement
# theme_update_browser # TODO: implement
# theme_update_reaper # TODO: implement
# theme_update_mutt # TODO: possible and actually desired?
theme-update-wallpaper "zz-default-for-theme" &

View File

@@ -1,10 +0,0 @@
#!/bin/zsh
nvim_stdpath_run=$(dirname $(nvim -l <(echo "vim.cmd.echo('stdpath(\"run\")')") > /dev/stdout 2>&1))
find "$nvim_stdpath_run" -type s -name "nvim*" 2> /dev/null |
while IFS= read -r nvim_server; do
timeout 2s nvim --server "$nvim_server" \
--remote-expr "execute('lua ThemeUpdate()')" \
> /dev/null 2>&1
done

View File

@@ -1,18 +0,0 @@
#!/bin/zsh
theme_update_havoc() {
echo "TODO: theme_update_havoc not yet implemented"
}
theme_update_kitty() {
killall -SIGUSR1 kitty
}
case "$TERMINAL" in
("havoc")
theme_update_havoc
;;
("kitty")
theme_update_kitty
;;
esac

View File

@@ -1,3 +0,0 @@
#!/bin/zsh
tmux source-file $DIR_THEME_SETTINGS/.current-theme/tmux.conf