diff --git a/README.md b/README.md index b192da1..d343663 100644 --- a/README.md +++ b/README.md @@ -12,22 +12,28 @@ - for aerospace window manager, have only 1 workspace/desktop - manual settings, refer to [ref/macos-system-settings](ref/macos-system-settings.txt) +-------- + ### script run - to do the full setup, from git root dir, run: `./box_setup.sh` - to copy dotfiles only, from git root dir, run: `./copy_dotfiles.sh` +-------- + ### after script run - complete manual actions specified in [ref/post-run](ref/post-run.md) ------------------------------------------------------------------------------------------- +-------- ### todo items -- choose window manager for linux, then configure -- config for: terminal (ghostty); shell; mpd, mpc, ncmpcpp; mpv +- config for: terminal (ghostty? foot? havoc?); shell; mpd, mpc, ncmpcpp; mpv +- hyprland config on linux - decide on docker? or alternatives like podman? any license concerns? - switch installation approach, use csv file with programs to install, install types, any extra flags/opts, comments - regarding the system-types idea i'd started to build in already, maybe have a column for filtering in the csv file, or just have multiple csv files corresponding 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 diff --git a/installs_and_builds/s02_utils b/installs_and_builds/s02_utils index 1759856..d22ec7e 100755 --- a/installs_and_builds/s02_utils +++ b/installs_and_builds/s02_utils @@ -1,16 +1,18 @@ #!/bin/zsh -# likely on unix systems already: find xargs grep sed awk +# likely on unix systems already: find, xargs, awk? (maybe get alternative like nawk?) ${=BOX_SETUP_INSTALL_COMMAND} \ curl \ + grep \ + ripgrep \ + sed \ + fzf \ jq \ parallel \ - fzf \ make \ cmake \ - gettext \ - grep \ - ripgrep + gettext +# TODO: add to above a system info monitor like htop, btop, gotop, or something similar utils_package_name_pandoc="pandoc" case $BOX_SETUP_DISTRO in diff --git a/make_dirs.sh b/make_dirs.sh index 1aa1da3..2790119 100755 --- a/make_dirs.sh +++ b/make_dirs.sh @@ -23,6 +23,8 @@ source ./src_files/.config/zsh/.zshenv # ensure env vars set for use below [[ ! -d "$DIR_DEV" ]] && mkdir -p $DIR_DEV [[ ! -d "$DIR_GIT_PROJECTS" ]] && mkdir -p $DIR_GIT_PROJECTS [[ ! -d "$DIR_GIT_PROJECTS/me" ]] && mkdir -p $DIR_DEV/git/me +[[ ! -d "$DIR_GIT_PROJECTS/forks" ]] && mkdir -p $DIR_DEV/git/forks +[[ ! -d "$DIR_GIT_PROJECTS/learning" ]] && mkdir -p $DIR_DEV/git/learning [[ ! -d "$DIR_GIT_PROJECTS/other" ]] && mkdir -p $DIR_DEV/git/other # directories for music/audio production diff --git a/src_files/.config/nvim/lua/key_mappings.lua b/src_files/.config/nvim/lua/key_mappings.lua index 5d7e747..e5881fb 100644 --- a/src_files/.config/nvim/lua/key_mappings.lua +++ b/src_files/.config/nvim/lua/key_mappings.lua @@ -7,23 +7,23 @@ local kmgAutocmd = vim.api.nvim_create_autocmd -- explore the directory of the current file (using netrw) vim.keymap.set("n", "n", vim.cmd.Ex) --- move selected lines up or down +-- move visually-selected lines up or down vim.keymap.set("v", "J", ":m '>+1gv") vim.keymap.set("v", "K", ":m '<-2gv") --- vertically center cursor with half-page jumps -vim.keymap.set("n", "", "zz") -vim.keymap.set("n", "", "zz") +-- reduce effective distance of half-page jumps and vertically-center the cursor +vim.keymap.set("n", "", "4M") +vim.keymap.set("n", "", "4M") -- open folds when iterating search results vim.keymap.set("n", "n", "nzv") vim.keymap.set("n", "N", "Nzv") -- maintain cursor position after paragraph formatting -vim.keymap.set("n", "=ap", "ma=ap'a") +vim.keymap.set("n", "=ap", "mF=ap'F") -- shortcuts for deleting into the void register -vim.keymap.set({ "n", "v" }, "d", "\"_d") +vim.keymap.set({ "n", "v" }, "d", [["_d]]) vim.keymap.set("x", "P", [["_dP]]) -- replace selected text, keep main register -- shortcuts for using + register (system clipboard) @@ -52,6 +52,16 @@ vim.keymap.set("n", "", [[h]]) vim.keymap.set("n", "", [[j]]) vim.keymap.set("n", "", [[k]]) vim.keymap.set("n", "", [[l]]) +kmgAutocmd('FileType', { + group = kmGroup, + pattern = "netrw", + callback = function() + vim.keymap.set("n", "", [[h]], { remap = true, buffer = true }) + vim.keymap.set("n", "", [[j]], { remap = true, buffer = true }) + vim.keymap.set("n", "", [[k]], { remap = true, buffer = true }) + vim.keymap.set("n", "", [[l]], { remap = true, buffer = true }) + end +}) ------------------------------------------------------------------------------------------ -- quickfix TODO: learn about quickfix (:help quickfix), then maybe use these @@ -71,14 +81,17 @@ vim.keymap.set("n", "bo", dap.step_over, { desc = "debug: step over" }) vim.keymap.set("n", "bu", dap.step_out, { desc = "debug: step out" }) vim.keymap.set("n", "blb", dap.list_breakpoints, { desc = "debug: list breakpoints" }) vim.keymap.set("n", "bt", dap.toggle_breakpoint, { desc = "debug: toggle breakpoint" }) -vim.keymap.set("n", "bb", dap.set_breakpoint, { desc = "debug: set breakpoint" }) vim.keymap.set("n", "bB", function() dap.set_breakpoint(vim.fn.input("breakpoint condition: ")) end, { desc = "debug: set conditional breakpoint" }) +vim.keymap.set("n", "bv", function() + require("nvim-dap-virtual-text").toggle() +end, { desc = "debug: toggle virtual text" }) + vim.keymap.set("n", "bq", function() - dap.terminate() require("dapui").close() require("nvim-dap-virtual-text").toggle() + dap.terminate() require("dapui").close() require("nvim-dap-virtual-text").disable() end, { desc = "debug: quit debugger" }) -- TODO: decide if i want these or others, add if so @@ -121,8 +134,8 @@ local custom_grep_str_w_regex = function() end vim.keymap.set('n', 'ft', tscBuiltin.live_grep, { desc = 'tscope find text, live_grep' }) vim.keymap.set('n', 'fT', custom_grep_str_w_regex, { desc = 'tscope find text, static grep w/regex' }) -vim.keymap.set('n', 'fg', tscBuiltin.git_files, { desc = 'tscope find git-tracked files' }) vim.keymap.set('n', 'ff', tscBuiltin.find_files, { desc = 'tscope find files' }) +vim.keymap.set('n', 'fg', tscBuiltin.git_files, { desc = 'tscope find git-tracked files' }) vim.keymap.set('n', 'fb', tscBuiltin.buffers, { desc = 'tscope buffers' }) vim.keymap.set('n', 'fh', tscBuiltin.help_tags, { desc = 'tscope help tags' }) @@ -133,14 +146,18 @@ vim.keymap.set("n", "ha", function() harpoon:list():add() end) vim.keymap.set("n", "hA", function() harpoon:list():prepend() end) vim.keymap.set("n", "hn", function() harpoon:list():next() end) vim.keymap.set("n", "hp", function() harpoon:list():prev() end) + vim.keymap.set("n", "hz", function() harpoon:list():select(1) end) vim.keymap.set("n", "hx", function() harpoon:list():select(2) end) vim.keymap.set("n", "hc", function() harpoon:list():select(3) end) vim.keymap.set("n", "hv", function() harpoon:list():select(4) end) +vim.keymap.set("n", "hb", function() harpoon:list():select(5) end) + vim.keymap.set("n", "hZ", function() harpoon:list():replace_at(1) end) vim.keymap.set("n", "hX", function() harpoon:list():replace_at(2) end) vim.keymap.set("n", "hC", function() harpoon:list():replace_at(3) end) vim.keymap.set("n", "hV", function() harpoon:list():replace_at(4) end) +vim.keymap.set("n", "hB", function() harpoon:list():replace_at(5) end) -- undotree vim.keymap.set("n", "u", vim.cmd.UndotreeToggle) diff --git a/src_files/.config/nvim/lua/plugins_lazy/colorschemes.lua b/src_files/.config/nvim/lua/plugins_lazy/colorschemes.lua index 2ee9af9..b549cb9 100644 --- a/src_files/.config/nvim/lua/plugins_lazy/colorschemes.lua +++ b/src_files/.config/nvim/lua/plugins_lazy/colorschemes.lua @@ -70,4 +70,8 @@ return { require('bamboo').load() end, }, + { + dir = os.getenv('DIR_GIT_PROJECTS') .. "/other/omarchy-pina-theme/pina.nvim", + name = "pina", + }, } diff --git a/src_files/.config/nvim/lua/plugins_lazy/dap.lua b/src_files/.config/nvim/lua/plugins_lazy/dap.lua index 84fff75..5b70334 100644 --- a/src_files/.config/nvim/lua/plugins_lazy/dap.lua +++ b/src_files/.config/nvim/lua/plugins_lazy/dap.lua @@ -119,10 +119,5 @@ return { dependencies = { "mfussenegger/nvim-dap", }, - -- TODO: disabled by default, keymapping to toggle - -- config = function() - -- local dap_virtual_text = require("nvim-dap-virtual-text") - -- dap_virtual_text.setup() - -- end, }, } diff --git a/src_files/.config/nvim/lua/plugins_lazy/undotree.lua b/src_files/.config/nvim/lua/plugins_lazy/undotree.lua index 67aef8e..0c0ffee 100644 --- a/src_files/.config/nvim/lua/plugins_lazy/undotree.lua +++ b/src_files/.config/nvim/lua/plugins_lazy/undotree.lua @@ -1,3 +1,7 @@ return { "mbbill/undotree", + config = function() + vim.g.undotree_SplitWidth = 41 + vim.g.undotree_DiffpanelHeight = 14 + end, } diff --git a/src_files/.config/zsh/.zshenv b/src_files/.config/zsh/.zshenv index aa08ba2..ad1c004 100644 --- a/src_files/.config/zsh/.zshenv +++ b/src_files/.config/zsh/.zshenv @@ -5,10 +5,10 @@ export TERMINAL='ghostty' # env vars used for my organization structure export DIR_HOME_BOX="$HOME/dbox" -export DIR_MUSIC="$DIR_HOME_BOX/media/music" +export DIR_NOTES="$DIR_HOME_BOX/notes" +export DIR_MUSIC="$DIR_HOME_BOX/music/listen" export DIR_DEV="$HOME/dev" export DIR_GIT_PROJECTS="$DIR_DEV/git" -export DIR_NOTES="$DIR_HOME_BOX/notes" # util dirs; do not change without checking impact on xdg base dirs export DIR_LOCAL="$HOME/.local"