From f4baf50cf13b55adc0e927466b578c13f57f5293 Mon Sep 17 00:00:00 2001 From: david Date: Sun, 2 Nov 2025 22:28:18 -0600 Subject: [PATCH] Update aerospace keybinds, remove skhd, consolidate some theme scripts --- installs_and_builds/s06_window_manager | 6 -- ref/macos-system-settings.md | 12 ++++ ref/post-run.md | 4 -- src_files/.config/aerospace/aerospace.toml | 72 +++++++++---------- src_files/.config/nvim/lua/key_mappings.lua | 3 +- src_files/.config/skhd/skhdrc | 5 -- src_files/.config/tmux/tmux.conf | 2 +- src_files/.config/zsh/.zshrc | 3 +- src_files/.local/scripts/theme-set | 45 +++++++++--- src_files/.local/scripts/theme-update-neovim | 10 --- .../.local/scripts/theme-update-terminal | 18 ----- src_files/.local/scripts/theme-update-tmux | 3 - theme_config.sh | 8 +-- todo.md | 6 +- 14 files changed, 96 insertions(+), 101 deletions(-) delete mode 100755 src_files/.config/skhd/skhdrc delete mode 100755 src_files/.local/scripts/theme-update-neovim delete mode 100755 src_files/.local/scripts/theme-update-terminal delete mode 100755 src_files/.local/scripts/theme-update-tmux diff --git a/installs_and_builds/s06_window_manager b/installs_and_builds/s06_window_manager index 82c6310..e154398 100755 --- a/installs_and_builds/s06_window_manager +++ b/installs_and_builds/s06_window_manager @@ -6,12 +6,6 @@ linux_wm_and_utils() { } macos_wm_and_utils() { - brew install koekeishiya/formulae/skhd - skhd --start-service - sleep 14 # time to give permission in accessibility settings - skhd --restart-service - - # NOTE: currently, aerospace seems to need system restart to take effect brew install --cask nikitabobko/tap/aerospace } diff --git a/ref/macos-system-settings.md b/ref/macos-system-settings.md index a7588e7..5e84e01 100644 --- a/ref/macos-system-settings.md +++ b/ref/macos-system-settings.md @@ -19,6 +19,18 @@ settings for manual configuration in macOS system settings app - display - reduce motion: enabled - reduce transparency: enabled +- keyboard + - keyboard shortcuts + - screenshots + - save picture of selected area -> `cmd+shft+s` + - copy (clipboard) picture of selected area -> `ctrl+cmd+shft+s` + - modifier keys + - caps lock key -> `escape` + - command -> `control` + - alt/option -> `command` + - control -> `alt/option` + - spotlight + - show spotlight search -> `alt+r` and in general, just go through most pages/options and set them as desired diff --git a/ref/post-run.md b/ref/post-run.md index f52b7a5..eafeabe 100644 --- a/ref/post-run.md +++ b/ref/post-run.md @@ -2,10 +2,6 @@ ## macOS -- skhd - - run `skhd --start-service` - - grant skhd permission in accessibility settings - - run `skhd --restart-service` - aerospace - grant aerospace permission in accessibility settings - likely need system reboot before aerospace works diff --git a/src_files/.config/aerospace/aerospace.toml b/src_files/.config/aerospace/aerospace.toml index 07f4ce9..d2dfb94 100644 --- a/src_files/.config/aerospace/aerospace.toml +++ b/src_files/.config/aerospace/aerospace.toml @@ -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'] diff --git a/src_files/.config/nvim/lua/key_mappings.lua b/src_files/.config/nvim/lua/key_mappings.lua index fb8058c..532a550 100644 --- a/src_files/.config/nvim/lua/key_mappings.lua +++ b/src_files/.config/nvim/lua/key_mappings.lua @@ -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", "h", function() vim.lsp.buf.hover() end, opts) + vim.keymap.set("n", "lh", function() vim.lsp.buf.hover() end, opts) vim.keymap.set("i", "", function() vim.lsp.buf.signature_help() end, opts) vim.keymap.set("n", "lv", function() vim.diagnostic.open_float() end, opts) vim.keymap.set("n", "lq", function() vim.diagnostic.setqflist() end, opts) @@ -135,6 +135,7 @@ vim.keymap.set("n", "gg", function() TmpBuff() ReadShellCmd('git ' .. vim.fn.input('git ')) end) +vim.keymap.set("n", "gG", ":Git ") -- use fugitive plugin's generic git command ------------------------------------------------------------------------------------------ -- plugins diff --git a/src_files/.config/skhd/skhdrc b/src_files/.config/skhd/skhdrc deleted file mode 100755 index 01c4642..0000000 --- a/src_files/.config/skhd/skhdrc +++ /dev/null @@ -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" - diff --git a/src_files/.config/tmux/tmux.conf b/src_files/.config/tmux/tmux.conf index f2dcc47..8b1e29c 100644 --- a/src_files/.config/tmux/tmux.conf +++ b/src_files/.config/tmux/tmux.conf @@ -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 diff --git a/src_files/.config/zsh/.zshrc b/src_files/.config/zsh/.zshrc index ec75381..327eac6 100644 --- a/src_files/.config/zsh/.zshrc +++ b/src_files/.config/zsh/.zshrc @@ -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' diff --git a/src_files/.local/scripts/theme-set b/src_files/.local/scripts/theme-set index c953e53..0e7dad4 100755 --- a/src_files/.local/scripts/theme-set +++ b/src_files/.local/scripts/theme-set @@ -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" & diff --git a/src_files/.local/scripts/theme-update-neovim b/src_files/.local/scripts/theme-update-neovim deleted file mode 100755 index f0302b9..0000000 --- a/src_files/.local/scripts/theme-update-neovim +++ /dev/null @@ -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 - diff --git a/src_files/.local/scripts/theme-update-terminal b/src_files/.local/scripts/theme-update-terminal deleted file mode 100755 index e9135cf..0000000 --- a/src_files/.local/scripts/theme-update-terminal +++ /dev/null @@ -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 diff --git a/src_files/.local/scripts/theme-update-tmux b/src_files/.local/scripts/theme-update-tmux deleted file mode 100755 index 02045c9..0000000 --- a/src_files/.local/scripts/theme-update-tmux +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/zsh - -tmux source-file $DIR_THEME_SETTINGS/.current-theme/tmux.conf diff --git a/theme_config.sh b/theme_config.sh index 9977ce1..12fbde4 100755 --- a/theme_config.sh +++ b/theme_config.sh @@ -10,7 +10,7 @@ sym_link() { echo "---- configuring themes ----------------" source src_files/.config/zsh/.zshenv -# bring in the theme-files from Omarchy which i want to use +echo "copying theme imports into config dirs" omarchy_themes=(`find src_files/imports/themes-omarchy-* -mindepth 1 -maxdepth 1 -type d`) for dir in $omarchy_themes; do target_theme_dir="$DIR_THEME_SETTINGS/$(basename $dir)" @@ -20,16 +20,14 @@ for dir in $omarchy_themes; do for f in $dir_theme_files; do cp -RPp $f $target_theme_dir/; done done -# rename imported chromium.theme files chromium_filenames=(`find $DIR_THEME_SETTINGS -mindepth 2 -maxdepth 2 -name "chromium.theme"`) for f in $chromium_filenames; do mv $f $(dirname $f)/brave.theme; done -# copy over custom neovim themes nvim_themes_dir=$XDG_CONFIG_HOME/nvim/themes [[ ! -d "$nvim_themes_dir/pina/colors" ]] && mkdir -p "$nvim_themes_dir/pina/colors" cp -p src_files/imports/themes-omarchy-extra/pina/pina.nvim/colors/pina.vim $nvim_themes_dir/pina/colors/ -# set links for theme-switching +echo "setting sym-links for theme-switching" default_theme="tokyodark" sym_link $DIR_THEME_SETTINGS/$default_theme $DIR_THEME_SETTINGS/.current-theme sym_link $DIR_THEME_SETTINGS/.current-theme/kitty.conf $XDG_CONFIG_HOME/kitty/theme.conf @@ -37,6 +35,6 @@ sym_link $DIR_THEME_SETTINGS/.current-theme/tmux.conf $XDG_CONFIG_HOME/tmux/them sym_link $DIR_THEME_SETTINGS/.current-theme/neovim.lua $XDG_CONFIG_HOME/nvim/current-theme # TODO: finish theme work, set needed links per theme-set script -# once everything is in place, run theme-set with the default_theme +echo "setting the default theme: $default_theme" $DIR_SCRIPTS/theme-set $default_theme diff --git a/todo.md b/todo.md index 774c05c..7cf74d2 100644 --- a/todo.md +++ b/todo.md @@ -1,6 +1,9 @@ # todo items -- config for: terminal (kitty? havoc?); shell; mpd, mpc, ncmpcpp; mpv +- config for: terminal (kitty? havoc?) +- config for shell (if keeping zsh, may not need anything beyond what i've already done) +- config for mpd, mpc, ncmpcpp +- config for mpv (if any, may not need anything) - hyprland config and install on linux - web browsers config and install - get find, xargs, awk (use nawk) as unified as i can across system types @@ -15,5 +18,4 @@ to a base/core install, a music-studio install, a employer/work machine, etc. - alternate idea: columns for "include_in_systems" and/or "excluded_from_systems" - if both, likely apply the include column first, then the exclude (priority) -- add command in tmux to perform cd to a given dir in all windows of the current session