Compare commits

..

1 Commits

Author SHA1 Message Date
744ffd9ff7 Various small changes from the last week or so 2025-10-24 02:02:03 -05:00
184 changed files with 1142 additions and 2553 deletions

View File

@@ -1,45 +1,45 @@
# dotfiles, plus installation and related scripts
# dotfiles, plus scripts for box setup
This repo contains a collection of scripts and files related to:
- configuration (i.e. this serves as my dotfiles repo)
- installation of programs
- scripts/executables for my local systems
- anything else related to getting my boxes (computers) set up as desired
This repo grew into more than I originally intended, but it turned into a fun little
excursion into the realm of shell scripting (and an intro to Lua for the neovim
portions).
## prereqs
- programs installed: git, sed, zsh
### prereqs
- zsh and git installed
- git clone this repo
### specific prereqs, linux distros
#### specific prereqs, linux distros
- sudo access is configured for current user
### specific prereqs, macos
#### specific prereqs, macos
- install the package manager, [homebrew](https://brew.sh/)
- for aerospace window manager, have only 1 workspace/desktop
- manual settings, refer to [docs/macos-system-settings](docs/macos-system-settings.md)
- manual settings, refer to [ref/macos-system-settings](ref/macos-system-settings.txt)
## script run
--------
- to do the full setup, from the repo's root dir, run: `./box_setup.sh`
- to copy dotfiles only, from the repo's root dir, run: `./copy_dotfiles.sh`
### 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 [docs/post-run](docs/post-run.md)
### after script run
- complete manual actions specified in [ref/post-run](ref/post-run.md)
## todo items
--------
see [docs/todo.md](docs/todo.md)
## attribution
see [docs/attribution.md](docs/attribution.md)
### todo items
- config for: terminal (kitty? havoc?); shell; mpd, mpc, ncmpcpp; mpv
- 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
- decide on docker? or alternatives like podman? any license concerns?
- pick rss reader; newsboat? others? option with inbox and separate queues?
- decide if i even want a filemanager; if yes, pick one and configure
- decide what i'm doing for music streaming; spotify official? web? tui option?
- 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

View File

@@ -2,52 +2,44 @@
[[ $1 = "--help" ]] && {
echo "\nusage: ./box_setup.sh [system-type]"
echo "\nsystem-type options: music_studio, programming"
echo "\nexamples:\n ./box_setup.sh\n ./box_setup.sh music_studio\n"
echo "\nsystem-type options: personal, studio-music, work-placeholder"
echo "\nexamples:\n ./box_setup.sh\n ./box_setup.sh studio-music\n"
exit 0
}
echo "---- settings vars for system type -----"
# determine OS and distro
case "$OSTYPE" in
(*linux*)
setup_os="linux"
# determine OS and, if linux, distro
[[ "$OSTYPE" = *"darwin"* ]] && setup_os="macos" || {
[[ "$OSTYPE" = *"linux"* ]] && setup_os="linux" && {
[[ -f /etc/os-release ]] && . /etc/os-release
setup_distro=$(echo "${NAME%% *}" | tr '[:upper:]' '[:lower:]')
;;
(*darwin*)
setup_os="macos"
setup_distro="macos" # just repeat macos, but maybe there is some better value
;;
esac
# ensure OS and distro are set before proceeding
[[ -z "$setup_os" ]] && echo "setup OS not detected" && exit 1
[[ -z "$setup_distro" ]] && echo "setup distro not detected" && exit 1
[[ -z "$setup_distro" ]] && echo "OS: linux; distro not detected" && exit 1
}
}
[[ -z "$setup_os" ]] && echo "OS not detected" && exit 1
# set package manager commands for installs
case "$setup_os" in
(linux)
[[ "$setup_os" = "macos" ]] && {
install_cmd="brew install"
update_pkg_manager_and_defs_cmd='brew update'
update_pkgs_cmd='brew upgrade'
} || {
[[ "$setup_os" = "linux" ]] && {
case $setup_distro in
(arch | artix)
install_cmd="sudo pacman -S --noconfirm"
update_pkg_manager_and_defs_cmd='' # don't; update system instead
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'
;;
;;
esac
;;
(macos)
install_cmd="brew install"
update_pkg_manager_and_defs_cmd='brew update'
update_pkgs_cmd='brew upgrade'
;;
esac
}
}
# export vars for scripts
export BOX_SETUP_OS="$setup_os"
@@ -57,13 +49,12 @@ export BOX_SETUP_UPDATE_PKG_MANAGER_AND_DEFS_CMD="$update_pkg_manager_and_defs_c
export BOX_SETUP_UPDATE_PKGS_CMD="$update_pkgs_cmd"
# make dirs and copy configs/dotfiles
. ./src_files/shell/profile
source ./src_files/.config/zsh/.zshenv
./make_dirs.sh
./copy_dotfiles.sh "--skip-theme-config"
./copy_dotfiles.sh $1
# install programs
. $ZDOTDIR/.zshrc
source $ZDOTDIR/.zshenv
source $ZDOTDIR/.zshrc
./install_programs.sh $1
# configure themes
./theme_config.sh

View File

@@ -1,84 +1,55 @@
#!/bin/sh
#!/bin/zsh
echo_and_execute() {
echo "executing: $@" && "$@"
}
echo_and_execute() { echo "executing: $@" && "$@" }
copy_file() {
from=$1
to=$2
filename=$(basename "$from")
[ "$3" = "--sudo" ] &&
echo_and_execute sudo cp -RPp "$from" "$to/$filename" ||
{
[ -e "$to/$filename" ] && rm "$to/$filename"
echo_and_execute cp -RPp "$from" "$to/$filename"
}
local from=$1
local to=$2
local filename=$(basename $from)
[[ -e $to/$filename ]] && rm $to/$filename
echo_and_execute cp -p $from $to/$filename
}
copy_dir() {
from=$1
to=$2
prev_dir=$(pwd)
cd "$from" || return 1
find . -mindepth 1 -maxdepth 1 -type d | while read -r dir; do
[ -d "$to/$dir" ] && rm -rf "$to/$dir"
echo_and_execute cp -RPp "$dir" "$to/$dir"
local from=$1
local to=$2
pushd $from > /dev/null
local directories=(`find . -mindepth 1 -maxdepth 1 -type d`)
for dir in $directories; do
[[ -d $to/$dir ]] && rm -rf $to/$dir
echo_and_execute cp -rp $dir $to/$dir
done
find . -mindepth 1 -maxdepth 1 -type f | while read -r file; do
copy_file "$file" "$to"
local files=(`find . -mindepth 1 -maxdepth 1 -type f`)
for file in $files; do
copy_file $file $to
done
cd "$prev_dir" || return 1
popd > /dev/null
}
sym_link() {
! [ -e "$1" ] && echo "skipping link, target does not exist: $1" && return
[ -h "$2" ] && rm "$2"
test -f "$2" -o -d "$2" && rm -rf "$2"
echo_and_execute ln -s "$1" "$2"
link_dir() {
local src_dir=$1
local link_dir=$2
[[ -h "$link_dir" ]] && rm $link_dir
[[ -d "$link_dir" ]] && rm -rf $link_dir
echo_and_execute ln -s $src_dir $link_dir
}
echo "---- copying dotfiles ------------------"
. ./src_files/shell/profile
echo "---- copying dotfiles ------------------------------------------------"
# copy over env/profile files used by shell(s)
copy_file src_files/shell/.profile $HOME
copy_file src_files/shell/profile $XDG_CONFIG_HOME
copy_file src_files/shell/rc $XDG_CONFIG_HOME
copy_file src_files/.config/zsh/.zshenv $HOME
# TODO: move this into xdg type dir if possible
copy_file src_files/.config/X11/xinit/.xinitrc $HOME
copy_file src_files/.config/zsh/.zshenv $HOME # duplicate, copy anyway, ensures $ZDOTDIR
# copy over configs, executables, and scripts
copy_dir src_files/.config $XDG_CONFIG_HOME
copy_dir src_files/.local/bin $DIR_BIN
[[ "$OSTYPE" = *"darwin"* ]] && copy_dir src_files/bin_overrides_macos $DIR_BIN
copy_dir src_files/.local/scripts $DIR_SCRIPTS
# macOS overrides as needed
case "$OSTYPE" in *darwin*) copy_dir src_files/bin_overrides_macos $DIR_BIN;; esac
# obsidian uses a per-vault config model, so copy to all target vaults/dirs
IFS=","; for obs_dir in $OBSIDIAN_WORKSPACES_TO_CONFIGURE; do
! [ -d "$obs_dir/.obsidian" ] && mkdir "$obs_dir/.obsidian"
copy_dir "$XDG_CONFIG_HOME/obsidian" "$obs_dir/.obsidian"
for obs_dir in "${OBSIDIAN_WORKSPACES_TO_CONFIGURE[@]}"; do
[[ ! -d "$obs_dir/.obsidian" ]] && mkdir "$obs_dir/.obsidian"
copy_dir $XDG_CONFIG_HOME/obsidian "$obs_dir/.obsidian"
done
# TODO: get reaper config set up
# case "$OSTYPE" in
# (*darwin*)
# sym_link "$XDG_CONFIG_HOME/REAPER" "$HOME/Library/Application Support/REAPER"
# ;;
# esac
# copy settings/configs to /etc locations
case "$OSTYPE" in
(*darwin*)
;;
(*)
copy_file src_files/etc/47-elogind.conf /etc/elogind/logind.conf.d --sudo
;;
esac
# set up themes and theme-switcher
! [ "$1" = "--skip-theme-config" ] && ./theme_config.sh
# [[ $1 = "studio-music" ]] {
# [[ "$OSTYPE" = *"darwin"* ]] &&
# link_dir "$XDG_CONFIG_HOME/REAPER" "$HOME/Library/Application Support/REAPER" # TODO: get reaper config set up
# }

View File

@@ -1,38 +0,0 @@
# Attribution
## Original pattern/approach and some core config logic
The original idea and approach for this project, including the original versions of my
program-installation script, the copy-configs-and-files script, the "tmux sessionizer"
(tmux session init logic), my initial neovim and tmux configs, and (though not code)
my general workflow/workspace strategy, were derived from several of ThePrimeagen's
(aka Michael Paulson's) projects and videos, including a FrontEnd Masters course which
he taught (each are listed below). I could not locate any required licenses or copyrights
for the code contained within these sources, but I wanted to give attribution nonetheless.
- [dev/setup/config repo](https://github.com/ThePrimeagen/dev)
- [neovim config](https://github.com/ThePrimeagen/init.lua)
- [tmux sessionizer](https://github.com/ThePrimeagen/tmux-sessionizer)
- [YouTube video - neovim config video](https://www.youtube.com/watch?v=w7i4amO_zaE)
- [FrontEnd Masters course - dev productivity v2](https://frontendmasters.com/courses/developer-productivity-v2/)
## Theme-swtiching/setting logic and some themes
Much of the "theme-switching" or "theme-setting" logic and scripts are derived from
[Omarchy](https://github.com/basecamp/omarchy), and some theme configuration files
in this repository under
[src_files/imports/themes-omarchy-core](../src_files/imports/themes-omarchy-core)
are copied from [Omarchy](https://github.com/basecamp/omarchy), which is licensed
under the [MIT License](https://github.com/basecamp/omarchy/blob/master/LICENSE).
Copyright (c) David Heinemeier Hansson
## Additional/extra themes (Omarchy extra themes)
Additional theme configuration files in this repository under
[src_files/imports/themes-omarchy-extra](../src_files/imports/themes-omarchy-extra)
are copied or derived from projects of additional conrtibutors to the Omarchy community.
For information about authors/licenses/copyrights for each, refer to any LICENSE and/or
ATTRIBUTION.md files in each theme's respective directory under
[src_files/imports/themes-omarchy-extra](../src_files/imports/themes-omarchy-extra).

View File

@@ -1,242 +0,0 @@
# Artix Linux - Install and System Config
**Attribution:**
Most or much of this was generated by or derived from Grok, or else from Artix docs, Arch docs/wiki, or else the docs for the particular programs or packages used. I'm not claiming any of this is mine, just putting it here in one file for future convenience/reference.
I used this approach in December of 2025 to install Artix Linux on a Framework 13in laptop from 2023 q4.
- OS and distro: Artix Linux
- init system: dinit
- partitioning, GUID Partition Table:
- unencrypted boot partition (size: 512M), UEFI
- LUKS-encrypted LVM:
- swap partition (size: amount of memory + 4G)
- root/default partition (size: remaining space)
For reference, doc page from Artix for installation:
https://wiki.artixlinux.org/Main/Installation
---
## install steps
- [ ] if not already done, download artix ISO (dinit version) and dd it onto a usb drive
- [ ] boot the live usb and select the install option (whatever it may look like)
- [ ] connect to the internet
```bash
connmanctl
//// within connmanctl
enable wifi
scan wifi
agent on
services
connect <wifi_XXXXXXXXXXXXXXXX_managed_psk>
quit
```
- [ ] verify connection using `ping`
- [ ] update live system keys/mirrors
```bash
pacman -Sy artix-keyring
```
- [ ] run lsblk and identify the storage drive on which to install
- note: when i ran this in 2025 dec on my framework laptop, it was `/dev/nvme0n1`
- [ ] partition the drive
```bash
cfdisk <target storage drive>
# use GPT (guid partition table)
# new partition, size 512M, type 'EFI System'
# new partition, size (remaining), type 'Linux LVM'
# write changes
# quit cfdisk
```
- [ ] set up LVM volumes
```bash
cryptsetup luksFormat --type luks2 /dev/<LVM partition>
cryptsetup open /dev/<LVM partition> artixlvm
pvcreate /dev/mapper/artixlvm
vgcreate artixvg /dev/mapper/artixlvm
lvcreate -L <size of memory + 4G, e.g. 36G> artixvg -n swap
lvcreate -l 100%FREE artixvg -n root
```
- [ ] set filesystems for partitions/volumes
```bash
mkfs.vfat -F32 /dev/<boot partition>
mkfs.ext4 /dev/artixvg/root
mkswap /dev/artixvg/swap
```
- [ ] mount the partitions/volumes
```bash
mount /dev/artixvg/root /mnt
mkdir /mnt/boot
mount /dev/<boot partition> /mnt/boot
swapon /dev/artixvg/swap
```
- [ ] install base system and needed packages
```bash
basestrap /mnt base base-devel linux \
linux-firmware \
dinit elogind-dinit \
lvm2 cryptsetup grub efibootmgr mkinitcpio \
connman connman-dinit wpa_supplicant \
git less neovim zsh
```
- [ ] generate fstab
```bash
fstabgen -U /mnt >> /mnt/etc/fstab
# verify (add noatime to ext4 line if desired)
vi /mnt/etc/fstab
```
- [ ] chroot into installed system
```bash
artix-chroot /mnt
```
- [ ] set timezone, hardware clock, locale
```bash
ln -sf /usr/share/zoneinfo/<path to target zone> /etc/localtime
hwclock --systohc
nvim /etc/locale.gen
# uncomment en_US.UTF-8 UTF-8; add others if desired
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
```
- [ ] set hostname and /etc/hosts
```bash
echo "<computer name>" > /etc/hostname
nvim /etc/hosts
# ensure /etc/hosts includes the following:
127.0.0.1 localhost
::1 localhost
127.0.1.1 <computer name>.localdomain <computer name>"
```
- [ ] mkinitcpio with hooks
```bash
nvim /etc/mkinitcpio.conf
# go to HOOKS and set it thus:
HOOKS=(base udev autodetect keyboard keymap consolefont modconf block encrypt lvm2 resume filesystems fsck)
mkinitcpio -P
```
- [ ] grub config and install
```bash
blkid
# note the UUID of the LVM/LUKS partition
nvim /etc/default/grub
# ensure the following is set:
GRUB_CMDLINE_LINUX="cryptdevice=UUID=<UUID from blkid above>:artixlvm root=/dev/mapper/artixvg-root resume=/dev/mapper/artixvg-swap quiet rw"
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=Artix
grub-mkconfig -o /boot/grub/grub.cfg
```
- [ ] set up connman for installed system
```bash
mkdir -p /etc/dinit.d/boot.d
ln -s ../connmand /etc/dinit.d/boot.d/connmand
```
- [ ] set root password, set up user
```bash
passwd
useradd -m -G wheel,audio,video,optical,storage <username>
passwd <username>
pacman -S sudo
EDITOR=nvim visudo
# uncomment the line in /etc/sudoers which looks something like the below:
echo "%wheel ALL=(ALL) ALL"
```
- [ ] close stuff out and reboot
```bash
exit
umount -R /mnt
swapoff -a
cryptsetup close cryptlvm # may not work, just ignore and reboot
reboot
```
---
## system config (post install)
_NOTE: don't put anything here which should be in my dotfiles-and-setup scripts instead_
- [ ] set up chrony (for syncing system time with ntp servers)
- _NOTE: edit defaults in `/etc/chrony/chrony.conf` if desired_
```bash
sudo pacman -S chrony chrony-dinit
# Fallback if dinitctl enable fails (symlink method)
sudo mkdir -p /etc/dinit.d/boot.d
sudo ln -s ../chronyd /etc/dinit.d/boot.d/chronyd
# alt: sudo dinitctl enable chronyd
/etc/dinit.d/chronyd start
# alt: sudo dinitctl start chronyd
```
---
## troubleshooting
if i need to try something again and reopen the LVM, the below should work:
```bash
cryptsetup open /dev/<target device> artixlvm
# enter existing password
vgchange -ay artixvg
# or, if only one VG exists:
vgchange -ay
```
if date/time get messed up (such as due to battery running out), fix with:
```bash
# can manually adjust to local time; grok said "date is UTC if hardware is set that way"
sudo date -s "2025-12-17 12:47:00"
# or, if chrony, ntp, or similar is set up, can trigger sync
chronyd -q
# can check after with `date` or `chronyc tracking`
sudo hwclock -w --utc
```

View File

@@ -1,18 +0,0 @@
# xlibre/x11 - adding xrandr modes
## 2026-01-16, artix linux, framework 13in laptop
### to add 1920x1280 resolution option:
```sh
dispmanage_modeline=$(cvt 1920 1280 60 | sed -n '2p' | sed -E "s/^Modeline //g")
dispmanage_mode_id=$(printf "%s" "$dispmanage_modeline" | sed -E "s/^([^ ]+)\s.*$/\1/g")
printf "%s" "$modeline" | xargs xrandr --newmode
printf "%s" "$mode_id" | xargs xrandr --addmode eDP
# NOTE: the lines above have been added to .xinitrc, just leaving here for reference
# then, add the $mode_id value to my display-manage script as the target mode:
DISPMANAGE_LAPTOP_MODE='"1920x1280_60.00"'
```

View File

@@ -1,36 +0,0 @@
# macOS system settings
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
- `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
- smallest possible dock size
- dock on right side of screen
- automatically hide and show the dock: enabled
- accessibility
- 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

View File

@@ -1,32 +0,0 @@
# TODO items
## pending to call setup work initially done
- finished dwm config and installation on linux
- add dmenu (be able to launch generic programs, including my launch-name scripts)
- xresources working? use from/within theme-changing logic?
- finished artix/dinit setup
- remapped ctrl, alt, and super keys as needed
- adjusted keyrepeat speed, trackpad/mouse speed, etc
- did any normal/recommended stuff, refer to wiki
- include screen locking and sleep/hibernate
- figured out wiregaurd/vpn stuff
- finish xlibre setup, including installing any needed packages and doing config
- web browsers:
- primary, qutebrowser: config and install
- secondary, tor and either brave or librewolf: install only (no config)
## optional
- for macos: homebrew --> macports by 2026 sept (and audacity --> tenacity)
- configured neomutt
- config for mpd, and client(s), (mpd clients to consider: mpc, ncmpcpp, ncmpc, inori)
- get find, xargs, and awk (use nawk) as unified as i can across system types
- switch terminal from kitty to st
- seems mpv install (maybe others?) bring in wayland, see if i can remove it
- adjusted tmux so that n goes next/down and N goes prev/up in search results
- figured out nvim debug options for linux and macos, then update nvim's dap.lua
- picked and configured rss reader
- newsboat? others? option with inbox and separate queues?
- make all these scripts POSIX-compliant (or at least usable in ksh/oksh)

View File

@@ -1,52 +0,0 @@
# notes regarding my workflow and system use
## workspaces layout
idea from the ThePrimeagen: designated workspace/tags/desktop per app/purpose
| key | app/focus
|-----|-----------
| 1. | tbd
| 2. | music making - misc
| 3. | music making - daw
| 4. | listening/wathcing (any music, audio, or video)
| 5. | games
| 6. | comms (emails, chats, av/calls)
| 7. | web browser
| 8. | primary terminal (with tmux)
| 9. | general - misc (catch-all)
| 0. | system monitor (htop)
- the "key" column above lists the key to press (+ mod) to switch to a tag/workspace
- programs which i'm likely to use with peripherals (i.e. trackpad, mouse, stylus,
etc) should be where i can navigate those screens with one hand
- for me, my left hand would still be on the keyboard, so: workspaces 1 through 5
### usage notes
- my default approach is to run program/client windows in fullscreen
- note: on macOS, this is not mac's notion of fullscreen with windows essentially
moved to a new desktop; instead, i just want the windows taking up all of the
normal screen space (excluding any menu bar at the top of the screen)
- mental model for navigating windows:
- each window is in a stack
- keybinds: mod + j/k, to move down/up the stack
- each tab is in a circular list (imagine it is horizontal)
- keybinds: mod + h/l, to move left/right in this list
- note: in primary terminal, i'm running tmux, which has its own navigation approach,
refer to the tmux.conf and tmux-session-init scripts
- for the workspaces where i keep multiple apps, i try to maintain consistent order of
those apps within the stack of each respective workspace
## theme notes
| theme name | focus / use context
|-------------|--------------------
| pina | admin/productivity work (default theme)
| tokyodark | programming/coding
| gruvbox | music
| mars | night (within 2+ hours of sleep)
| lanterns | (tbd?)
| lighthouse | (tbd?)
| jade | (tbd?)

View File

@@ -1,43 +1,34 @@
#!/bin/zsh
build_install() {
echo "-- installing $1"
target=$(echo "custom-$1-$BOX_SETUP_OS-$BOX_SETUP_DISTRO" | tr '-' '_')
[[ ! -e ./installs_and_builds/$target ]] &&
target=$(echo "custom-$1-$BOX_SETUP_OS-default" | tr '-' '_')
[[ ! -e ./installs_and_builds/$target ]] &&
target=$(echo "custom-$1-default" | tr '-' '_')
[[ ! -e ./installs_and_builds/$target ]] &&
${=BOX_SETUP_INSTALL_COMMAND} "$1" &&
return
tmpdir=$(mktemp -d "${TMPDIR:-/tmp}/$1.XXXXXXXX") || {
echo "could not create temp dir for $1 build" && return
}
custom_script_path=$(pwd)/installs_and_builds/$target
pushd $tmpdir > /dev/null
$custom_script_path
popd > /dev/null
find_scripts_in_dir() {
echo $(find $1 -maxdepth 1 -mindepth 1 -type f | sort)
}
echo "---- updating package manager / packages"
[[ -n "$BOX_SETUP_UPDATE_PKG_MANAGER_AND_DEFS_CMD" ]] &&
${=BOX_SETUP_UPDATE_PKG_MANAGER_AND_DEFS_CMD}
[[ -n "$BOX_SETUP_UPDATE_PKGS_CMD" ]] && ${=BOX_SETUP_UPDATE_PKGS_CMD}
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 ---------------"
[[ -z $1 ]] && system_types_list="base" || system_types_list="base,$1"
echo "$system_types_list" |
sed -E "s/,/\n/g" |
while IFS= read -r system_type; do
echo "-------- install for system type: $system_type"
cat "installs_and_builds/programs_$system_type.txt" |
while IFS= read -r program_name; do
build_install "$program_name"
done
done
echo "-------- for system types: $system_types_list"
install_scripts_from_list "${scripts_from_dir[@]}"

View File

@@ -1,3 +0,0 @@
#!/bin/sh
echo "program not applicable for this OS or distro, skipping build/installation"

View File

@@ -1,4 +0,0 @@
#!/bin/zsh
# use normal package manager for macos install, since default is noop for other OSs
${=BOX_SETUP_INSTALL_COMMAND} --cask nikitabobko/tap/aerospace

View File

@@ -1,3 +0,0 @@
#!/bin/sh
echo "TODO: custom script for bitwig not yet implemented; may just want manual install"

View File

@@ -1,3 +0,0 @@
#!/bin/sh
echo "TODO: custom script for bitwig not yet implemented; may just want manual install"

View File

@@ -1,3 +0,0 @@
#!/bin/sh
echo "intentionally skipping build/installation for macos"

View File

@@ -1,3 +0,0 @@
#!/bin/sh
echo "program not applicable for this OS or distro, skipping build/installation"

View File

@@ -1,4 +0,0 @@
#!/bin/zsh
# use normal package manager for macos install, since default is noop for other OSs
${=BOX_SETUP_INSTALL_COMMAND} coreutils

View File

@@ -1,8 +0,0 @@
#!/bin/sh
# for now, use luke's build; i can make my own fork later if desired
git clone https://github.com/LukeSmithxyz/dmenu.git
pushd dmenu > /dev/null
sudo make clean install
popd > /dev/null

View File

@@ -1,3 +0,0 @@
#!/bin/sh
echo "intentionally skipping build/installation for macos"

View File

@@ -1,7 +0,0 @@
#!/bin/sh
git clone https://git.drinkingtea.net/david/dwm.git
pushd dwm > /dev/null
sudo make clean install
popd > /dev/null

View File

@@ -1,3 +0,0 @@
#!/bin/sh
echo "intentionally skipping build/installation for macos"

View File

@@ -1,3 +0,0 @@
#!/bin/sh
echo "program not applicable for this OS or distro, skipping build/installation"

View File

@@ -1,4 +0,0 @@
#!/bin/zsh
# use normal package manager for macos install, since default is noop for other OSs
${=BOX_SETUP_INSTALL_COMMAND} findutils

View File

@@ -1,3 +0,0 @@
#!/bin/sh
echo "intentionally skipping build/installation for macos"

View File

@@ -1,4 +0,0 @@
#!/bin/zsh
# adjust prefix for package manager before install
${=BOX_SETUP_INSTALL_COMMAND} --cask gimp

View File

@@ -1,4 +0,0 @@
#!/bin/zsh
# adjust prefix for package manager before install
${=BOX_SETUP_INSTALL_COMMAND} --cask kitty

View File

@@ -1,8 +0,0 @@
#!/bin/zsh
git clone https://github.com/ibara/oksh.git
pushd oksh > /dev/null
./configure
make && sudo make install
popd > /dev/null

View File

@@ -1,3 +0,0 @@
#!/bin/sh
echo 'TODO: custom script for mise is not yet implemented'

View File

@@ -1,3 +0,0 @@
#!/bin/sh
echo "intentionally skipping build/installation for macos"

View File

@@ -1,4 +0,0 @@
#!/bin/zsh
# for debian, use package name `openssh-server` instead of `openssh`
${=BOX_SETUP_INSTALL_COMMAND} openssh-server

View File

@@ -1,4 +0,0 @@
#!/bin/zsh
# change package name; on arch it is 'pandoc-cli'
${=BOX_SETUP_INSTALL_COMMAND} pandoc-cli

View File

@@ -1,4 +0,0 @@
#!/bin/zsh
# change package name; on artix it is 'pandoc-bin'
${=BOX_SETUP_INSTALL_COMMAND} pandoc-bin

View File

@@ -1,3 +0,0 @@
#!/bin/sh
echo "intentionally skipping build/installation for macos"

View File

@@ -1,3 +0,0 @@
#!/bin/sh
echo "program not applicable for this OS or distro, skipping build/installation"

View File

@@ -1,4 +0,0 @@
#!/bin/zsh
# use normal package manager for macos install, since default is noop for other OSs
${=BOX_SETUP_INSTALL_COMMAND} koekeishiya/formulae/skhd

View File

@@ -1,9 +0,0 @@
#!/bin/sh
# git clone https://git.drinkingtea.net/david/st.git
# pushd st > /dev/null
# sudo make clean install
# popd > /dev/null
echo "TODO: st build not yet done, skipping this install for now"

View File

@@ -1,3 +0,0 @@
#!/bin/sh
echo "intentionally skipping build/installation for macos"

View File

@@ -1,4 +0,0 @@
#!/bin/zsh
# tenacity is not readily available on macos, so just use audacity for now
${=BOX_SETUP_INSTALL_COMMAND} --cask audacity

View File

@@ -1,17 +0,0 @@
#!/bin/zsh
# change package name; on artix it is 'pandoc-bin'
${=BOX_SETUP_INSTALL_COMMAND} \
xlibre-xserver \
xlibre-video-amdgpu \
xlibre-input-libinput \
libx11 \
libxft \
libxinerama
# `xlibre-video-amdgpu` depends on system gpu; ref lspci; maybe use `xlibre-drivers` instead
# if `xlibre-input-libinput` doesn't work, try `xlibre-input-evdev` (generic module) if libinput does not work
${=BOX_SETUP_INSTALL_COMMAND} \
xorg-xinit \
xorg-xrandr

View File

@@ -1,3 +0,0 @@
#!/bin/sh
echo "intentionally skipping build/installation for macos"

View File

@@ -1,3 +0,0 @@
#!/bin/sh
echo "intentionally skipping build/installation for macos"

View File

@@ -0,0 +1,25 @@
#!/bin/zsh
install_neovim_dir=$HOME/.local/build/neovim
install_neovim_version="v0.10.3"
[ ! -z $NVIM_VERSION ] && install_neovim_version="$NVIM_VERSION"
echo "install_neovim_version: \"$install_neovim_version\""
[ ! -d $install_neovim_dir ] && git clone https://github.com/neovim/neovim.git $install_neovim_dir
git -C $install_neovim_dir fetch --all
git -C $install_neovim_dir checkout $install_neovim_version
make -C $install_neovim_dir clean
make -C $install_neovim_dir CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make -C $install_neovim_dir install
# from primeagen's dev repo, uncomment/edit as needed
# git clone https://github.com/ThePrimeagen/harpoon.git $HOME/personal/harpoon
# cd $HOME/personal/harpoon
# git fetch
# git checkout harpoon2
# git clone https://github.com/ThePrimeagen/vim-apm.git $HOME/personal/vim-apm
# git clone https://github.com/ThePrimeagen/caleb.git $HOME/personal/caleb
# git clone https://github.com/nvim-lua/plenary.nvim.git $HOME/personal/plenary

View File

@@ -1,39 +0,0 @@
gcc
musl
coreutils
findutils
xlibre
make
mpv
kitty
st
dmenu
zsh
ksh
tmux
neovim
neomutt
curl
grep
ripgrep
sed
less
openssh
fzf
jq
parallel
gettext
htop
ffmpeg
mpd
ncmpcpp
git
xclip
mandoc
calcurse
zathura
gimp
dwm
qutebrowser
aerospace
skhd

View File

@@ -1,2 +0,0 @@
tenacity
bitwig-studio

View File

@@ -1,5 +0,0 @@
clang
cmake
mise
podman
pandoc

View File

@@ -0,0 +1,8 @@
#!/bin/zsh
[[ -n "$BOX_SETUP_UPDATE_PKG_MANAGER_AND_DEFS_CMD" ]] &&
${=BOX_SETUP_UPDATE_PKG_MANAGER_AND_DEFS_CMD}
[[ -n "$BOX_SETUP_UPDATE_PKGS_CMD" ]] &&
${=BOX_SETUP_UPDATE_PKGS_CMD}

3
installs_and_builds/s01_libs Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/zsh
# ${=BOX_SETUP_INSTALL_COMMAND} zxcv_placeholder

29
installs_and_builds/s02_utils Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/zsh
# likely on unix systems already: find, xargs, awk? (maybe get alternative like nawk?)
${=BOX_SETUP_INSTALL_COMMAND} \
curl \
grep \
ripgrep \
sed \
fzf \
jq \
parallel \
make \
cmake \
gettext \
htop
utils_package_name_pandoc="pandoc"
case $BOX_SETUP_DISTRO in
(arch | alpine)
utils_package_name_pandoc="pandoc-cli"
;;
(artix)
utils_package_name_pandoc="pandoc-bin"
;;
esac
${=BOX_SETUP_INSTALL_COMMAND} $utils_package_name_pandoc
[[ "$BOX_SETUP_OS" = "macos" ]] &&
${=BOX_SETUP_INSTALL_COMMAND} coreutils findutils

3
installs_and_builds/s03_shell Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/zsh
${=BOX_SETUP_INSTALL_COMMAND} zsh

View File

@@ -0,0 +1,6 @@
#!/bin/zsh
install_option_prefix=''
[[ "$BOX_SETUP_OS" = "macos" ]] && install_option_prefix='--cask'
# NOTE: ghostty not currently in debian repos, maybe build from source
${=BOX_SETUP_INSTALL_COMMAND} "$install_option_prefix" ghostty

View File

@@ -0,0 +1,3 @@
#!/bin/zsh
${=BOX_SETUP_INSTALL_COMMAND} tmux

View File

@@ -0,0 +1,18 @@
#!/bin/zsh
linux_wm_and_utils() {
# TODO: pick wm for linux; options: dwm, i3, others?
echo "linux_wm_and_utils not yet implemented"
}
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
}
[[ "$BOX_SETUP_OS" = "macos" ]] && macos_wm_and_utils || linux_wm_and_utils

View File

@@ -0,0 +1,3 @@
#!/bin/zsh
${=BOX_SETUP_INSTALL_COMMAND} neovim

View File

@@ -0,0 +1,3 @@
#!/bin/zsh
${=BOX_SETUP_INSTALL_COMMAND} mutt

View File

@@ -0,0 +1,3 @@
#!/bin/zsh
${=BOX_SETUP_INSTALL_COMMAND} khal

View File

@@ -0,0 +1,10 @@
#!/bin/zsh
# TODO: get browser config and install set up
# current idea: qutebrowser for general, tor for sensitive, brave as a backup option
# install_option_prefix=''
# [[ "$BOX_SETUP_OS" = "macos" ]] && install_option_prefix='--cask'
# firefox_package_name='firefox'
# [[ "$BOX_SETUP_DISTRO" = "debian" ]] && firefox_package_name='firefox-esr'
# ${=BOX_SETUP_INSTALL_COMMAND} "$install_option_prefix" "$firefox_package_name"

4
installs_and_builds/s13_rss Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/zsh
# TODO: pick rss reader; newsboat? others? option with inbox and separate queues?
# ${=BOX_SETUP_INSTALL_COMMAND} zxcv-placeholder

View File

@@ -0,0 +1,9 @@
#!/bin/zsh
# local music
${=BOX_SETUP_INSTALL_COMMAND} mpd mpc ncmpcpp
# possible mpd clients to consider: ncmpc, inori
# spotify
# TODO: decide if i want to use the package-manager install below, or build from source
# ${=BOX_SETUP_INSTALL_COMMAND} ncspot

View File

@@ -0,0 +1,3 @@
#!/bin/zsh
${=BOX_SETUP_INSTALL_COMMAND} mpv

View File

@@ -0,0 +1,4 @@
#!/bin/zsh
[[ "$BOX_SETUP_OS" = "macos" ]] && exit 0 # TODO: maybe find an option for macos
${=BOX_SETUP_INSTALL_COMMAND} nsxiv

View File

@@ -0,0 +1,4 @@
#!/bin/zsh
[[ "$BOX_SETUP_OS" = "macos" ]] && exit 0 # TODO: maybe find an option for macos
${=BOX_SETUP_INSTALL_COMMAND} zathura

View File

@@ -0,0 +1,4 @@
#!/bin/zsh
# TODO: do i even want a filemanager? if yes, pick one; consider: lf, ranger, others?
# ${=BOX_SETUP_INSTALL_COMMAND} zxcv-placeholder

View File

@@ -0,0 +1,6 @@
#!/bin/zsh
# only audio editor(s) in this file; daws are handled separately
install_option_prefix=''
[[ "$BOX_SETUP_OS" = "macos" ]] && install_option_prefix='--cask'
${=BOX_SETUP_INSTALL_COMMAND} "$install_option_prefix" audacity

View File

@@ -0,0 +1,4 @@
#!/bin/zsh
# TODO: set this up; likely using ffmpeg (work on macos?), maybe others
# ${=BOX_SETUP_INSTALL_COMMAND} zxcv-placeholder

View File

@@ -0,0 +1,7 @@
#!/bin/zsh
install_option_prefix=''
[[ "$BOX_SETUP_OS" = "macos" ]] && install_option_prefix='--cask'
${=BOX_SETUP_INSTALL_COMMAND} "$install_option_prefix" gimp
# ${=BOX_SETUP_INSTALL_COMMAND} imagemagick # TODO: consider this program too

3
installs_and_builds/s30_git Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/zsh
${=BOX_SETUP_INSTALL_COMMAND} git

13
installs_and_builds/s31_docker Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/zsh
setup_docker_on_debian() {
# refer to https://docs.docker.com/engine/install/debian/
# build this function based on that
# in that, could use BOX_SETUP_INSTALL_COMMAND or just apt install
echo "setup_docker_on_debian function not implemented"
}
# TODO: decide on docker vs others
[[ "$BOX_SETUP_DISTRO" = "debian" ]] && setup_docker_on_debian || {
${=BOX_SETUP_INSTALL_COMMAND} docker
}

View File

@@ -0,0 +1,13 @@
#!/bin/zsh
[[ "$BOX_SETUP_OS" != "macos" ]] && {
${=BOX_SETUP_INSTALL_COMMAND} gcc g++ clang clang++
}
# TODO: review and decide if the things below are needed
# install_lua_package="lua5.1"
#[[ "$BOX_SETUP_OS" = "macos" ]] && install_lua_package="lua@5.1"
#${=BOX_SETUP_INSTALL_COMMAND} "$install_lua_package" liblua5.1-0-dev
# TODO: do i want to install luarocks? lazy.nvim plugin manager currently expects it
#luarocks install luacheck

View File

@@ -1,41 +1,34 @@
#!/bin/sh
#!/bin/zsh
. ./src_files/shell/profile # ensure env vars set for use below
echo "---- making system dirs ----------------"
source ./src_files/.config/zsh/.zshenv # ensure env vars set for use below
# some standard/common directories, some overlap/use in XDG directories
! [ -d "$DIR_LOCAL" ] && mkdir -p "$DIR_LOCAL"
! [ -d "$DIR_BIN" ] && mkdir -p "$DIR_BIN"
! [ -d "$DIR_SCRIPTS" ] && mkdir -p "$DIR_SCRIPTS"
! [ -d "$DIR_USER_OPT" ] && mkdir -p "$DIR_USER_OPT"
! [ -d "$DIR_USER_LIB" ] && mkdir -p "$DIR_USER_LIB"
[[ ! -d "$DIR_LOCAL" ]] && mkdir -p "$DIR_LOCAL"
[[ ! -d "$DIR_BIN" ]] && mkdir -p "$DIR_BIN"
[[ ! -d "$DIR_SCRIPTS" ]] && mkdir -p "$DIR_SCRIPTS"
[[ ! -d "$DIR_TMP" ]] && mkdir -p "$DIR_TMP"
[[ ! -d "$DIR_USER_OPT" ]] && mkdir -p "$DIR_USER_OPT"
[[ ! -d "$DIR_USER_LIB" ]] && mkdir -p "$DIR_USER_LIB"
# directories related to XDG Base Directory specification
! [ -d "$XDG_CONFIG_HOME" ] && mkdir -p "$XDG_CONFIG_HOME"
! [ -d "$XDG_CACHE_HOME" ] && mkdir -p "$XDG_CACHE_HOME"
! [ -d "$XDG_DATA_HOME" ] && mkdir -p "$XDG_DATA_HOME"
! [ -d "$XDG_STATE_HOME" ] && mkdir -p "$XDG_STATE_HOME"
[[ ! -d "$XDG_CONFIG_HOME" ]] && mkdir -p "$XDG_CONFIG_HOME"
[[ ! -d "$XDG_CACHE_HOME" ]] && mkdir -p "$XDG_CACHE_HOME"
[[ ! -d "$XDG_DATA_HOME" ]] && mkdir -p "$XDG_DATA_HOME"
[[ ! -d "$XDG_STATE_HOME" ]] && mkdir -p "$XDG_STATE_HOME"
# additional directories for how i'm organizing my system
! [ -d "$DIR_HOME_BOX" ] && mkdir -p "$DIR_HOME_BOX"
! [ -d "$DIR_INBOX" ] && mkdir -p "$DIR_INBOX"
! [ -d "$DIR_NOTES" ] && mkdir -p "$DIR_NOTES"
! [ -d "$DIR_MUSIC" ] && mkdir -p "$DIR_MUSIC"
! [ -d "$DIR_DEV" ] && mkdir -p "$DIR_DEV"
! [ -d "$DIR_GIT_PROJECTS" ] && mkdir -p "$DIR_GIT_PROJECTS"
! [ -d "$DIR_GIT_PROJECTS/me" ] && mkdir -p "$DIR_GIT_PROJECTS/me"
! [ -d "$DIR_GIT_PROJECTS/forks" ] && mkdir -p "$DIR_GIT_PROJECTS/forks"
! [ -d "$DIR_GIT_PROJECTS/learning" ] && mkdir -p "$DIR_GIT_PROJECTS/learning"
! [ -d "$DIR_GIT_PROJECTS/other" ] && mkdir -p "$DIR_GIT_PROJECTS/other"
[[ ! -d "$DIR_HOME_BOX" ]] && mkdir -p $DIR_HOME_BOX
[[ ! -d "$DIR_MUSIC" ]] && mkdir -p $DIR_MUSIC
[[ ! -d "$DIR_NOTES" ]] && mkdir -p $DIR_NOTES
[[ ! -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
! [ -d "$DIR_REAPER_PORTABLE_SHARED" ] && mkdir -p "$DIR_REAPER_PORTABLE_SHARED"
! [ -d "$DIR_REAPER_PORTABLE_LINUX" ] && mkdir -p "$DIR_REAPER_PORTABLE_LINUX"
! [ -d "$DIR_REAPER_PORTABLE_MACOS" ] && mkdir -p "$DIR_REAPER_PORTABLE_MACOS"
# xdg spec and/or clean-up of home dir
echo "---- making xdg-spec/home-clean-up files"
! [ -d "$XDG_CONFIG_HOME/cups" ] && mkdir -p "$XDG_CONFIG_HOME/cups"
! [ -d "$XDG_DATA_HOME/irb" ] && mkdir -p "$XDG_DATA_HOME/irb"
! [ -d "$XDG_DATA_HOME/ncmpcpp" ] && mkdir -p "$XDG_DATA_HOME/ncmpcpp"
! [ -d "$XDG_CACHE_HOME/maven/repository" ] && mkdir -p "$XDG_CACHE_HOME/maven/repository"
[[ ! -d "$DIR_REAPER_PORTABLE_SHARED" ]] && mkdir -p $DIR_REAPER_PORTABLE_SHARED
[[ ! -d "$DIR_REAPER_PORTABLE_LINUX" ]] && mkdir -p $DIR_REAPER_PORTABLE_LINUX
[[ ! -d "$DIR_REAPER_PORTABLE_MACOS" ]] && mkdir -p $DIR_REAPER_PORTABLE_MACOS

View File

@@ -0,0 +1,14 @@
// 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

View File

@@ -1,21 +1,12 @@
# Manual steps needed after dotfile copy and/or installs
## all systems
- shell
- check user's shell using `echo $SHELL` or otherwise
- if not the desired shell:
- `cat /etc/shells` (or `chsh -l` if supported) to see options
- if target shell isn't listed, add it to `/etc/shells`
- then change the shell with `chsh -s <path to target shell>`
## macOS
- aerospace
- grant aerospace permission in accessibility settings
- likely need system reboot before aerospace works
- 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

View File

@@ -0,0 +1,61 @@
# notes regarding my workflow and intended use of workspaces
## workspaces layout
idea from the ThePrimeagen: designated workspace/label/desktop per app/purpose
### current layout
| key | app/focus |
|-----|-----------|
| 1. | notes (nvim, obsidian) |
| 2. | music makeing - misc |
| 3. | music making - daw |
| 4. | drawing (gimp) |
| 5. | music/audio listening |
| 6. | comms (emails, chats, av/calls) |
| 7. | web browser |
| 8. | terminal (primary; one-off terminals & tui apps can be anywhere) |
| 9. | programming - misc (whatever is not in primary terminal) |
| 0. | general - misc (catch-all) |
### 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)
## workflow / use notes
- related to the layout above, my approach is to run almost every window in fullscreen
- note: on macOS, this is not mac's notion of fullscreen, which basically moves
windows to new workspaces/desktops when going to fullscreen mode; instead, when i
say 'fullscreen', the idea is taking up all of the normal screen (excluding the
menu bar at the top of the screen)
- key bindings are set for moving window focus up/down (vim style: mod + k/j)
- the mental model here is that every fullscreen window is in a stack, so i can move
focus up and down the stack (and i try to maintain consistent order in stacks,
e.g. in the comms workspace, email is always on the bottom and chat apps are above)
- for apps with tabs, pair the above mental model of a stack with a mental model of a
circular list being in any position in that stack
- so, keybindings are also set for previous/next tab (vim style: mod + h/l)
- specifically, mod+h is mapped to ctrl+shift+tab and mod+l is mapped to ctrl+tab,
so it should work anywhere ctrl+tab and ctrl+shift+tab work
- all this said, it is better to keep things simple when possible and avoid having too
many windows and/or tabs open at one time; however, with the designated purpose for
each workspace and the mental models above, it rarely takes me long to find what i need
## example cases
- if i want a particular browser window, i jump to workspace 9, then move focus
up or down until i get to the window i want; if the window is right but i need
a different tab, i then just move "right or left" through my tabs
- if i want a particular music-playing app/tui, i jumpt to workspace 4 and move
focus up or down as needed to find it
- variation case: if i want a particular terminal workspace, i jump to workspace
8, but then i'm in tmux land and navigate via the methods i've set up for tmux

View File

@@ -1,38 +0,0 @@
#!/bin/sh
prefix="/usr"
exec_prefix="${prefix}"
xrdb="xrdb"
xinitdir="/etc/X11/xinit"
xmodmap="xmodmap"
userresources="$HOME/.Xresources"
usermodmap="$HOME/.Xmodmap"
sysresources="$xinitdir/.Xresources"
sysmodmap="$xinitdir/.Xmodmap"
# merge in defaults and keymaps
[ -x /usr/bin/cpp ] && xinit_nocpp_opt="" || xinit_nocpp_opt="-nocpp"
[ -f "$sysresources" ] && "$xrdb" "$xinit_nocpp_opt" -merge "$sysresources"
[ -f "$sysmodmap" ] && "$xmodmap" "$sysmodmap"
[ -f "$userresources" ] && "$xrdb" -nocpp -merge "$userresources"
[ -f "$usermodmap" ] && "$xmodmap" "$usermodmap"
# source xinitdrc.d script files
[ -d "$xinitdir"/xinitrc.d ] && {
for f in "$xinitdir/xinitrc.d"/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
}
# xrandr mode for laptop display (framework 13in), target 1920x1280 resolution
dispmanage_modeline=$(cvt 1920 1280 60 | sed -n '2p' | sed -E "s/^Modeline //g")
dispmanage_mode_id=$(printf "%s" "$dispmanage_modeline" | sed -E "s/^([^ ]+)\s.*$/\1/g")
printf "%s" "$dispmanage_modeline" | xargs xrandr --newmode
printf "%s" "$dispmanage_mode_id" | xargs xrandr --addmode eDP
xrandr --output eDP --mode "1920x1280_60.00"
# start window manager
exec dwm

View File

@@ -1,64 +1,133 @@
# ref: https://nikitabobko.github.io/AeroSpace/commands
# ref: https://nikitabobko.github.io/AeroSpace/guide
# options commands : https://nikitabobko.github.io/AeroSpace/commands
after-startup-command = []
start-at-login = true
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 = 'vertical' # 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
accordion-padding = 0
default-root-container-layout = 'accordion' # opts: tiles accordion
default-root-container-orientation = 'vertical' # opts: horizontal vertical auto
# See https://nikitabobko.github.io/AeroSpace/guide#key-mapping
[key-mapping]
preset = 'qwerty' # opts: qwerty dvorak colemak
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* - between windows and other windows
inner.horizontal = 0
inner.vertical = 0
outer.left = 0 # outer* - between windows and monitor edges
outer.left = 0
outer.bottom = 0
outer.top = 0
outer.right = 0
[mode.main.binding]
# layouts
cmd-comma = 'layout v_accordion'
cmd-period = 'layout h_tiles'
cmd-slash = 'layout floating'
# '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
# window resizing
# 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-comma = 'layout v_accordion'
alt-period = 'layout h_tiles'
alt-slash = 'layout horizontal vertical'
# See: https://nikitabobko.github.io/AeroSpace/commands#focus
# new windows are added to the stack "below" the current, so swap up and down
alt-j = 'focus up'
alt-k = 'focus down'
# 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
# new windows are added to the stack "below" the current, so swap up and down
alt-shift-j = 'move up'
alt-shift-k = 'move down'
alt-shift-h = 'move left'
alt-shift-l = 'move right'
# See: https://nikitabobko.github.io/AeroSpace/commands#resize
alt-minus = 'resize smart -50'
alt-equal = 'resize smart +50'
# window focus/view
cmd-j = 'focus up' # new windows are added "below" current, so swap up and down
cmd-k = 'focus down'
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 10'
# 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-0 = 'workspace 0'
# window movement
cmd-shift-j = 'move up' # new windows are added "below" current, so swap up and down
cmd-shift-k = 'move down'
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 10'
# 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-0 = 'move-node-to-workspace 0'
# 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']
s = ['flatten-workspace-tree', 'layout v_accordion', 'mode main']
g = ['flatten-workspace-tree', 'layout h_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']

View File

@@ -0,0 +1,83 @@
#? Config file for btop v. 1.4.5
vim_keys = True # shift+h help, shift+k kill
log_level = "WARNING" #* opt: ERROR, WARNING, INFO, DEBUG
update_ms = 4000
show_battery = True
selected_battery = "Auto"
show_battery_watts = True
color_theme = "~/.config/btop/themes/theme.theme"
theme_background = False #* True: show theme background, False: needed for transparency
truecolor = True
rounded_corners = False
force_tty = False
#* graph options: default, block, tty, braille
graph_symbol = "braille"
graph_symbol_cpu = "default"
graph_symbol_mem = "default"
graph_symbol_net = "default"
graph_symbol_proc = "default"
#* presets boxname:pos:graph - pos (0, 1), graph (default, block, tty, braille)
presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty"
shown_boxes = "proc mem net cpu" # opt: cpu mem net proc gpu0 gpu1 gpu2 gpu3 gpu4 gpu5
proc_sorting = "cpu lazy"
proc_reversed = False
proc_left = True
proc_tree = False
proc_colors = True #* cpu graph colors in proc list
proc_gradient = False
proc_per_core = False
proc_mem_bytes = True
proc_cpu_graphs = False
proc_info_smaps = False #* /proc/[pid]/smaps for proc memory info, accurate but slow
proc_filter_kernel = False
proc_aggregate = False #* aggregate child procs under parent in tree view
cpu_graph_upper = "user" #* opt: Auto, total, idle, system, user (maybe others per system)
cpu_graph_lower = "total"
cpu_invert_lower = False
cpu_single_graph = False
cpu_bottom = False
show_uptime = True
show_cpu_watts = True #* requires `make setcap`, `make setuid`, or sudo
check_temp = True
cpu_sensor = "Auto"
show_coretemp = True
cpu_core_map = "" #* form x:y x:y, x is core with wrong temp, y is core with correct temp
temp_scale = "celsius" #* opt: celsius, fahrenheit, kelvin, rankine
base_10_sizes = False #* False to use KiB = 1024, True to use KB = 1000
show_cpu_freq = True
clock_format = "%H /host"
background_update = True #* set False if menu flicker
custom_cpu_name = ""
#* disks_filter: mountpoint full paths; can prepend exclude= to show all non-matches
disks_filter = ""
mem_graphs = True #* True for graphs, False for meters
mem_below_net = False #* mem box below net box
zfs_arc_cached = True #* cached and available mem include ZFS ARC
show_swap = True
swap_disk = True #* swap as a disk, overrides show_swap setting
show_disks = True
only_physical = True #* True for physical disks only, False includes network/RAM/etc
use_fstab = True #* disks from /etc/fstab, overrides only_physical value
zfs_hide_datasets = False #* hide datasets and show zfs pools instead
disk_free_priv = False #* show free space for privileged users
show_io_stat = True
io_mode = False #* show big graphs for disk read/write
io_graph_combined = False #* graph shows combined read/write
io_graph_speeds = "" #* graph top speed in MiB/s (default 100), format "mountpoint:speed"
net_download = 100 #* network graph fixed values, Mebibits, only used if net_auto False
net_upload = 100
net_auto = True #* graph auto rescaling mode, ignores net_download and net_upload values
net_sync = True #* sync download/upload, auto scale to highest
net_iface = "" #* start with this interface
base_10_bitrate = "Auto"

View File

@@ -0,0 +1 @@
placeholder, will be replaced with symlink during copy_dotfiles.sh

View File

@@ -1,17 +1,8 @@
# font stuff
font-style = Regular
font-feature = -calt, -liga, -dlig
# window stuff
macos-titlebar-proxy-icon = hidden
title = " "
window-decoration = none
title = ""
# cursor stuff
cursor-style = "block"
cursor-style-blink = false
shell-integration-features = no-cursor
# theme stuff
config-file = ?"~/.config/zz-this-box/themes/.current-theme/ghostty"
# theme opts: tokyonight_night_manual, bamboo
theme = tokyonight_night_manual

View File

@@ -0,0 +1,25 @@
# primary
background = #111c18
foreground = #C1C497
cursor-color = #D7C995
cursor-text = #000000
# normal colors
palette = 0=#23372B
palette = 1=#FF5345
palette = 2=#549e6a
palette = 3=#459451
palette = 4=#509475
palette = 5=#D2689C
palette = 6=#2DD5B7
palette = 7=#F6F5DD
# bright colors
palette = 8=#53685B
palette = 9=#db9f9c
palette = 10=#143614
palette = 11=#E5C736
palette = 12=#ACD4CF
palette = 13=#75bbb3
palette = 14=#8CD3CB
palette = 15=#9eebb3

View File

@@ -50,9 +50,9 @@
(default-view
(show-menubar yes)
(show-statusbar no)
(show-rulers yes)
(show-rulers no)
(show-scrollbars yes)
(show-selection no)
(show-selection yes)
(show-layer-boundary no)
(show-canvas-boundary yes)
(show-guides yes)
@@ -71,9 +71,9 @@
(default-fullscreen-view
(show-menubar yes)
(show-statusbar no)
(show-rulers yes)
(show-rulers no)
(show-scrollbars yes)
(show-selection no)
(show-selection yes)
(show-layer-boundary no)
(show-canvas-boundary yes)
(show-guides yes)

View File

@@ -28,15 +28,15 @@ show_cpu_frequency=0
show_cached_memory=1
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=6
color_scheme=1
enable_mouse=1
delay=40
hide_function_bar=0
header_layout=two_50_50
column_meters_0=NetworkIO NetworkIO Blank MemorySwap MemorySwap Blank LeftCPUs8 LeftCPUs2
column_meter_modes_0=2 3 2 1 3 2 3 1
column_meters_1=Battery DateTime Hostname System Uptime Blank LoadAverage Tasks Blank DiskIO FileDescriptors Blank RightCPUs8 RightCPUs2
column_meter_modes_1=1 2 2 2 2 2 2 2 2 2 2 2 3 1
column_meters_0=Battery DateTime Hostname System Uptime Blank AllCPUs2 AllCPUs8 Blank
column_meter_modes_0=1 2 2 2 2 2 1 3 2
column_meters_1=Tasks LoadAverage Blank Memory Swap MemorySwap Blank DiskIO FileDescriptors Blank NetworkIO NetworkIO
column_meter_modes_1=2 2 2 1 1 3 2 2 2 2 2 3
tree_view=0
sort_key=47
tree_sort_key=0

View File

@@ -1,20 +0,0 @@
input {
kb_options = caps:escape, \
ctrl:swap_lalt_lctl, \
ctrl:swap_ralt_rctl, \
altwin:swap_ralt_rwin # this one seems to not work, but leaving here for now
repeat_rate = 70
repeat_delay = 250
touchpad {
clickfinger_behavior = true # 2-finger click is right-click
scroll_factor = 0.3
natural_scroll = false # natural is a bad name for this
}
}
# custom window rules per app
windowrulev2 = float, class:REAPER, title:^(REAPER).*$
windowrulev2 = size 1120 744, class:REAPER, title:^(REAPER).*$
windowrulev2 = center, class:REAPER, title:^(REAPER).*$

View File

@@ -1 +0,0 @@
IRB.conf[:HISTORY_FILE] ||= File.join(ENV["XDG_DATA_HOME"], "irb", "history")

View File

@@ -1,27 +0,0 @@
# font stuff
# font_family Regular # Average Mono, maybe?
font_size 14
disable_ligatures always # no ligatures
symbol_map U+E000-U+F8FF none # no ligatures
# window stuff
hide_window_decorations yes
macos_hide_window_titlebar yes
window_title_format " "
window_margin_width 0
confirm_os_window_close 0
show_window_resize_notification no
# cursor stuff
cursor_shape block
cursor_blink_interval 0
macos_custom_beam_cursor yes
# theme stuff
# NOTE: on linux, may want background_opacity at 1.0 and let hyprland handle transparency
include ~/.config/kitty/theme.conf
background_opacity 0.94
# etc
enable_audio_bell no

View File

@@ -1,2 +0,0 @@
[ -r "$XDG_CONFIG_HOME/profile" ] && . "$XDG_CONFIG_HOME/profile"
[ -r "$XDG_CONFIG_HOME/rc" ] && . "$XDG_CONFIG_HOME/rc"

View File

@@ -1 +0,0 @@
<localRepository>${env.XDG_CACHE_HOME}/maven/repository</localRepository>

View File

@@ -1,4 +0,0 @@
h seek -5
l seek 5
H seek -30
L seek 30

View File

@@ -1,3 +0,0 @@
screenshot-format=png
screenshot-dir="~/dbox/inbox"
screenshot-template="%F-%p-%n"

View File

@@ -1,3 +0,0 @@
ncmcpp_directory = "$XDG_DATA_HOME/ncmpcpp"
lyrics_directory = "$DIR_MUSIC/.lyrics"
mpd_music_dir = "$DIR_MUSIC"

View File

@@ -0,0 +1,66 @@
initial_screen = "library"
library_tabs = ["playlists", "albums", "artists", "browse"]
[keybindings]
"Space" = "playpause"
##########################################################################################
# theme
# [theme] # from eltoncezar, similar to official spotify colors
# background = "#191414"
# primary = "#FFFFFF"
# secondary = "light black"
# title = "#1DB954"
# playing = "#1DB954"
# playing_selected = "#1ED760"
# playing_bg = "#191414"
# highlight = "#FFFFFF"
# highlight_bg = "#484848"
# error = "#FFFFFF"
# error_bg = "red"
# statusbar = "#191414"
# statusbar_progress = "#1DB954"
# statusbar_bg = "#1DB954"
# cmdline = "#FFFFFF"
# cmdline_bg = "#191414"
# search_match = "light red"
[theme] # from wojciech-zurek, tokyonight
background = "#1a1b26"
primary = "#9aa5ce"
secondary = "#414868"
title = "#9ece6a"
playing = "#7aa2f7"
playing_selected = "#bb9af7"
playing_bg = "#24283b"
highlight = "#c0caf5"
highlight_bg = "#24283b"
error = "#414868"
error_bg = "#f7768e"
statusbar = "#ff9e64"
statusbar_progress = "#7aa2f7"
statusbar_bg = "#1a1b26"
cmdline = "#c0caf5"
cmdline_bg = "#24283b"
search_match = "#f7768e"
# [theme] # from clooles, uses defaults/primary, supports transparency, for dynamic themes
# background = "default"
# primary = "foreground"
# secondary = "light black"
# title = "primary"
# playing = "primary"
# playing_selected = "primary"
# playing_bg = "primary"
# highlight = "#FFFFFF"
# highlight_bg = "#484848"
# error = "#FF0000"
# error_bg = "red"
# statusbar = "primary"
# statusbar_progress = "primary"
# statusbar_bg = "primary"
# cmdline = "default"
# cmdline_bg = "primary"
# search_match = "light red"

View File

@@ -1,6 +1,13 @@
local csGroup = vim.api.nvim_create_augroup("coreSettingsGroup", { clear = true })
local csgAutocmd = vim.api.nvim_create_autocmd
require("settings")
require("plugin_manager")
require("key_mappings")
require("util_functions")
require("auto_commands")
ThemeUpdate()
require("colorscheme_settings")
csgAutocmd({"BufWritePre"}, {
group = csGroup,
pattern = "*",
command = [[%s/\s\+$//e]],
})

View File

@@ -1,20 +0,0 @@
local autoCmdGroup = vim.api.nvim_create_augroup("autoCmdGroup", { clear = true })
local autoCmd = vim.api.nvim_create_autocmd
-- trim trailing whitespace on save
autoCmd({"BufWritePre"}, {
group = autoCmdGroup,
pattern = "*",
command = [[%s/\s\+$//e]],
})
-- adjust indent spacing for html files
autoCmd({"FileType"}, {
group = autoCmdGroup,
pattern = "html",
callback = function()
vim.opt_local.shiftwidth = 2
vim.opt_local.tabstop = 2
vim.opt_local.softtabstop = 2
end
})

View File

@@ -0,0 +1,17 @@
local defaultColorScheme = "tokyodark"
function SetColorSchemeWrapper(scheme)
scheme = scheme or defaultColorScheme
vim.cmd.colorscheme(scheme)
end
SetColorSchemeWrapper(defaultColorScheme)
--
-- SetColorSchemeWrapper("tokyodark")
-- SetColorSchemeWrapper("tokyonight-night")
-- SetColorSchemeWrapper("bamboo-vulgaris")
-- SetColorSchemeWrapper("rose-pine-main")
-- SetColorSchemeWrapper("gruvbox")
-- SetColorSchemeWrapper("slate")
-- SetColorSchemeWrapper("sorbet")

View File

@@ -11,9 +11,9 @@ vim.keymap.set("n", "<leader>n", vim.cmd.Ex)
vim.keymap.set("v", "J", ":m '>+1<CR>gv")
vim.keymap.set("v", "K", ":m '<-2<CR>gv")
-- add extra vertical padding for the cursor after half-page jumps
vim.keymap.set("n", "<C-d>", "<C-d>4<C-e>")
vim.keymap.set("n", "<C-u>", "<C-u>4<C-y>")
-- reduce effective distance of half-page jumps and vertically-center the cursor
vim.keymap.set("n", "<C-d>", "<C-d>4<C-y>M")
vim.keymap.set("n", "<C-u>", "<C-u>4<C-e>M")
-- open folds when iterating search results
vim.keymap.set("n", "n", "nzv")
@@ -22,27 +22,30 @@ vim.keymap.set("n", "N", "Nzv")
-- maintain cursor position after paragraph formatting
vim.keymap.set("n", "=ap", "mF=ap'F")
-- replace selected text, keep main register
vim.keymap.set("x", "<leader>P", [["_dP]])
-- 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", "v" }, "<leader>d", [["+d]])
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//gc<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() ToggleTabsSpaces() end)
-- open scratch/tmp buffers which won't prompt for file-save
vim.keymap.set("n", "<leader>ss", function() TmpBuff("enew") end)
vim.keymap.set("n", "<leader>sl", function() TmpBuff("vnew") end)
vim.keymap.set("n", "<leader>sj", function() TmpBuff("new") end)
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]])
@@ -61,24 +64,12 @@ kmgAutocmd('FileType', {
})
------------------------------------------------------------------------------------------
-- visual/ui-related toggles and shortcuts
-- quickfix TODO: learn about quickfix (:help quickfix), then set mappings
vim.keymap.set("n", "<leader>vl", function() ToggleCursorLine() end)
vim.keymap.set("n", "<leader>vc", function() ToggleColorColumn('90') end)
vim.keymap.set("n", "<leader>vn", function() ToggleLineNumbers() end)
vim.keymap.set("n", "<leader>vw", function() ToggleWritingMode() end)
------------------------------------------------------------------------------------------
-- quickfix and location lists
-- ref: :h quickfix or :h location-list
-- NOTE: look at :h setqflist and :h vim.diagnostic.setqflist()
vim.keymap.set("n", "<leader>qo", "<cmd>copen<CR>")
vim.keymap.set("n", "<leader>qc", "<cmd>cclose<CR>")
vim.keymap.set("n", "<leader>qn", "<cmd>cnext<CR>")
vim.keymap.set("n", "<leader>qp", "<cmd>cprev<CR>")
vim.keymap.set("n", "<leader>ln", "<cmd>lnext<CR>")
vim.keymap.set("n", "<leader>lp", "<cmd>lprev<CR>")
-- 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")
------------------------------------------------------------------------------------------
-- debugger and debugging ui
@@ -121,15 +112,15 @@ kmgAutocmd('LspAttach', {
callback = function(e)
local opts = { buffer = e.buf }
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
vim.keymap.set("n", "<leader>lh", function() vim.lsp.buf.hover() 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>lv", function() vim.diagnostic.open_float() end, opts)
vim.keymap.set("n", "<leader>lq", function() vim.diagnostic.setqflist() end, opts)
-- TODO: learn what the below commands are and if i want to set keymaps for them
-- vim.keymap.set("n", "<leader>lws", function() vim.lsp.buf.workspace_symbol() end, opts)
-- vim.keymap.set("n", "<leader>lca", function() vim.lsp.buf.code_action() end, opts)
-- vim.keymap.set("n", "<leader>lrl", function() vim.lsp.buf.references() end, opts)
-- vim.keymap.set("n", "<leader>lrn", function() vim.lsp.buf.rename() 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
})
@@ -147,10 +138,6 @@ vim.keymap.set('n', '<leader>ff', tscBuiltin.find_files, { desc = 'tscope find f
vim.keymap.set('n', '<leader>fg', tscBuiltin.git_files, { desc = 'tscope find git-tracked files' })
vim.keymap.set('n', '<leader>fb', tscBuiltin.buffers, { desc = 'tscope buffers' })
vim.keymap.set('n', '<leader>fh', tscBuiltin.help_tags, { desc = 'tscope help tags' })
-- TODO: maybe add commands:
-- - find files including git-ignored (that is, have both a yes and no option)
-- - grep files including git-ignored (that is, have both a yes and no option)
-- - grep which supports fuzzy-find, unless performance is horrendous
-- harpoon
local harpoon = require("harpoon")
@@ -159,27 +146,34 @@ 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)
for i = 1, 10, 1 do
vim.keymap.set("n", "<leader>" .. (i % 10), function() harpoon:list():select(i) end)
vim.keymap.set("n", "<leader>h" .. (i % 10), function() harpoon:list():replace_at(i) end)
end
--- fugitive (git integration)
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>gl", function() vim.cmd.Git({ "log"}) 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)
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>hb", function() harpoon:list():select(5) 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)
vim.keymap.set("n", "<leader>hB", function() harpoon:list():replace_at(5) 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)
-- obisdian / notes
vim.keymap.set("n", "<leader>oo", function() vim.cmd("Obsidian open") end)
vim.keymap.set("n", "<leader>ot", "o- [ ] ")

View File

@@ -1,3 +1,4 @@
-- TODO: maybe switch this over from git-clone approach to neovim's builtin vim.pack.add
local path_lazy_nvim = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(path_lazy_nvim) then
local git_output = vim.fn.system({

View File

@@ -1,43 +1,10 @@
return {
{
"tiagovla/tokyodark.nvim",
lazy = false,
priority = 1000,
opts = {
custom_highlights = function(highlights, palette)
highlights.Comment['fg'] = "#8a9097"
highlights.LineNr['fg'] = "#8088A8"
highlights.Visual['bg'] = palette.bg3
return highlights
end,
gamma = 0.92, -- brightness
styles = {
comments = { italic = true },
keywords = { italic = false },
identifiers = { italic = false },
functions = {},
variables = {},
},
},
},
{
'ribru17/bamboo.nvim',
config = function()
require('bamboo').setup { }
require('bamboo').load()
end,
},
{
dir = vim.fn.stdpath("config") .. "/themes/pina",
name = "pina",
},
{
'steve-lohmeyer/mars.nvim',
name = 'mars',
},
-- TODO: decide which of these i won't be using, then remove from this file
{
"ellisonleao/gruvbox.nvim",
name = "gruvbox",
-- lazy = false,
-- priority = 1000,
opts = {
terminal_colors = true, -- add neovim terminal colors
undercurl = true,
@@ -63,12 +30,13 @@ return {
},
},
{
-- even if not connected to a zz-this-box theme, keep this for nvim diffthis
"rose-pine/neovim",
name = "rose-pine",
},
{
"folke/tokyonight.nvim",
lazy = false,
priority = 1000,
opts = {
style = "night", -- "night", "storm", "moon", "day"
styles = {
@@ -81,4 +49,29 @@ return {
end,
},
},
{
"tiagovla/tokyodark.nvim",
lazy = false,
priority = 1000,
opts = {
custom_highlights = function(highlights, _palette)
highlights.Comment['fg'] = "#8a9097"
highlights.LineNr['fg'] = "#8088A8"
return highlights
end,
},
},
{
'ribru17/bamboo.nvim',
-- lazy = false,
-- priority = 1000,
config = function()
require('bamboo').setup { }
require('bamboo').load()
end,
},
{
dir = os.getenv('DIR_GIT_PROJECTS') .. "/other/omarchy-pina-theme/pina.nvim",
name = "pina",
},
}

View File

@@ -5,10 +5,10 @@ return {
local dap = require("dap")
dap.set_log_level("DEBUG")
-- dap.adapters.codelldb = {
-- type = "executable",
-- command = "codelldb",
-- }
dap.adapters.codelldb = {
type = "executable",
command = "codelldb",
}
local dapConfigArgsInput = function()
return vim.split(vim.fn.input("args: "), " ")
@@ -95,7 +95,7 @@ return {
end,
},
{
"jay-babu/mason-nvim-dap.nvim", -- TODO: install here? manually outside of neovim?
"jay-babu/mason-nvim-dap.nvim", -- TODO: here, or handle manually outside of neovim?
dependencies = {
"williamboman/mason.nvim",
"mfussenegger/nvim-dap",
@@ -104,7 +104,7 @@ return {
config = function()
require("mason-nvim-dap").setup({
ensure_installed = {
-- "codelldb",
"codelldb",
-- "delve",
},
automatic_installation = true,

View File

@@ -4,12 +4,8 @@ return {
branch = "harpoon2", -- https://github.com/ThePrimeagen/harpoon/tree/harpoon2
dependencies = { "nvim-lua/plenary.nvim" },
config = function()
require("harpoon"):setup({
settings = {
save_on_toggle = true,
sync_on_ui_close = true,
},
})
local harpoon = require("harpoon")
harpoon:setup()
end,
},
}

View File

@@ -1,131 +1,123 @@
return {
{
"L3MON4D3/LuaSnip",
version = "v2.*",
-- build = "make install_jsregexp"
"neovim/nvim-lspconfig",
dependencies = {
"stevearc/conform.nvim",
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-cmdline",
"hrsh7th/nvim-cmp",
"L3MON4D3/LuaSnip", -- snippets, using luasnip for now
"saadparwaiz1/cmp_luasnip", -- snippets, using luasnip for now
},
{
"neovim/nvim-lspconfig",
dependencies = {
"stevearc/conform.nvim",
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-cmdline",
"hrsh7th/nvim-cmp",
"L3MON4D3/LuaSnip", -- snippets, using luasnip for now
"saadparwaiz1/cmp_luasnip", -- snippets, using luasnip for now
},
config = function()
require("conform").setup({ formatters_by_ft = {} })
local cmp = require('cmp')
local cmp_lsp = require("cmp_nvim_lsp")
local capabilities = vim.tbl_deep_extend(
"force",
{},
vim.lsp.protocol.make_client_capabilities(),
cmp_lsp.default_capabilities()
)
config = function()
require("conform").setup({ formatters_by_ft = {} })
local cmp = require('cmp')
local cmp_lsp = require("cmp_nvim_lsp")
local capabilities = vim.tbl_deep_extend(
"force",
{},
vim.lsp.protocol.make_client_capabilities(),
cmp_lsp.default_capabilities()
)
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = {
"clangd",
"lua_ls",
-- "ruby_lsp",
-- "gopls",
-- "tailwindcss",
},
handlers = {
function(server_name) -- default
require("lspconfig")[server_name].setup {
capabilities = capabilities
}
end,
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = {
"clangd",
"lua_ls",
"ruby_lsp",
-- "gopls",
-- "tailwindcss",
},
handlers = {
function(server_name) -- default
require("lspconfig")[server_name].setup {
capabilities = capabilities
}
end,
["lua_ls"] = function()
local lspconfig = require("lspconfig")
lspconfig.lua_ls.setup {
capabilities = capabilities,
settings = {
Lua = {
format = {
enable = true,
defaultConfig = { -- NOTE: string values only
indent_style = "space",
indent_size = "2",
},
["lua_ls"] = function()
local lspconfig = require("lspconfig")
lspconfig.lua_ls.setup {
capabilities = capabilities,
settings = {
Lua = {
format = {
enable = true,
defaultConfig = { -- NOTE: string values only
indent_style = "space",
indent_size = "2",
},
},
},
}
end,
}
})
},
}
end,
}
})
local cmp_select = { behavior = cmp.SelectBehavior.Select }
cmp.setup({
mapping = cmp.mapping.preset.insert({
["<C-Space>"] = cmp.mapping.complete(),
['<C-y>'] = cmp.mapping.confirm({ select = true }),
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-u>'] = cmp.mapping.scroll_docs(4),
}),
snippet = {
expand = function(args)
-- vim.snippet.expand(args.body) -- TODO: native option, maybe try
require('luasnip').lsp_expand(args.body)
end,
},
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
}, {
{ name = 'buffer' },
}),
window = {
-- maybe `cmp.config.window.bordered()` for completion & documentation
completion = { border = 'single' },
documentation = { border = 'single' },
},
performance = {
max_view_entries = 14,
},
})
local cmp_select = { behavior = cmp.SelectBehavior.Select }
cmp.setup({
mapping = cmp.mapping.preset.insert({
["<C-Space>"] = cmp.mapping.complete(),
['<C-y>'] = cmp.mapping.confirm({ select = true }),
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-u>'] = cmp.mapping.scroll_docs(4),
}),
snippet = {
expand = function(args)
-- vim.snippet.expand(args.body) -- TODO: native option, maybe try
require('luasnip').lsp_expand(args.body)
end,
},
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
}, {
{ name = 'buffer' },
}),
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
},
performance = {
max_view_entries = 14,
},
})
-- `/` cmdline setup.
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' }
}),
matching = { disallow_symbol_nonprefix_matching = false }
})
-- `/` cmdline setup.
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{ name = 'cmdline' }
}),
matching = { disallow_symbol_nonprefix_matching = false }
})
vim.diagnostic.config({
-- update_in_insert = true,
float = {
focusable = false,
style = "minimal",
border = "rounded",
source = "always",
header = "",
prefix = "",
},
})
vim.diagnostic.config({
-- update_in_insert = true,
float = {
focusable = false,
style = "minimal",
border = "rounded",
source = "always",
header = "",
prefix = "",
},
})
-- TODO: needed? seems like neovim/nvim-lspconfig covers 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,
},
-- TODO: needed? seems like neovim/nvim-lspconfig covers 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,
}

Some files were not shown because too many files have changed in this diff Show More