Compare commits
13 Commits
master
...
11d311dc5d
Author | SHA1 | Date | |
---|---|---|---|
|
11d311dc5d | ||
|
d6bed612d8 | ||
|
f82c4c7472 | ||
|
e884dc09e1 | ||
|
8db644bb0a | ||
|
1fab6dcf8e | ||
|
05fb14de24 | ||
|
60b42e4a14 | ||
|
b00ab02e0a | ||
|
b5b32cf017 | ||
|
9213bee290 | ||
|
fbd5e4214b | ||
|
3bdad1352c |
59
README.md
59
README.md
@@ -1,33 +1,44 @@
|
|||||||
# dotfiles, plus scripts for box setup
|
# repo containing configs and scripts to set up a box
|
||||||
|
|
||||||
### prereqs, linux distros
|
|
||||||
- zsh is installed (scripts are written for zsh)
|
|
||||||
- sudo access is configured for current user
|
|
||||||
|
|
||||||
### prereqs, macos
|
|
||||||
- zsh is installed (scripts are written for zsh)
|
|
||||||
- install the package manager, [homebrew](https://brew.sh/)
|
|
||||||
- for aerospace window manager, have only 1 workspace/desktop
|
|
||||||
- manual settings, refer to [macos-system-settings](ref/macos-system-settings.txt)
|
|
||||||
|
|
||||||
### script run
|
### script run
|
||||||
- if repo present on system, run from the repo's root:
|
- fulfill prerequisites below
|
||||||
- ```
|
- git clone this repo
|
||||||
./box_setup.sh <OS-name>
|
- from the repo's root directory, run `./box_setup <OS name>`
|
||||||
```
|
|
||||||
- if repo not present, run:
|
### prerequisites
|
||||||
- ```
|
- package manager is configured (i.e. source repos, mirrors, etc. configured)
|
||||||
curl -LO https://git.drinkingtea.net/david/box-setup/raw/branch/master/box_setup.sh
|
- zsh is installed (scripts are written for zsh)
|
||||||
sh box_setup.sh <OS-name>
|
- sudo access is configured for current user (as of 2025-01-27, not needed on macos)
|
||||||
```
|
- system-specific items below are fulfilled
|
||||||
- then delete the script file afterwards (repo should have been copied to dev dir)
|
|
||||||
|
##### prereqs, os specific, linux-placeholder
|
||||||
|
- (currently none)
|
||||||
|
|
||||||
|
##### prereqs, os specific, macos
|
||||||
|
- install the package manager, [homebrew](https://brew.sh/)
|
||||||
|
- for yabai window manager (so as to not mess with SIP settings)
|
||||||
|
- create 9 spaces/desktops
|
||||||
|
- system settings > keyboard shortcuts: set keys to switch between spaces/desktops
|
||||||
|
- system settings > desktop/dock/mission-control:
|
||||||
|
- `click wallpaper to reveal desktop`: set to "only in stage manager"
|
||||||
|
- all `drag windows to corner/edge/place` types of options: disabled
|
||||||
|
- `rearrange spaces based on recent use`: disabled
|
||||||
|
- `when switch to app... switch to space with open windows of app`: disabled
|
||||||
|
- `displays have separate spaces`: enabled
|
||||||
|
- `show files on desktop`: enabled
|
||||||
|
|
||||||
### todo items
|
### todo items
|
||||||
- choose window manager for linux, then configure
|
- add logic to the main run script to handle cloning of this repo
|
||||||
- config for: terminal (ghostty); shell; mpd, mpc, ncmpcpp; mpv
|
- config for window manager for linux (first, decide which wm to use)
|
||||||
|
- config for terminal emulator (currently ghostty)
|
||||||
|
- config for mpd, mpc, ncmpcpp
|
||||||
|
- config for mpv
|
||||||
- config for gimp, `src_files/.config/GIMP` (dir)
|
- config for gimp, `src_files/.config/GIMP` (dir)
|
||||||
- set things in gtkrc only? still need to nest that within a sub dir?
|
- set things in gtkrc only? still need to nest that within a sub dir?
|
||||||
- or configure in gimp, copy resulting dir to `src_files/.config/GIMP`, call it a day
|
- or configure in gimp, copy resulting dir to `src_files/.config/GIMP`, call it a day
|
||||||
|
- maybe build in flags/logic for skipping certain installs/builds (and maybe configs?)
|
||||||
|
on a given system (i.e. don't install on a company box, on a server, etc.)
|
||||||
- decide on and implement approach for languages and versioning
|
- decide on and implement approach for languages and versioning
|
||||||
- language-specific? asdf? no, not asdf, mise seems better from what i hear so far
|
- asdf, or language-specific version managers?
|
||||||
- docker? or alternatives like podman? any license concerns?
|
- docker? or alternatives like podman? any license concerns?
|
||||||
|
- hybrid of the above?
|
||||||
|
42
box_setup
Executable file
42
box_setup
Executable file
@@ -0,0 +1,42 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
|
||||||
|
[[ -z $1 ]] &&
|
||||||
|
echo "OS must be passed as an arg (options: arch, artix, debian, macos)" &&
|
||||||
|
echo "example: ./box_setup arch" &&
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
# set env vars for installs
|
||||||
|
local install_cmd=''
|
||||||
|
local update_pkg_manager_and_defs_cmd=''
|
||||||
|
local update_pkgs_cmd=''
|
||||||
|
case $1 in
|
||||||
|
(arch | artix)
|
||||||
|
install_cmd="sudo pacman -S"
|
||||||
|
update_pkg_manager_and_defs_cmd='' # don't; update system instead?
|
||||||
|
update_pkgs_cmd='sudo pacman -Syu'
|
||||||
|
;;
|
||||||
|
(debian)
|
||||||
|
install_cmd="sudo apt install"
|
||||||
|
update_pkg_manager_and_defs_cmd='sudo apt update'
|
||||||
|
update_pkgs_cmd='sudo apt upgrade'
|
||||||
|
;;
|
||||||
|
(macos)
|
||||||
|
install_cmd="brew install"
|
||||||
|
update_pkg_manager_and_defs_cmd='brew update'
|
||||||
|
update_pkgs_cmd='brew upgrade'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
export BOX_SETUP_INSTALL_COMMAND="$install_cmd"
|
||||||
|
export BOX_SETUP_UPDATE_PKG_MANAGER_AND_DEFS_CMD="$update_pkg_manager_and_defs_cmd"
|
||||||
|
export BOX_SETUP_UPDATE_PKGS_CMD="$update_pkgs_cmd"
|
||||||
|
|
||||||
|
# make dirs and copy configs/dotfiles
|
||||||
|
source ./src_files/.config/zsh/.zshenv
|
||||||
|
./make_dirs
|
||||||
|
./copy_configs
|
||||||
|
|
||||||
|
# install programs
|
||||||
|
source $ZDOTDIR/.zshenv
|
||||||
|
source $ZDOTDIR/.zshrc
|
||||||
|
./install_programs
|
67
box_setup.sh
67
box_setup.sh
@@ -1,67 +0,0 @@
|
|||||||
#!/bin/zsh
|
|
||||||
|
|
||||||
[[ -z $1 ]] && {
|
|
||||||
echo "OS must be passed as an arg, run \`./box_setup.sh --help\` for more info"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
[[ $1 = "--help" ]] && {
|
|
||||||
echo "usage: ./box_setup.sh <OS-name> [system-type]\n"
|
|
||||||
echo "OS-name options: arch, artix, debian, macos"
|
|
||||||
echo "system-type options: personal, studio-music, work-placeholder\n"
|
|
||||||
echo "examples:\n./box_setup.sh arch studio-music\n./box_setup.sh macos\n"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# TODO: test this git stuff, see if it works
|
|
||||||
temp_placement_git_dir="no"
|
|
||||||
[[ ! -d ".git" && "$(basename $(pwd))" != "box-setup" ]] && {
|
|
||||||
temp_placement_git_dir="yes"
|
|
||||||
git clone "https://git.drinkingtea.net/david/box-setup.git" || {
|
|
||||||
echo "failed to clone box-setup git repo"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
pushd box-setup > /dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
# set env vars for installs
|
|
||||||
install_cmd=''
|
|
||||||
update_pkg_manager_and_defs_cmd=''
|
|
||||||
update_pkgs_cmd=''
|
|
||||||
case $1 in
|
|
||||||
(arch | artix)
|
|
||||||
install_cmd="sudo pacman -S"
|
|
||||||
update_pkg_manager_and_defs_cmd='' # don't; update system instead?
|
|
||||||
update_pkgs_cmd='sudo pacman -Syu'
|
|
||||||
;;
|
|
||||||
(debian)
|
|
||||||
install_cmd="sudo apt install"
|
|
||||||
update_pkg_manager_and_defs_cmd='sudo apt update'
|
|
||||||
update_pkgs_cmd='sudo apt upgrade'
|
|
||||||
;;
|
|
||||||
(macos)
|
|
||||||
install_cmd="brew install"
|
|
||||||
update_pkg_manager_and_defs_cmd='brew update'
|
|
||||||
update_pkgs_cmd='brew upgrade'
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
export BOX_SETUP_INSTALL_COMMAND="$install_cmd"
|
|
||||||
export BOX_SETUP_UPDATE_PKG_MANAGER_AND_DEFS_CMD="$update_pkg_manager_and_defs_cmd"
|
|
||||||
export BOX_SETUP_UPDATE_PKGS_CMD="$update_pkgs_cmd"
|
|
||||||
|
|
||||||
# make dirs and copy configs/dotfiles
|
|
||||||
source ./src_files/.config/zsh/.zshenv
|
|
||||||
./make_dirs.sh
|
|
||||||
./copy_configs.sh $2
|
|
||||||
|
|
||||||
# install programs
|
|
||||||
source $ZDOTDIR/.zshenv
|
|
||||||
source $ZDOTDIR/.zshrc
|
|
||||||
./install_programs.sh $2
|
|
||||||
|
|
||||||
[[ $temp_placement_git_dir == "yes" ]] && {
|
|
||||||
popd > /dev/null
|
|
||||||
mv "box-setup" "$DIR_GIT_PROJECTS/me/"
|
|
||||||
}
|
|
@@ -35,7 +35,7 @@ link_dir() {
|
|||||||
ln -s $src_dir $link_dir
|
ln -s $src_dir $link_dir
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "---- copying dotfiles ------------------------------------------------"
|
echo "---- copying dotfiles -------------------------"
|
||||||
|
|
||||||
copy_file src_files/.config/zsh/.zshenv $HOME # duplicate, copy anyway, ensures $ZDOTDIR
|
copy_file src_files/.config/zsh/.zshenv $HOME # duplicate, copy anyway, ensures $ZDOTDIR
|
||||||
|
|
||||||
@@ -43,12 +43,7 @@ copy_dir src_files/.config $XDG_CONFIG_HOME
|
|||||||
copy_dir src_files/.local/bin $DIR_BIN
|
copy_dir src_files/.local/bin $DIR_BIN
|
||||||
copy_dir src_files/.local/scripts $DIR_SCRIPTS
|
copy_dir src_files/.local/scripts $DIR_SCRIPTS
|
||||||
|
|
||||||
[[ "$BOX_SETUP_OS" = "macos" ]] && {
|
# on macos, gimp defaults to app-support, so sym-link to actual config
|
||||||
copy_dir src_files/executable_wrappers_macos $DIR_BIN
|
[[ "$BOX_SETUP_OS" = "macos" ]] &&
|
||||||
link_dir "$XDG_CONFIG_HOME/GIMP" "$HOME/Library/Application Support/GIMP"
|
link_dir "$XDG_CONFIG_HOME/GIMP" "$HOME/Library/Application Support/GIMP"
|
||||||
}
|
|
||||||
|
|
||||||
# [[ $1 = "studio-music" ]] &&
|
|
||||||
# [[ "$BOX_SETUP_OS" = "macos" ]] &&
|
|
||||||
# link_dir "$XDG_CONFIG_HOME/REAPER" "$HOME/Library/Application Support/REAPER" && # TODO: get reaper config set up
|
|
||||||
|
|
22
install_programs
Executable file
22
install_programs
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
|
||||||
|
local single_script_filter=""
|
||||||
|
|
||||||
|
while [[ $# > 0 ]]; do
|
||||||
|
single_script_filter="$1" # if using param, export BOX_SETUP_OS first if needed
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "---- installing programs ----------------------"
|
||||||
|
|
||||||
|
local scripts=$(find ./installs_and_builds -maxdepth 1 -mindepth 1 -type f | sort)
|
||||||
|
for script in ${=scripts}; do
|
||||||
|
if [[ -x $script ]]; then
|
||||||
|
if echo "$script" | grep -qv "$single_script_filter"; then
|
||||||
|
continue # $single_script_filter set, ignore others
|
||||||
|
fi
|
||||||
|
echo "executing: $script"
|
||||||
|
./$script
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
@@ -1,34 +0,0 @@
|
|||||||
#!/bin/zsh
|
|
||||||
|
|
||||||
find_scripts_in_dir() {
|
|
||||||
echo $(find $1 -maxdepth 1 -mindepth 1 -type f | sort)
|
|
||||||
}
|
|
||||||
|
|
||||||
install_scripts_from_list() {
|
|
||||||
for script in $@; do
|
|
||||||
if [[ -x $script ]]; then
|
|
||||||
echo "executing: $script"
|
|
||||||
./$script
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
system_types_list="base"
|
|
||||||
scripts_from_dir=($(find_scripts_in_dir "./installs_and_builds"))
|
|
||||||
[[ $1 = "personal" ]] && {
|
|
||||||
system_types_list+=", personal"
|
|
||||||
scripts_from_dir+=($(find_scripts_in_dir "./installs_and_builds/personal"))
|
|
||||||
}
|
|
||||||
[[ $1 = "studio-music" ]] && {
|
|
||||||
system_types_list+=", studio-music"
|
|
||||||
scripts_from_dir+=($(find_scripts_in_dir "./installs_and_builds/studio_music"))
|
|
||||||
}
|
|
||||||
[[ $1 = "work-placeholder" ]] && {
|
|
||||||
system_types_list+=", work-placeholder"
|
|
||||||
scripts_from_dir+=($(find_scripts_in_dir "./installs_and_builds/work_placeholder"))
|
|
||||||
}
|
|
||||||
|
|
||||||
echo "---- installing programs ---------------------------------------------"
|
|
||||||
echo "-------- for system types: $system_types_list"
|
|
||||||
install_scripts_from_list "${scripts_from_dir[@]}"
|
|
||||||
|
|
@@ -1,17 +1,17 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
install_neovim_dir=$HOME/.local/build/neovim
|
local neovim_dir=$HOME/.local/build/neovim
|
||||||
install_neovim_version="v0.10.3"
|
local neovim_version="v0.10.3"
|
||||||
[ ! -z $NVIM_VERSION ] && install_neovim_version="$NVIM_VERSION"
|
[ ! -z $NVIM_VERSION ] && neovim_version="$NVIM_VERSION"
|
||||||
echo "install_neovim_version: \"$install_neovim_version\""
|
echo "neovim_version: \"$neovim_version\""
|
||||||
|
|
||||||
[ ! -d $install_neovim_dir ] && git clone https://github.com/neovim/neovim.git $install_neovim_dir
|
[ ! -d $neovim_dir ] && git clone https://github.com/neovim/neovim.git $neovim_dir
|
||||||
git -C $install_neovim_dir fetch --all
|
git -C $neovim_dir fetch --all
|
||||||
git -C $install_neovim_dir checkout $install_neovim_version
|
git -C $neovim_dir checkout $neovim_version
|
||||||
|
|
||||||
make -C $install_neovim_dir clean
|
make -C $neovim_dir clean
|
||||||
make -C $install_neovim_dir CMAKE_BUILD_TYPE=RelWithDebInfo
|
make -C $neovim_dir CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||||
sudo make -C $install_neovim_dir install
|
sudo make -C $neovim_dir install
|
||||||
|
|
||||||
# from primeagen's dev repo, uncomment/edit as needed
|
# from primeagen's dev repo, uncomment/edit as needed
|
||||||
# git clone https://github.com/ThePrimeagen/harpoon.git $HOME/personal/harpoon
|
# git clone https://github.com/ThePrimeagen/harpoon.git $HOME/personal/harpoon
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
install_option_prefix=''
|
local option_prefix=''
|
||||||
[[ "$BOX_SETUP_OS" = "macos" ]] && install_option_prefix='--cask'
|
[[ "$BOX_SETUP_OS" = "macos" ]] && option_prefix='--cask'
|
||||||
# NOTE: ghostty not currently in debian repos, maybe build from source
|
# NOTE: ghostty not currently in debian repos, maybe build from source
|
||||||
${=BOX_SETUP_INSTALL_COMMAND} "$install_option_prefix" ghostty
|
${=BOX_SETUP_INSTALL_COMMAND} "$option_prefix" ghostty
|
||||||
|
@@ -1,18 +1,18 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
linux_wm_and_utils() {
|
local linux_wm_and_utils() {
|
||||||
# TODO: pick wm for linux; options: dwm, i3, others?
|
# TODO: pick wm for linux; options: dwm, i3, others?
|
||||||
echo "linux_wm_and_utils not yet implemented"
|
echo "linux_wm_and_utils not yet implemented"
|
||||||
}
|
}
|
||||||
|
|
||||||
macos_wm_and_utils() {
|
local macos_wm_and_utils() {
|
||||||
|
brew install koekeishiya/formulae/yabai
|
||||||
brew install koekeishiya/formulae/skhd
|
brew install koekeishiya/formulae/skhd
|
||||||
skhd --start-service
|
skhd --start-service
|
||||||
|
yabai --start-service
|
||||||
sleep 14 # time to give permission in accessibility settings
|
sleep 14 # time to give permission in accessibility settings
|
||||||
skhd --restart-service
|
skhd --restart-service
|
||||||
|
yabai --restart-service
|
||||||
# NOTE: currently, aerospace seems to need system restart to take effect
|
|
||||||
brew install --cask nikitabobko/tap/aerospace
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[[ "$BOX_SETUP_OS" = "macos" ]] && macos_wm_and_utils || linux_wm_and_utils
|
[[ "$BOX_SETUP_OS" = "macos" ]] && macos_wm_and_utils || linux_wm_and_utils
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
# TODO: replace firefox with brave or another browser
|
# TODO: replace firefox with brave or another browser
|
||||||
# install_option_prefix=''
|
# local option_prefix=''
|
||||||
# [[ "$BOX_SETUP_OS" = "macos" ]] && install_option_prefix='--cask'
|
# [[ "$BOX_SETUP_OS" = "macos" ]] && option_prefix='--cask'
|
||||||
# firefox_package_name='firefox'
|
# local firefox_package_name='firefox'
|
||||||
# [[ "$BOX_SETUP_OS" = "debian" ]] && firefox_package_name='firefox-esr'
|
# [[ "$BOX_SETUP_OS" = "debian" ]] && firefox_package_name='firefox-esr'
|
||||||
# ${=BOX_SETUP_INSTALL_COMMAND} "$install_option_prefix" "$firefox_package_name"
|
# ${=BOX_SETUP_INSTALL_COMMAND} "$option_prefix" "$firefox_package_name"
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
# only audio editor(s) in this file; daws are handled separately
|
# only audio editor(s) in this file; daws are handled separately
|
||||||
install_option_prefix=''
|
local option_prefix=''
|
||||||
[[ "$BOX_SETUP_OS" = "macos" ]] && install_option_prefix='--cask'
|
[[ "$BOX_SETUP_OS" = "macos" ]] && option_prefix='--cask'
|
||||||
${=BOX_SETUP_INSTALL_COMMAND} "$install_option_prefix" audacity
|
${=BOX_SETUP_INSTALL_COMMAND} "$option_prefix" audacity
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
install_option_prefix=''
|
local option_prefix=''
|
||||||
[[ "$BOX_SETUP_OS" = "macos" ]] && install_option_prefix='--cask'
|
[[ "$BOX_SETUP_OS" = "macos" ]] && option_prefix='--cask'
|
||||||
${=BOX_SETUP_INSTALL_COMMAND} "$install_option_prefix" gimp
|
${=BOX_SETUP_INSTALL_COMMAND} "$option_prefix" gimp
|
||||||
|
|
||||||
# ${=BOX_SETUP_INSTALL_COMMAND} imagemagick # TODO: consider this program too
|
# ${=BOX_SETUP_INSTALL_COMMAND} imagemagick # TODO: consider this program too
|
||||||
|
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
# TODO: review and decide if the things below are needed
|
# TODO: review and decide if the things below are needed
|
||||||
|
|
||||||
# install_lua_package="lua5.1"
|
#local lua_package="lua5.1"
|
||||||
#[[ "$BOX_SETUP_OS" = "macos" ]] && install_lua_package="lua@5.1"
|
#[[ "$BOX_SETUP_OS" = "macos" ]] && lua_package="lua@5.1"
|
||||||
|
|
||||||
#${=BOX_SETUP_INSTALL_COMMAND} "$install_lua_package" liblua5.1-0-dev
|
#${=BOX_SETUP_INSTALL_COMMAND} "$lua_package" liblua5.1-0-dev
|
||||||
|
|
||||||
# TODO: do i want to install luarocks? lazy.nvim plugin manager currently expects it
|
# TODO: do i want to install luarocks? lazy.nvim plugin manager currently expects it
|
||||||
#luarocks install luacheck
|
#luarocks install luacheck
|
||||||
|
@@ -17,10 +17,7 @@ source ./src_files/.config/zsh/.zshenv # ensure env vars set for use below
|
|||||||
|
|
||||||
# dirs for how i'm organizing my system
|
# dirs for how i'm organizing my system
|
||||||
[[ ! -d "$DIR_HOME_BOX" ]] && mkdir $DIR_HOME_BOX
|
[[ ! -d "$DIR_HOME_BOX" ]] && mkdir $DIR_HOME_BOX
|
||||||
[[ ! -d "$DIR_MUSIC" ]] && mkdir $DIR_MUSIC
|
|
||||||
[[ ! -d "$DIR_DEV" ]] && mkdir $DIR_DEV
|
[[ ! -d "$DIR_DEV" ]] && mkdir $DIR_DEV
|
||||||
[[ ! -d "$DIR_GIT_PROJECTS" ]] && mkdir $DIR_GIT_PROJECTS
|
[[ ! -d "$DIR_DEV/git" ]] && mkdir $DIR_DEV/git
|
||||||
[[ ! -d "$DIR_GIT_PROJECTS/me" ]] && mkdir $DIR_DEV/git/me
|
[[ ! -d "$DIR_DEV/git/me" ]] && mkdir $DIR_DEV/git/me
|
||||||
[[ ! -d "$DIR_GIT_PROJECTS/other" ]] && mkdir $DIR_DEV/git/other
|
[[ ! -d "$DIR_DEV/git/other" ]] && mkdir $DIR_DEV/git/other
|
||||||
[[ ! -d "$DIR_SCRATCH_NOTES" ]] && mkdir -p $DIR_SCRATCH_NOTES
|
|
||||||
[[ ! -d "$DIR_SCRATCH_DRAWINGS" ]] && mkdir -p $DIR_SCRATCH_DRAWINGS
|
|
@@ -1,14 +0,0 @@
|
|||||||
// settings for manual configuration in macos system settings app
|
|
||||||
// NOTE: some of these could be scripted, but for now i'm okay with this manual list
|
|
||||||
|
|
||||||
- desktop/dock/mission-control:
|
|
||||||
- `click wallpaper to reveal desktop`: set to "only in stage manager"
|
|
||||||
- all `drag windows to corner/edge/place` types of options: disabled
|
|
||||||
- `rearrange spaces based on recent use`: disabled
|
|
||||||
- `when switch to app... switch to space with open windows of app`: disabled
|
|
||||||
- `displays have separate spaces`: disabled
|
|
||||||
- `show files on desktop`: enabled
|
|
||||||
- `group windows by application`: enabled
|
|
||||||
|
|
||||||
- in general, just go through most pages/options and set them as desired
|
|
||||||
|
|
@@ -1,24 +0,0 @@
|
|||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// idea from the primeagen, designated label/workspace/desktop per app/purpose
|
|
||||||
|
|
||||||
// current layout/plan // wm default layout/mode
|
|
||||||
1. drawing/thinking (scratch pads for text and images) stack (fullscreen)
|
|
||||||
2. music makeing - misc stack (fullscreen)
|
|
||||||
3. music making - daw floating
|
|
||||||
4. music/audio listening stack (fullscreen)
|
|
||||||
5. general misc (catch-all) stack (fullscreen)
|
|
||||||
6. comms (email, chats, etc) stack (fullscreen)
|
|
||||||
7. dev - misc stack (fullscreen)
|
|
||||||
8. terminal (primary, but audio/one-off/etc can be anywhere) stack (fullscreen)
|
|
||||||
9. web browser stack (fullscreen)
|
|
||||||
|
|
||||||
// ideas/guidelines:
|
|
||||||
- use this consistently accross all machines
|
|
||||||
- if something not applicable for a given machine, just don't have apps or screens
|
|
||||||
present, but maintain absolute position/numbering of each screen
|
|
||||||
- structure the above so that programs which i'm likely to use with one hand off of the
|
|
||||||
keyboard (i.e. to use a trackpad, mouse, stylus, etc) are on the screens that allow
|
|
||||||
for one hand (i.e. the one still on the keyboard) to navigate those screens
|
|
||||||
- for me, using peripherals with right hand, so put programs likely to be used with
|
|
||||||
peripherals where my left hand can switch to them single-handedly (screens 1 to 5)
|
|
||||||
|
|
@@ -1,129 +0,0 @@
|
|||||||
# options commands : https://nikitabobko.github.io/AeroSpace/commands
|
|
||||||
after-startup-command = []
|
|
||||||
start-at-login = true # start aerospace at login
|
|
||||||
|
|
||||||
# ref: https://nikitabobko.github.io/AeroSpace/guide#normalization
|
|
||||||
enable-normalization-flatten-containers = true
|
|
||||||
enable-normalization-opposite-orientation-for-nested-containers = true
|
|
||||||
|
|
||||||
accordion-padding = 0 # ref: https://nikitabobko.github.io/AeroSpace/guide#layouts
|
|
||||||
|
|
||||||
default-root-container-layout = 'accordion' # tiles|accordion
|
|
||||||
default-root-container-orientation = 'auto' # horizontal|vertical|auto
|
|
||||||
|
|
||||||
# refs: https://nikitabobko.github.io/AeroSpace/guide#on-focus-changed-callbacks
|
|
||||||
# https://nikitabobko.github.io/AeroSpace/commands#move-mouse
|
|
||||||
on-focused-monitor-changed = ['move-mouse monitor-lazy-center']
|
|
||||||
|
|
||||||
# ref: https://nikitabobko.github.io/AeroSpace/goodies#disable-hide-app
|
|
||||||
automatically-unhide-macos-hidden-apps = true
|
|
||||||
|
|
||||||
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
|
|
||||||
[key-mapping]
|
|
||||||
preset = 'qwerty' # qwerty|dvorak|colemak
|
|
||||||
|
|
||||||
# ref: https://nikitabobko.github.io/AeroSpace/guide#assign-workspaces-to-monitors
|
|
||||||
# gaps between windows (inner-*) and between monitor edges (outer-*).
|
|
||||||
[gaps]
|
|
||||||
inner.horizontal = 0
|
|
||||||
inner.vertical = 0
|
|
||||||
outer.left = 0
|
|
||||||
outer.bottom = 0
|
|
||||||
outer.top = 0
|
|
||||||
outer.right = 0
|
|
||||||
|
|
||||||
# 'main' binding mode; ref: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
|
|
||||||
[mode.main.binding] # 'main' binding mode must be always presented
|
|
||||||
# All possible keys:
|
|
||||||
# - Letters. a, b, c, ..., z
|
|
||||||
# - Numbers. 0, 1, 2, ..., 9
|
|
||||||
# - Keypad numbers. keypad0, keypad1, keypad2, ..., keypad9
|
|
||||||
# - F-keys. f1, f2, ..., f20
|
|
||||||
# - Special keys. minus, equal, period, comma, slash, backslash, quote, semicolon,
|
|
||||||
# backtick, leftSquareBracket, rightSquareBracket, space, enter, esc,
|
|
||||||
# backspace, tab, pageUp, pageDown, home, end, forwardDelete,
|
|
||||||
# sectionSign (ISO keyboards only, european keyboards only)
|
|
||||||
# - Keypad special. keypadClear, keypadDecimalMark, keypadDivide, keypadEnter, keypadEqual,
|
|
||||||
# keypadMinus, keypadMultiply, keypadPlus
|
|
||||||
# - Arrows. left, down, up, right
|
|
||||||
|
|
||||||
# All possible modifiers: cmd, alt, ctrl, shift
|
|
||||||
# All possible commands: https://nikitabobko.github.io/AeroSpace/commands
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#exec-and-forget
|
|
||||||
# You can uncomment the following lines to open up terminal with alt + enter shortcut
|
|
||||||
# (like in i3)
|
|
||||||
# alt-enter = '''exec-and-forget osascript -e '
|
|
||||||
# tell application "Terminal"
|
|
||||||
# do script
|
|
||||||
# activate
|
|
||||||
# end tell'
|
|
||||||
# '''
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#layout
|
|
||||||
alt-slash = 'layout tiles horizontal vertical'
|
|
||||||
alt-comma = 'layout accordion horizontal vertical'
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#focus
|
|
||||||
alt-j = 'focus down'
|
|
||||||
alt-k = 'focus up'
|
|
||||||
# bindings: alt-l -> ctrl-tab, alt-h -> ctrl-shift-tab
|
|
||||||
# alt-l = "exec-and-forget osascript -e 'tell application \"System Events\" to key code 48 using control down'"
|
|
||||||
# alt-h = "exec-and-forget osascript -e 'tell application \"System Events\" to key code 48 using {control down, shift down}'"
|
|
||||||
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#move
|
|
||||||
alt-shift-h = 'move left'
|
|
||||||
alt-shift-j = 'move down'
|
|
||||||
alt-shift-k = 'move up'
|
|
||||||
alt-shift-l = 'move right'
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#resize
|
|
||||||
alt-minus = 'resize smart -50'
|
|
||||||
alt-equal = 'resize smart +50'
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
|
|
||||||
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'
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
|
|
||||||
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'
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#mode
|
|
||||||
alt-shift-semicolon = 'mode service'
|
|
||||||
|
|
||||||
# 'service' binding mode declaration.
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
|
|
||||||
[mode.service.binding]
|
|
||||||
esc = ['reload-config', 'mode main']
|
|
||||||
backspace = ['close-all-windows-but-current', 'mode main']
|
|
||||||
|
|
||||||
r = ['flatten-workspace-tree', 'mode main'] # reset layout
|
|
||||||
f = ['flatten-workspace-tree', 'layout floating', 'mode main']
|
|
||||||
t = ['flatten-workspace-tree', 'layout tiling', 'mode main']
|
|
||||||
s = ['layout v_accordion', 'mode main']
|
|
||||||
g = ['layout v_tiles', 'mode main']
|
|
||||||
|
|
||||||
alt-shift-h = ['join-with left', 'mode main']
|
|
||||||
alt-shift-j = ['join-with down', 'mode main']
|
|
||||||
alt-shift-k = ['join-with up', 'mode main']
|
|
||||||
alt-shift-l = ['join-with right', 'mode main']
|
|
||||||
|
|
||||||
down = 'volume down'
|
|
||||||
up = 'volume up'
|
|
||||||
shift-down = ['volume set 0', 'mode main']
|
|
@@ -1,206 +0,0 @@
|
|||||||
# Place a copy of this config to ~/.aerospace.toml
|
|
||||||
# After that, you can edit ~/.aerospace.toml to your liking
|
|
||||||
|
|
||||||
# You can use it to add commands that run after AeroSpace startup.
|
|
||||||
# Available commands : https://nikitabobko.github.io/AeroSpace/commands
|
|
||||||
after-startup-command = []
|
|
||||||
|
|
||||||
# Start AeroSpace at login
|
|
||||||
start-at-login = false
|
|
||||||
|
|
||||||
# Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization
|
|
||||||
enable-normalization-flatten-containers = true
|
|
||||||
enable-normalization-opposite-orientation-for-nested-containers = true
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/guide#layouts
|
|
||||||
# The 'accordion-padding' specifies the size of accordion padding
|
|
||||||
# You can set 0 to disable the padding feature
|
|
||||||
accordion-padding = 30
|
|
||||||
|
|
||||||
# Possible values: tiles|accordion
|
|
||||||
default-root-container-layout = 'tiles'
|
|
||||||
|
|
||||||
# Possible values: horizontal|vertical|auto
|
|
||||||
# 'auto' means: wide monitor (anything wider than high) gets horizontal orientation,
|
|
||||||
# tall monitor (anything higher than wide) gets vertical orientation
|
|
||||||
default-root-container-orientation = 'auto'
|
|
||||||
|
|
||||||
# Mouse follows focus when focused monitor changes
|
|
||||||
# Drop it from your config, if you don't like this behavior
|
|
||||||
# See https://nikitabobko.github.io/AeroSpace/guide#on-focus-changed-callbacks
|
|
||||||
# See https://nikitabobko.github.io/AeroSpace/commands#move-mouse
|
|
||||||
# Fallback value (if you omit the key): on-focused-monitor-changed = []
|
|
||||||
on-focused-monitor-changed = ['move-mouse monitor-lazy-center']
|
|
||||||
|
|
||||||
# You can effectively turn off macOS "Hide application" (cmd-h) feature by toggling this flag
|
|
||||||
# Useful if you don't use this macOS feature, but accidentally hit cmd-h or cmd-alt-h key
|
|
||||||
# Also see: https://nikitabobko.github.io/AeroSpace/goodies#disable-hide-app
|
|
||||||
automatically-unhide-macos-hidden-apps = false
|
|
||||||
|
|
||||||
# Possible values: (qwerty|dvorak|colemak)
|
|
||||||
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
|
|
||||||
[key-mapping]
|
|
||||||
preset = 'qwerty'
|
|
||||||
|
|
||||||
# Gaps between windows (inner-*) and between monitor edges (outer-*).
|
|
||||||
# Possible values:
|
|
||||||
# - Constant: gaps.outer.top = 8
|
|
||||||
# - Per monitor: gaps.outer.top = [{ monitor.main = 16 }, { monitor."some-pattern" = 32 }, 24]
|
|
||||||
# In this example, 24 is a default value when there is no match.
|
|
||||||
# Monitor pattern is the same as for 'workspace-to-monitor-force-assignment'.
|
|
||||||
# See:
|
|
||||||
# https://nikitabobko.github.io/AeroSpace/guide#assign-workspaces-to-monitors
|
|
||||||
[gaps]
|
|
||||||
inner.horizontal = 0
|
|
||||||
inner.vertical = 0
|
|
||||||
outer.left = 0
|
|
||||||
outer.bottom = 0
|
|
||||||
outer.top = 0
|
|
||||||
outer.right = 0
|
|
||||||
|
|
||||||
# 'main' binding mode declaration
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
|
|
||||||
# 'main' binding mode must be always presented
|
|
||||||
# Fallback value (if you omit the key): mode.main.binding = {}
|
|
||||||
[mode.main.binding]
|
|
||||||
|
|
||||||
# All possible keys:
|
|
||||||
# - Letters. a, b, c, ..., z
|
|
||||||
# - Numbers. 0, 1, 2, ..., 9
|
|
||||||
# - Keypad numbers. keypad0, keypad1, keypad2, ..., keypad9
|
|
||||||
# - F-keys. f1, f2, ..., f20
|
|
||||||
# - Special keys. minus, equal, period, comma, slash, backslash, quote, semicolon,
|
|
||||||
# backtick, leftSquareBracket, rightSquareBracket, space, enter, esc,
|
|
||||||
# backspace, tab, pageUp, pageDown, home, end, forwardDelete,
|
|
||||||
# sectionSign (ISO keyboards only, european keyboards only)
|
|
||||||
# - Keypad special. keypadClear, keypadDecimalMark, keypadDivide, keypadEnter, keypadEqual,
|
|
||||||
# keypadMinus, keypadMultiply, keypadPlus
|
|
||||||
# - Arrows. left, down, up, right
|
|
||||||
|
|
||||||
# All possible modifiers: cmd, alt, ctrl, shift
|
|
||||||
|
|
||||||
# All possible commands: https://nikitabobko.github.io/AeroSpace/commands
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#exec-and-forget
|
|
||||||
# You can uncomment the following lines to open up terminal with alt + enter shortcut
|
|
||||||
# (like in i3)
|
|
||||||
# alt-enter = '''exec-and-forget osascript -e '
|
|
||||||
# tell application "Terminal"
|
|
||||||
# do script
|
|
||||||
# activate
|
|
||||||
# end tell'
|
|
||||||
# '''
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#layout
|
|
||||||
alt-slash = 'layout tiles horizontal vertical'
|
|
||||||
alt-comma = 'layout accordion horizontal vertical'
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#focus
|
|
||||||
alt-h = 'focus left'
|
|
||||||
alt-j = 'focus down'
|
|
||||||
alt-k = 'focus up'
|
|
||||||
alt-l = 'focus right'
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#move
|
|
||||||
alt-shift-h = 'move left'
|
|
||||||
alt-shift-j = 'move down'
|
|
||||||
alt-shift-k = 'move up'
|
|
||||||
alt-shift-l = 'move right'
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#resize
|
|
||||||
alt-minus = 'resize smart -50'
|
|
||||||
alt-equal = 'resize smart +50'
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace
|
|
||||||
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-a = 'workspace A' # In your config, you can drop workspace bindings that you don't need
|
|
||||||
alt-b = 'workspace B'
|
|
||||||
alt-c = 'workspace C'
|
|
||||||
alt-d = 'workspace D'
|
|
||||||
alt-e = 'workspace E'
|
|
||||||
alt-f = 'workspace F'
|
|
||||||
alt-g = 'workspace G'
|
|
||||||
alt-i = 'workspace I'
|
|
||||||
alt-m = 'workspace M'
|
|
||||||
alt-n = 'workspace N'
|
|
||||||
alt-o = 'workspace O'
|
|
||||||
alt-p = 'workspace P'
|
|
||||||
alt-q = 'workspace Q'
|
|
||||||
alt-r = 'workspace R'
|
|
||||||
alt-s = 'workspace S'
|
|
||||||
alt-t = 'workspace T'
|
|
||||||
alt-u = 'workspace U'
|
|
||||||
alt-v = 'workspace V'
|
|
||||||
alt-w = 'workspace W'
|
|
||||||
alt-x = 'workspace X'
|
|
||||||
alt-y = 'workspace Y'
|
|
||||||
alt-z = 'workspace Z'
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#move-node-to-workspace
|
|
||||||
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-a = 'move-node-to-workspace A'
|
|
||||||
alt-shift-b = 'move-node-to-workspace B'
|
|
||||||
alt-shift-c = 'move-node-to-workspace C'
|
|
||||||
alt-shift-d = 'move-node-to-workspace D'
|
|
||||||
alt-shift-e = 'move-node-to-workspace E'
|
|
||||||
alt-shift-f = 'move-node-to-workspace F'
|
|
||||||
alt-shift-g = 'move-node-to-workspace G'
|
|
||||||
alt-shift-i = 'move-node-to-workspace I'
|
|
||||||
alt-shift-m = 'move-node-to-workspace M'
|
|
||||||
alt-shift-n = 'move-node-to-workspace N'
|
|
||||||
alt-shift-o = 'move-node-to-workspace O'
|
|
||||||
alt-shift-p = 'move-node-to-workspace P'
|
|
||||||
alt-shift-q = 'move-node-to-workspace Q'
|
|
||||||
alt-shift-r = 'move-node-to-workspace R'
|
|
||||||
alt-shift-s = 'move-node-to-workspace S'
|
|
||||||
alt-shift-t = 'move-node-to-workspace T'
|
|
||||||
alt-shift-u = 'move-node-to-workspace U'
|
|
||||||
alt-shift-v = 'move-node-to-workspace V'
|
|
||||||
alt-shift-w = 'move-node-to-workspace W'
|
|
||||||
alt-shift-x = 'move-node-to-workspace X'
|
|
||||||
alt-shift-y = 'move-node-to-workspace Y'
|
|
||||||
alt-shift-z = 'move-node-to-workspace Z'
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#workspace-back-and-forth
|
|
||||||
alt-tab = 'workspace-back-and-forth'
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#move-workspace-to-monitor
|
|
||||||
alt-shift-tab = 'move-workspace-to-monitor --wrap-around next'
|
|
||||||
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/commands#mode
|
|
||||||
alt-shift-semicolon = 'mode service'
|
|
||||||
|
|
||||||
# 'service' binding mode declaration.
|
|
||||||
# See: https://nikitabobko.github.io/AeroSpace/guide#binding-modes
|
|
||||||
[mode.service.binding]
|
|
||||||
esc = ['reload-config', 'mode main']
|
|
||||||
r = ['flatten-workspace-tree', 'mode main'] # reset layout
|
|
||||||
f = ['layout floating tiling', 'mode main'] # Toggle between floating and tiling layout
|
|
||||||
backspace = ['close-all-windows-but-current', 'mode main']
|
|
||||||
|
|
||||||
# sticky is not yet supported https://github.com/nikitabobko/AeroSpace/issues/2
|
|
||||||
#s = ['layout sticky tiling', 'mode main']
|
|
||||||
|
|
||||||
alt-shift-h = ['join-with left', 'mode main']
|
|
||||||
alt-shift-j = ['join-with down', 'mode main']
|
|
||||||
alt-shift-k = ['join-with up', 'mode main']
|
|
||||||
alt-shift-l = ['join-with right', 'mode main']
|
|
||||||
|
|
||||||
down = 'volume down'
|
|
||||||
up = 'volume up'
|
|
||||||
shift-down = ['volume set 0', 'mode main']
|
|
@@ -2,6 +2,4 @@
|
|||||||
defaultBranch = master
|
defaultBranch = master
|
||||||
[user]
|
[user]
|
||||||
name = david
|
name = david
|
||||||
email = david@pinewoods.xyz
|
email = david@silverwolf.studio
|
||||||
[push]
|
|
||||||
autoSetupRemote = true
|
|
||||||
|
@@ -1,13 +1 @@
|
|||||||
local csGroup = vim.api.nvim_create_augroup("coreSettingsGroup", { clear = true })
|
require("david_standard")
|
||||||
local csgAutocmd = vim.api.nvim_create_autocmd
|
|
||||||
|
|
||||||
require("settings")
|
|
||||||
require("plugin_manager")
|
|
||||||
require("key_mappings")
|
|
||||||
require("colorscheme_settings")
|
|
||||||
|
|
||||||
csgAutocmd({"BufWritePre"}, {
|
|
||||||
group = csGroup,
|
|
||||||
pattern = "*",
|
|
||||||
command = [[%s/\s\+$//e]],
|
|
||||||
})
|
|
||||||
|
@@ -1,5 +0,0 @@
|
|||||||
return {
|
|
||||||
cmd = { 'clangd' },
|
|
||||||
root_markers = { '.clangd', 'compile_commands.json' },
|
|
||||||
filetypes = { 'c', 'cpp' },
|
|
||||||
}
|
|
@@ -6,7 +6,7 @@ function SetColorSchemeWrapper(scheme)
|
|||||||
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
|
||||||
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
|
||||||
end
|
end
|
||||||
SetColorSchemeWrapper("tokyonight-night")
|
SetColorSchemeWrapper()
|
||||||
|
|
||||||
-- TODO: get this working as desired for different file types
|
-- TODO: get this working as desired for different file types
|
||||||
-- local dsGroup = vim.api.nvim_create_augroup("DavidStandardGroup", { clear = false })
|
-- local dsGroup = vim.api.nvim_create_augroup("DavidStandardGroup", { clear = false })
|
33
src_files/.config/nvim/lua/david_standard/init.lua
Normal file
33
src_files/.config/nvim/lua/david_standard/init.lua
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
local dsGroup = vim.api.nvim_create_augroup("DavidStandardGroup", { clear = true })
|
||||||
|
local dsgAutocmd = vim.api.nvim_create_autocmd
|
||||||
|
|
||||||
|
require("david_standard.settings")
|
||||||
|
require("david_standard.key_mappings")
|
||||||
|
require("david_standard.plugin_config")
|
||||||
|
require("david_standard.plugin_key_mappings")
|
||||||
|
require("david_standard.colorscheme_settings")
|
||||||
|
require("david_standard.lsp_enables")
|
||||||
|
|
||||||
|
dsgAutocmd({"BufWritePre"}, {
|
||||||
|
group = dsGroup,
|
||||||
|
pattern = "*",
|
||||||
|
command = [[%s/\s\+$//e]],
|
||||||
|
})
|
||||||
|
|
||||||
|
-- TODO: put this into separate file(s) for lsp stuff? if so, pass in or make new autocmd
|
||||||
|
dsgAutocmd('LspAttach', {
|
||||||
|
group = dsGroup,
|
||||||
|
callback = function(e)
|
||||||
|
local opts = { buffer = e.buf }
|
||||||
|
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
||||||
|
vim.keymap.set("n", "K", 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>vdv", function() vim.diagnostic.open_float() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vdn", function() vim.diagnostic.goto_next() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vdp", function() vim.diagnostic.goto_prev() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vrl", function() vim.lsp.buf.references() end, opts)
|
||||||
|
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
|
||||||
|
end
|
||||||
|
})
|
52
src_files/.config/nvim/lua/david_standard/key_mappings.lua
Normal file
52
src_files/.config/nvim/lua/david_standard/key_mappings.lua
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
-- explore the directory of the current file (using netrw)
|
||||||
|
vim.keymap.set("n", "<leader>n", vim.cmd.Ex)
|
||||||
|
|
||||||
|
-- move selected lines up or down
|
||||||
|
vim.keymap.set("v", "J", ":m '>+1<CR>gv")
|
||||||
|
vim.keymap.set("v", "K", ":m '<-2<CR>gv")
|
||||||
|
|
||||||
|
-- vertically center cursor with half-page jumps iterating search results
|
||||||
|
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
||||||
|
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
||||||
|
vim.keymap.set("n", "n", "nzzzv")
|
||||||
|
vim.keymap.set("n", "N", "Nzzzv")
|
||||||
|
|
||||||
|
-- maintain cursor position after paragraph formatting
|
||||||
|
vim.keymap.set("n", "=ap", "ma=ap'a")
|
||||||
|
|
||||||
|
-- shortcuts for deleting into the void register
|
||||||
|
vim.keymap.set({ "n", "v" }, "<leader>d", "\"_d")
|
||||||
|
vim.keymap.set("x", "<leader>P", [["_dP]]) -- replace selected text, keep main register
|
||||||
|
|
||||||
|
-- shortcuts for using + register (system clipboard)
|
||||||
|
vim.keymap.set({ "n", "v" }, "<leader>y", [["+y]])
|
||||||
|
vim.keymap.set("n", "<leader>Y", [["+Y]])
|
||||||
|
vim.keymap.set("n", "<leader>p", [["+p]])
|
||||||
|
|
||||||
|
-- search-and-replace shortcuts
|
||||||
|
vim.keymap.set("n", "<leader>rw", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
|
||||||
|
vim.keymap.set("n", "<leader>ra", [[:%s//g<Left><Left>]])
|
||||||
|
|
||||||
|
-- toggle expandtab and show message
|
||||||
|
vim.keymap.set("n", "<leader>tab", function()
|
||||||
|
if vim.opt.expandtab:get() then
|
||||||
|
vim.opt.expandtab = false
|
||||||
|
print("using actual tabs")
|
||||||
|
else
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
print("using spaces in place of tabs")
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
-- quicker switching between panes/splits
|
||||||
|
vim.keymap.set("n", "<C-h>", [[<C-w>h]])
|
||||||
|
vim.keymap.set("n", "<C-j>", [[<C-w>j]])
|
||||||
|
vim.keymap.set("n", "<C-k>", [[<C-w>k]])
|
||||||
|
vim.keymap.set("n", "<C-l>", [[<C-w>l]])
|
||||||
|
|
||||||
|
-- TODO: learn about quickfix (:help quickfix), then maybe use these
|
||||||
|
-- vim.keymap.set("n", "<C-k>", "<cmd>cnext<CR>zz")
|
||||||
|
-- vim.keymap.set("n", "<C-j>", "<cmd>cprev<CR>zz")
|
||||||
|
-- vim.keymap.set("n", "<leader>k", "<cmd>lnext<CR>zz")
|
||||||
|
-- vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz")
|
||||||
|
|
10
src_files/.config/nvim/lua/david_standard/lsp_enables.lua
Normal file
10
src_files/.config/nvim/lua/david_standard/lsp_enables.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
-- c
|
||||||
|
|
||||||
|
-- c++
|
||||||
|
|
||||||
|
-- ruby
|
||||||
|
vim.lsp.enable('ruby_lsp')
|
||||||
|
-- vim.lsp.enable('typeprof') -- ruby builtin/official (but still labled experimental)
|
||||||
|
-- vim.lsp.enable('standardrb')
|
||||||
|
-- vim.lsp.enable('solargraph')
|
||||||
|
-- vim.lsp.enable('herb_ls') -- targets html + ruby (erb files)
|
@@ -22,7 +22,7 @@ vim.opt.rtp:prepend(path_lazy_nvim)
|
|||||||
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
{ import = "plugins_lazy" },
|
{ import = "david_standard.plugins_lazy" },
|
||||||
},
|
},
|
||||||
checker = { enabled = false },
|
checker = { enabled = false },
|
||||||
change_detection = { notify = false },
|
change_detection = { notify = false },
|
@@ -0,0 +1,54 @@
|
|||||||
|
-- telescope
|
||||||
|
local builtin = require('telescope.builtin')
|
||||||
|
local custom_tscope_grep = function()
|
||||||
|
builtin.grep_string({ search = vim.fn.input("grep > ")})
|
||||||
|
end
|
||||||
|
vim.keymap.set('n', '<leader>ft', builtin.live_grep, {
|
||||||
|
desc = 'Telescope find text (live_grep)'
|
||||||
|
})
|
||||||
|
vim.keymap.set('n', '<leader>fT', custom_tscope_grep, {
|
||||||
|
desc = 'Telescope find text (grep_string)'
|
||||||
|
})
|
||||||
|
vim.keymap.set('n', '<leader>fg', builtin.git_files, {
|
||||||
|
desc = 'Telescope find git-tracked files'
|
||||||
|
})
|
||||||
|
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
|
||||||
|
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
|
||||||
|
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
|
||||||
|
|
||||||
|
-- harpoon
|
||||||
|
local harpoon = require("harpoon")
|
||||||
|
vim.keymap.set("n", "<leader>hl", function()
|
||||||
|
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||||
|
end)
|
||||||
|
vim.keymap.set("n", "<leader>ha", function() harpoon:list():add() end)
|
||||||
|
vim.keymap.set("n", "<leader>hA", function() harpoon:list():prepend() end)
|
||||||
|
vim.keymap.set("n", "<leader>hn", function() harpoon:list():next() end)
|
||||||
|
vim.keymap.set("n", "<leader>hp", function() harpoon:list():prev() end)
|
||||||
|
vim.keymap.set("n", "<leader>hz", function() harpoon:list():select(1) end)
|
||||||
|
vim.keymap.set("n", "<leader>hx", function() harpoon:list():select(2) end)
|
||||||
|
vim.keymap.set("n", "<leader>hc", function() harpoon:list():select(3) end)
|
||||||
|
vim.keymap.set("n", "<leader>hv", function() harpoon:list():select(4) end)
|
||||||
|
vim.keymap.set("n", "<leader>hZ", function() harpoon:list():replace_at(1) end)
|
||||||
|
vim.keymap.set("n", "<leader>hX", function() harpoon:list():replace_at(2) end)
|
||||||
|
vim.keymap.set("n", "<leader>hC", function() harpoon:list():replace_at(3) end)
|
||||||
|
vim.keymap.set("n", "<leader>hV", function() harpoon:list():replace_at(4) end)
|
||||||
|
|
||||||
|
-- undotree
|
||||||
|
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
||||||
|
|
||||||
|
-- treesitter and treesitter-context
|
||||||
|
vim.keymap.set("n", "<leader>tc", function() vim.cmd.TSContext({ "toggle" }) end)
|
||||||
|
|
||||||
|
-- fugitive (git integration)
|
||||||
|
vim.keymap.set("n", "<leader>gG", vim.cmd.Git)
|
||||||
|
vim.keymap.set("n", "<leader>gg", ":Git ") -- shortcut, arbitrary git commands
|
||||||
|
vim.keymap.set("n", "<leader>ga", function() vim.cmd.Git({ "add %"}) end)
|
||||||
|
vim.keymap.set("n", "<leader>gs", function() vim.cmd.Git({ "-p status" }) end)
|
||||||
|
vim.keymap.set("n", "<leader>gc", function() vim.cmd.Git({ "commit -a" }) end)
|
||||||
|
|
||||||
|
-- conform (formatter)
|
||||||
|
vim.keymap.set("n", "<leader>fmt", function()
|
||||||
|
require("conform").format({ bufnr = 0 })
|
||||||
|
end)
|
||||||
|
|
@@ -28,10 +28,9 @@ return {
|
|||||||
require("mason").setup()
|
require("mason").setup()
|
||||||
require("mason-lspconfig").setup({
|
require("mason-lspconfig").setup({
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
"clangd",
|
|
||||||
"lua_ls",
|
"lua_ls",
|
||||||
"ruby_lsp",
|
|
||||||
-- "gopls",
|
-- "gopls",
|
||||||
|
"ruby_lsp",
|
||||||
-- "tailwindcss",
|
-- "tailwindcss",
|
||||||
},
|
},
|
||||||
handlers = {
|
handlers = {
|
||||||
@@ -69,7 +68,7 @@ return {
|
|||||||
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
|
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
|
||||||
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
|
||||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||||
['<C-u>'] = cmp.mapping.scroll_docs(4),
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
}),
|
}),
|
||||||
snippet = {
|
snippet = {
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
@@ -87,9 +86,6 @@ return {
|
|||||||
completion = cmp.config.window.bordered(),
|
completion = cmp.config.window.bordered(),
|
||||||
documentation = cmp.config.window.bordered(),
|
documentation = cmp.config.window.bordered(),
|
||||||
},
|
},
|
||||||
performance = {
|
|
||||||
max_view_entries = 14,
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
-- `/` cmdline setup.
|
-- `/` cmdline setup.
|
||||||
@@ -114,11 +110,5 @@ return {
|
|||||||
prefix = "",
|
prefix = "",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
end
|
||||||
-- TODO: enables needed? or does neovim/nvim-lspconfig cover by default?
|
|
||||||
-- vim.lsp.enable('clangd')
|
|
||||||
-- vim.lsp.enable('ruby_lsp')
|
|
||||||
-- vim.lsp.enable('standardrb')
|
|
||||||
-- vim.lsp.enable('herb_ls') -- targets html + ruby (erb files)
|
|
||||||
end,
|
|
||||||
}
|
}
|
@@ -8,21 +8,10 @@ local glob_patterns_live_grep = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"nvim-telescope/telescope.nvim",
|
'nvim-telescope/telescope.nvim',
|
||||||
tag = "0.1.8",
|
tag = '0.1.8',
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||||
opts = {
|
opts = {
|
||||||
defaults = {
|
|
||||||
layout_strategy = "horizontal",
|
|
||||||
layout_config = {
|
|
||||||
horizontal = {
|
|
||||||
width = 0.98,
|
|
||||||
height = 0.98,
|
|
||||||
preview_width = 0.45,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
path_display = { "truncate", },
|
|
||||||
},
|
|
||||||
pickers = {
|
pickers = {
|
||||||
find_files = {
|
find_files = {
|
||||||
find_command = {
|
find_command = {
|
||||||
@@ -34,7 +23,7 @@ return {
|
|||||||
additional_args = {
|
additional_args = {
|
||||||
"--no-ignore", "--hidden",
|
"--no-ignore", "--hidden",
|
||||||
unpack(glob_patterns_live_grep),
|
unpack(glob_patterns_live_grep),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
@@ -1,140 +0,0 @@
|
|||||||
local kmGroup = vim.api.nvim_create_augroup("KeymappingsGroup", { clear = true })
|
|
||||||
local kmgAutocmd = vim.api.nvim_create_autocmd
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
|
||||||
-- core
|
|
||||||
|
|
||||||
-- explore the directory of the current file (using netrw)
|
|
||||||
vim.keymap.set("n", "<leader>n", vim.cmd.Ex)
|
|
||||||
|
|
||||||
-- move selected lines up or down
|
|
||||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv")
|
|
||||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv")
|
|
||||||
|
|
||||||
-- vertically center cursor with half-page jumps
|
|
||||||
vim.keymap.set("n", "<C-d>", "<C-d>zz")
|
|
||||||
vim.keymap.set("n", "<C-u>", "<C-u>zz")
|
|
||||||
|
|
||||||
-- 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")
|
|
||||||
|
|
||||||
-- shortcuts for deleting into the void register
|
|
||||||
vim.keymap.set({ "n", "v" }, "<leader>d", "\"_d")
|
|
||||||
vim.keymap.set("x", "<leader>P", [["_dP]]) -- replace selected text, keep main register
|
|
||||||
|
|
||||||
-- shortcuts for using + register (system clipboard)
|
|
||||||
vim.keymap.set({ "n", "v" }, "<leader>y", [["+y]])
|
|
||||||
vim.keymap.set("n", "<leader>Y", [["+Y]])
|
|
||||||
vim.keymap.set("n", "<leader>D", [["+D]])
|
|
||||||
vim.keymap.set("n", "<leader>p", [["+p]])
|
|
||||||
|
|
||||||
-- search-and-replace shortcuts
|
|
||||||
vim.keymap.set("n", "<leader>rw", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
|
|
||||||
vim.keymap.set("n", "<leader>ra", [[:%s//g<Left><Left>]])
|
|
||||||
|
|
||||||
-- toggle expandtab and show message
|
|
||||||
vim.keymap.set("n", "<leader>tab", function()
|
|
||||||
if vim.opt.expandtab:get() then
|
|
||||||
vim.opt.expandtab = false
|
|
||||||
print("using actual tabs")
|
|
||||||
else
|
|
||||||
vim.opt.expandtab = true
|
|
||||||
print("using spaces in place of tabs")
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- quicker switching between panes/splits
|
|
||||||
vim.keymap.set("n", "<C-h>", [[<C-w>h]])
|
|
||||||
vim.keymap.set("n", "<C-j>", [[<C-w>j]])
|
|
||||||
vim.keymap.set("n", "<C-k>", [[<C-w>k]])
|
|
||||||
vim.keymap.set("n", "<C-l>", [[<C-w>l]])
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
|
||||||
-- quickfix TODO: learn about quickfix (:help quickfix), then maybe use these
|
|
||||||
|
|
||||||
-- vim.keymap.set("n", "<C-k>", "<cmd>cnext<CR>zz")
|
|
||||||
-- vim.keymap.set("n", "<C-j>", "<cmd>cprev<CR>zz")
|
|
||||||
-- vim.keymap.set("n", "<leader>k", "<cmd>lnext<CR>zz")
|
|
||||||
-- vim.keymap.set("n", "<leader>j", "<cmd>lprev<CR>zz")
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
|
||||||
-- lsp
|
|
||||||
|
|
||||||
kmgAutocmd('LspAttach', {
|
|
||||||
group = kmGroup,
|
|
||||||
callback = function(e)
|
|
||||||
local opts = { buffer = e.buf }
|
|
||||||
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
|
|
||||||
vim.keymap.set("n", "K", 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>vdv", function() vim.diagnostic.open_float() end, opts)
|
|
||||||
vim.keymap.set("n", "<leader>vdn", function() vim.diagnostic.goto_next() end, opts)
|
|
||||||
vim.keymap.set("n", "<leader>vdp", function() vim.diagnostic.goto_prev() end, opts)
|
|
||||||
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
|
|
||||||
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
|
|
||||||
vim.keymap.set("n", "<leader>vrl", function() vim.lsp.buf.references() end, opts)
|
|
||||||
vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
|
|
||||||
end
|
|
||||||
})
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------
|
|
||||||
-- plugins
|
|
||||||
|
|
||||||
-- telescope
|
|
||||||
local builtin = require('telescope.builtin')
|
|
||||||
local custom_tscope_grep = function()
|
|
||||||
builtin.grep_string({ search = vim.fn.input("grep > ")})
|
|
||||||
end
|
|
||||||
vim.keymap.set('n', '<leader>ft', builtin.live_grep, {
|
|
||||||
desc = 'Telescope find text (live_grep)'
|
|
||||||
})
|
|
||||||
vim.keymap.set('n', '<leader>fT', custom_tscope_grep, {
|
|
||||||
desc = 'Telescope find text (grep_string)'
|
|
||||||
})
|
|
||||||
vim.keymap.set('n', '<leader>fg', builtin.git_files, {
|
|
||||||
desc = 'Telescope find git-tracked files'
|
|
||||||
})
|
|
||||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
|
|
||||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
|
|
||||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
|
|
||||||
|
|
||||||
-- harpoon
|
|
||||||
local harpoon = require("harpoon")
|
|
||||||
vim.keymap.set("n", "<leader>hl", function()
|
|
||||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
|
||||||
end)
|
|
||||||
vim.keymap.set("n", "<leader>ha", function() harpoon:list():add() end)
|
|
||||||
vim.keymap.set("n", "<leader>hA", function() harpoon:list():prepend() end)
|
|
||||||
vim.keymap.set("n", "<leader>hn", function() harpoon:list():next() end)
|
|
||||||
vim.keymap.set("n", "<leader>hp", function() harpoon:list():prev() end)
|
|
||||||
vim.keymap.set("n", "<leader>hz", function() harpoon:list():select(1) end)
|
|
||||||
vim.keymap.set("n", "<leader>hx", function() harpoon:list():select(2) end)
|
|
||||||
vim.keymap.set("n", "<leader>hc", function() harpoon:list():select(3) end)
|
|
||||||
vim.keymap.set("n", "<leader>hv", function() harpoon:list():select(4) end)
|
|
||||||
vim.keymap.set("n", "<leader>hZ", function() harpoon:list():replace_at(1) end)
|
|
||||||
vim.keymap.set("n", "<leader>hX", function() harpoon:list():replace_at(2) end)
|
|
||||||
vim.keymap.set("n", "<leader>hC", function() harpoon:list():replace_at(3) end)
|
|
||||||
vim.keymap.set("n", "<leader>hV", function() harpoon:list():replace_at(4) end)
|
|
||||||
|
|
||||||
-- undotree
|
|
||||||
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
|
|
||||||
|
|
||||||
-- treesitter and treesitter-context
|
|
||||||
vim.keymap.set("n", "<leader>tc", function() vim.cmd.TSContext({ "toggle" }) end)
|
|
||||||
|
|
||||||
-- fugitive (git integration)
|
|
||||||
vim.keymap.set("n", "<leader>gG", vim.cmd.Git)
|
|
||||||
vim.keymap.set("n", "<leader>gg", ":Git ") -- shortcut, arbitrary git commands
|
|
||||||
vim.keymap.set("n", "<leader>ga", function() vim.cmd.Git({ "add %"}) end)
|
|
||||||
vim.keymap.set("n", "<leader>gs", function() vim.cmd.Git({ "-p status" }) end)
|
|
||||||
vim.keymap.set("n", "<leader>gc", function() vim.cmd.Git({ "commit -a" }) end)
|
|
||||||
|
|
||||||
-- conform (formatter)
|
|
||||||
vim.keymap.set("n", "<leader>fmt", function()
|
|
||||||
require("conform").format({ bufnr = 0 })
|
|
||||||
end)
|
|
||||||
|
|
@@ -2,6 +2,46 @@
|
|||||||
# staring file was at /opt/homebrew/opt/yabai/share/yabai/examples
|
# staring file was at /opt/homebrew/opt/yabai/share/yabai/examples
|
||||||
# notes, stacks: https://github.com/koekeishiya/yabai/issues/203#issuecomment-650642142
|
# notes, stacks: https://github.com/koekeishiya/yabai/issues/203#issuecomment-650642142
|
||||||
|
|
||||||
|
##########################################################################################
|
||||||
|
# key bindings for yabai wm
|
||||||
|
# general idea: alt navigates (move my view); alt+shift modifies (move/change the window)
|
||||||
|
|
||||||
|
# switch to space (to leave SIP in place, configure these in macos system settings)
|
||||||
|
# alt - 1 # switch to space 1
|
||||||
|
# alt - 2 # switch to space 2 (and similar for other numbers)
|
||||||
|
|
||||||
|
# move focused window to the given space
|
||||||
|
alt + shift - 1 : yabai -m window --space 1 --focus
|
||||||
|
alt + shift - 2 : yabai -m window --space 2 --focus
|
||||||
|
alt + shift - 3 : yabai -m window --space 3 --focus
|
||||||
|
alt + shift - 4 : yabai -m window --space 4 --focus
|
||||||
|
alt + shift - 5 : yabai -m window --space 5 --focus
|
||||||
|
alt + shift - 6 : yabai -m window --space 6 --focus
|
||||||
|
alt + shift - 7 : yabai -m window --space 7 --focus
|
||||||
|
alt + shift - 8 : yabai -m window --space 8 --focus
|
||||||
|
alt + shift - 9 : yabai -m window --space 9 --focus
|
||||||
|
|
||||||
|
# all windows in a space to fullscreen in a single stack
|
||||||
|
alt + shift - s : yabai -m space --layout stack
|
||||||
|
# all windows in a space back to the grid (managed)
|
||||||
|
alt + shift - g : yabai -m space --layout bsp
|
||||||
|
# toggle float on/off for the focused window
|
||||||
|
alt + shift - f : yabai -m window --toggle float
|
||||||
|
# balance window sizes
|
||||||
|
alt + shift - 0 : yabai -m space --balance # TODO: figure out better key option
|
||||||
|
|
||||||
|
# focus on next/previous window
|
||||||
|
alt - j : yabai -m window --focus \
|
||||||
|
$(yabai -m query --spaces --space | jq '.type' | tr -d "\"" | sed "s/stack/stack./" | sed "s/.*[^.]\$//")prev
|
||||||
|
alt - k : yabai -m window --focus \
|
||||||
|
$(yabai -m query --spaces --space | jq '.type' | tr -d "\"" | sed "s/stack/stack./" | sed "s/.*[^.]\$//")next
|
||||||
|
|
||||||
|
# move current window up/down in stack
|
||||||
|
alt + shift - k : yabai -m window --swap \
|
||||||
|
$(yabai -m query --spaces --space | jq '.type' | tr -d "\"" | sed "s/stack/stack./" | sed "s/.*[^.]\$//")next
|
||||||
|
alt + shift - j : yabai -m window --swap \
|
||||||
|
$(yabai -m query --spaces --space | jq '.type' | tr -d "\"" | sed "s/stack/stack./" | sed "s/.*[^.]\$//")prev
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
# key bindings for general use
|
# key bindings for general use
|
||||||
|
|
||||||
|
@@ -1,13 +0,0 @@
|
|||||||
tmux_omitted_dirs=(
|
|
||||||
$HOME
|
|
||||||
$DIR_HOME_BOX
|
|
||||||
$DIR_DEV
|
|
||||||
$DIR_GIT_PROJECTS
|
|
||||||
)
|
|
||||||
[[ ! ${tmux_omitted_dirs[(re)$(pwd)]} ]] &&
|
|
||||||
tmux new-window -d -n cmd &&
|
|
||||||
tmux rename-window $EDITOR &&
|
|
||||||
$EDITOR .
|
|
||||||
|
|
||||||
clear
|
|
||||||
|
|
@@ -1,11 +0,0 @@
|
|||||||
## example template
|
|
||||||
|
|
||||||
tmux new-window -d -n cmd
|
|
||||||
tmux send-keys -t :cmd "echo 'in cmd'" c-M
|
|
||||||
|
|
||||||
tmux new-window -d -n another
|
|
||||||
tmux send-keys -t :another "echo 'in another'" c-M
|
|
||||||
|
|
||||||
tmux rename-window $EDITOR
|
|
||||||
$EDITOR .
|
|
||||||
clear
|
|
@@ -1,7 +0,0 @@
|
|||||||
tmux new-window -d -n ncspot
|
|
||||||
|
|
||||||
tmux new-window -d -n fitness
|
|
||||||
tmux send-keys -t :fitness "cd $DIR_HOME_BOX/life/fitness/audio" c-M
|
|
||||||
|
|
||||||
tmux rename-window ncmpcpp
|
|
||||||
ncmpcpp
|
|
@@ -1,8 +0,0 @@
|
|||||||
tmux rename-window drawing
|
|
||||||
|
|
||||||
tmux new-window -n thinking
|
|
||||||
tmux send-keys -t :thinking "$EDITOR $(date "+%Y%m%d")-scratch" c-M
|
|
||||||
|
|
||||||
tmux send-keys -t :drawing "cd $DIR_SCRATCH_DRAWINGS" c-M
|
|
||||||
tmux send-keys -t :drawing "gimp" c-M
|
|
||||||
|
|
@@ -8,7 +8,7 @@ set -g status-style 'bg=#111111 fg=#22cc00'
|
|||||||
set -g base-index 0
|
set -g base-index 0
|
||||||
|
|
||||||
# unbind keys
|
# unbind keys
|
||||||
unbind-key f; unbind-key C-f; unbind-key s; unbind-key C-s
|
unbind-key f; unbind-key C-f; unbind-key C-s
|
||||||
unbind-key c; unbind-key n; unbind-key p
|
unbind-key c; unbind-key n; unbind-key p
|
||||||
unbind-key C-o; unbind-key C-n; unbind-key C-p; unbind-key C-l; unbind-key C-h
|
unbind-key C-o; unbind-key C-n; unbind-key C-p; unbind-key C-l; unbind-key C-h
|
||||||
|
|
||||||
@@ -35,8 +35,7 @@ bind-key n new-window
|
|||||||
|
|
||||||
# find and switching for sessions, include using tmux-session-init
|
# find and switching for sessions, include using tmux-session-init
|
||||||
bind-key C-f run-shell "tmux neww $DIR_SCRIPTS/tmux-session-init"
|
bind-key C-f run-shell "tmux neww $DIR_SCRIPTS/tmux-session-init"
|
||||||
# bind-key C-s run-shell "tmux neww $DIR_SCRIPTS/tmux-session-init find-existing"
|
bind-key C-s run-shell "tmux neww $DIR_SCRIPTS/tmux-session-init find-existing"
|
||||||
bind-key C-s choose-session
|
|
||||||
bind-key C-h run-shell "tmux neww $DIR_SCRIPTS/tmux-session-init hub"
|
bind-key C-h run-shell "tmux neww $DIR_SCRIPTS/tmux-session-init hub"
|
||||||
bind-key -r C-l switch-client -l
|
bind-key -r C-l switch-client -l
|
||||||
bind-key -r C-o last-window
|
bind-key -r C-o last-window
|
||||||
|
35
src_files/.config/yabai/yabairc
Executable file
35
src_files/.config/yabai/yabairc
Executable file
@@ -0,0 +1,35 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
# global settings
|
||||||
|
yabai -m config \
|
||||||
|
external_bar off:40:0 \
|
||||||
|
menubar_opacity 1.0 \
|
||||||
|
mouse_follows_focus off \
|
||||||
|
focus_follows_mouse off \
|
||||||
|
display_arrangement_order default \
|
||||||
|
window_origin_display default \
|
||||||
|
window_placement first_child \
|
||||||
|
window_insertion_point focused \
|
||||||
|
window_zoom_persist on \
|
||||||
|
window_shadow off \
|
||||||
|
window_animation_duration 0.0 \
|
||||||
|
window_animation_easing ease_out_circ \
|
||||||
|
window_opacity_duration 0.0 \
|
||||||
|
active_window_opacity 1.0 \
|
||||||
|
normal_window_opacity 0.90 \
|
||||||
|
window_opacity off \
|
||||||
|
insert_feedback_color 0xffd75f5f \
|
||||||
|
split_ratio 0.0 \
|
||||||
|
split_type auto \
|
||||||
|
auto_balance off \
|
||||||
|
top_padding 00 \
|
||||||
|
bottom_padding 00 \
|
||||||
|
left_padding 00 \
|
||||||
|
right_padding 00 \
|
||||||
|
window_gap 00 \
|
||||||
|
layout bsp \
|
||||||
|
mouse_modifier fn \
|
||||||
|
mouse_action1 move \
|
||||||
|
mouse_action2 resize \
|
||||||
|
mouse_drop_action swap
|
||||||
|
|
@@ -1 +0,0 @@
|
|||||||
# source "$XDG_CONFIG_HOME/shell/profile" # TODO: where to put this?
|
|
||||||
|
@@ -4,11 +4,8 @@ export EDITOR='nvim'
|
|||||||
|
|
||||||
# env vars used for my organization structure
|
# env vars used for my organization structure
|
||||||
export DIR_HOME_BOX="$HOME/dbox"
|
export DIR_HOME_BOX="$HOME/dbox"
|
||||||
export DIR_MUSIC="$DIR_HOME_BOX/media/music"
|
|
||||||
export DIR_DEV="$HOME/dev"
|
export DIR_DEV="$HOME/dev"
|
||||||
export DIR_GIT_PROJECTS="$DIR_DEV/git"
|
export DIR_GIT_PROJECTS="$DIR_DEV/git"
|
||||||
export DIR_SCRATCH_NOTES="$DIR_HOME_BOX/scratchpad/notes"
|
|
||||||
export DIR_SCRATCH_DRAWINGS="$DIR_HOME_BOX/scratchpad/drawings"
|
|
||||||
|
|
||||||
# util dirs; do not change without checking impact on xdg base dirs
|
# util dirs; do not change without checking impact on xdg base dirs
|
||||||
export DIR_LOCAL="$HOME/.local"
|
export DIR_LOCAL="$HOME/.local"
|
||||||
|
@@ -16,8 +16,9 @@ alias nv='nvim'
|
|||||||
alias n='nvim'
|
alias n='nvim'
|
||||||
alias tms='tmux-session-init'
|
alias tms='tmux-session-init'
|
||||||
|
|
||||||
# executable overrides
|
# executable name overrides
|
||||||
alias ls='ls -F'
|
alias ls='ls -F'
|
||||||
|
alias yt-dlp='yt-dlp --write-info-json'
|
||||||
|
|
||||||
# misc commands
|
# misc commands
|
||||||
alias cal='khal calendar'
|
alias cal='khal calendar'
|
||||||
|
@@ -11,7 +11,6 @@ alias gfo='git fetch origin'
|
|||||||
alias git-push-to-temp='git branch -D temp; git checkout -b temp; git push origin temp -uf; git checkout -'
|
alias git-push-to-temp='git branch -D temp; git checkout -b temp; git push origin temp -uf; git checkout -'
|
||||||
alias gpdev='git-push-to-temp'
|
alias gpdev='git-push-to-temp'
|
||||||
alias gpo='git pull origin'
|
alias gpo='git pull origin'
|
||||||
git config --global user.email "$EMAIL_PERSONAL_DEV" # TODO: maybe fit this into system-type filters?
|
|
||||||
|
|
||||||
# code/test/linter run and build commands
|
# code/test/linter run and build commands
|
||||||
alias bel='bundle exec standardrb'
|
alias bel='bundle exec standardrb'
|
||||||
|
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/zsh
|
|
||||||
|
|
||||||
mvd_target_dir=$(dirname "${@: -1}")
|
|
||||||
[[ ! -d "$mvd_target_dir" ]] && mkdir -p "$mvd_target_dir"
|
|
||||||
exec mv "$@"
|
|
21
src_files/.local/scripts/.tmux-session-hydrate-default
Normal file
21
src_files/.local/scripts/.tmux-session-hydrate-default
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
local omitted_dirs=(
|
||||||
|
$HOME
|
||||||
|
$DIR_HOME_BOX
|
||||||
|
$DIR_DEV
|
||||||
|
$DIR_GIT_PROJECTS
|
||||||
|
)
|
||||||
|
[[ ! ${omitted_dirs[(re)$(pwd)]} ]] &&
|
||||||
|
tmux new-window -d -n cmd &&
|
||||||
|
tmux rename-window $EDITOR &&
|
||||||
|
$EDITOR .
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
## example template for custom override
|
||||||
|
# tmux new-window -d -n cmd
|
||||||
|
# tmux send-keys -t :cmd "echo 'in cmd'" c-M
|
||||||
|
# tmux new-window -d -n another
|
||||||
|
# tmux send-keys -t :another "echo 'in another'" c-M
|
||||||
|
# tmux rename-window $EDITOR
|
||||||
|
# $EDITOR .
|
||||||
|
# clear
|
@@ -1,40 +1,36 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
tmux_switch_to() {
|
switch_to() {
|
||||||
[[ -z $TMUX ]] && tmux attach-session -t $1 || tmux switch-client -t $1
|
[[ -z $TMUX ]] && tmux attach-session -t $1 || tmux switch-client -t $1
|
||||||
}
|
}
|
||||||
|
|
||||||
tmux_hydrate() {
|
hydrate() {
|
||||||
local tmux_hydrate_files_dir="$XDG_CONFIG_HOME/tmux/session-hydrate-files"
|
local tmux_hydrate_path="$DIR_SCRIPTS/.tmux-session-hydrate-default"
|
||||||
local tmux_hydrate_path="$tmux_hydrate_files_dir/.tmux-session-hydrate-default"
|
|
||||||
[[ $1 = "thinking" ]] && tmux_hydrate_path="$tmux_hydrate_files_dir/.tmux-session-hydrate-thinking"
|
|
||||||
[[ $1 = "listening" ]] && tmux_hydrate_path="$tmux_hydrate_files_dir/.tmux-session-hydrate-listening"
|
|
||||||
[[ -f $2/.tmux-session-hydrate ]] && tmux_hydrate_path="$2/.tmux-session-hydrate"
|
[[ -f $2/.tmux-session-hydrate ]] && tmux_hydrate_path="$2/.tmux-session-hydrate"
|
||||||
[[ -f $tmux_hydrate_path ]] && tmux send-keys -t $1 "source $tmux_hydrate_path" c-M
|
[[ -f $tmux_hydrate_path ]] && tmux send-keys -t $1 "source $tmux_hydrate_path" c-M
|
||||||
}
|
}
|
||||||
|
|
||||||
tmux_existing_sessions=$([[ -n $(pgrep tmux) ]] && tmux list-sessions || echo '')
|
local name_regex="^\([-_A-Za-z0-9]*\):.*$"
|
||||||
tmux_search_dirs=(
|
local existing_sessions=$([[ -n $(pgrep tmux) ]] && tmux list-sessions | sed "s/$name_regex/\1/" || echo '')
|
||||||
|
local search_dirs=(
|
||||||
$DIR_HOME_BOX
|
$DIR_HOME_BOX
|
||||||
$DIR_DEV
|
$DIR_DEV
|
||||||
$DIR_GIT_PROJECTS/*
|
$DIR_GIT_PROJECTS/*
|
||||||
)
|
)
|
||||||
tmux_target_name=''
|
local target_name=''
|
||||||
tmux_target_path=''
|
local target_path=''
|
||||||
|
|
||||||
[[ $# -eq 1 ]] && tmux_target_path=$1 ||
|
[[ $# -eq 1 ]] && target_path=$1 ||
|
||||||
tmux_target_path=$(find $tmux_search_dirs -mindepth 1 -maxdepth 1 -type d | fzf)
|
target_path=$(find $search_dirs -mindepth 1 -maxdepth 1 -type d | fzf)
|
||||||
|
|
||||||
if [[ $tmux_target_path = "." ]]; then tmux_target_name=$(basename $(pwd)) && tmux_target_path=$(pwd);
|
if [[ $target_path = "find-existing" ]]; then target_name=$(echo $existing_sessions | fzf);
|
||||||
elif [[ $tmux_target_path = "hub" ]]; then tmux_target_name="hub" && tmux_target_path="$HOME";
|
elif [[ $target_path = "hub" ]]; then target_name="hub" && target_path="$HOME";
|
||||||
elif [[ $tmux_target_path = "thinking" ]]; then tmux_target_name="thinking" && tmux_target_path="$DIR_SCRATCH_NOTES";
|
elif [[ -n $target_path ]]; then target_name=$(basename "$target_path" | tr . _);
|
||||||
elif [[ $tmux_target_path = "listening" ]]; then tmux_target_name="listening" && tmux_target_path="$DIR_MUSIC";
|
|
||||||
elif [[ -n $tmux_target_path ]]; then tmux_target_name=$(basename "$tmux_target_path" | tr . _);
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ -z $tmux_target_name ]] && exit 0
|
[[ -z $target_name ]] && exit 0
|
||||||
|
|
||||||
! (echo $tmux_existing_sessions | grep -q "$tmux_target_name") &&
|
! (echo $existing_sessions | grep -q "$target_name") &&
|
||||||
tmux new-session -d -s $tmux_target_name -c $tmux_target_path &&
|
tmux new-session -d -s $target_name -c $target_path &&
|
||||||
tmux_hydrate $tmux_target_name $tmux_target_path
|
hydrate $target_name $target_path
|
||||||
tmux_switch_to $tmux_target_name
|
switch_to $target_name
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
/Applications/GIMP.app/Contents/MacOS/gimp
|
|
Reference in New Issue
Block a user