Adjust launch-reaper scripts a bit, also add two general scripts

This commit is contained in:
2025-10-05 15:08:29 -05:00
parent 1be24fa795
commit f82a7c4c71
6 changed files with 72 additions and 24 deletions

View File

@@ -6,17 +6,17 @@ idea from the ThePrimeagen: designated workspace/label/desktop per app/purpose
### current layout/plan
| workspace number | wm default layout/mode |
| workspace number | wm layout/mode |
|--------------------------------------------------------------|------------------------|
| 1. notes/drawing/thinking (notes app, drawing pad, etc) | 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; one-offs & tui apps can be anywhere) | stack (fullscreen) |
| 9. web browser | stack (fullscreen) |
| 1. notes/drawing (stack: nvim, obsidian, gimp) | stack |
| 2. music makeing - misc | stack |
| 3. music making - daw | floating (workaround) |
| 4. music/audio listening | stack |
| 5. general - misc (catch-all) | stack |
| 6. comms (stack: emails, chats, av/calls) | stack |
| 7. programming - misc (whatever is not in terminal) | stack |
| 8. terminal (primary; one-offs & tui apps can be anywhere) | stack |
| 9. web browser | stack |
### ideas/guidelines:
- use this consistently accross all machines
@@ -37,7 +37,8 @@ idea from the ThePrimeagen: designated workspace/label/desktop per app/purpose
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
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)
@@ -47,7 +48,7 @@ idea from the ThePrimeagen: designated workspace/label/desktop per app/purpose
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
## examples cases
## 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

View File

@@ -37,8 +37,8 @@ export OBSIDIAN_WORKSPACES_TO_CONFIGURE=("$DIR_NOTES")
# reaper
DIR_REAPER_PORTABLE_SHARED="$DIR_USER_OPT/reaper-portable/shared"
DIR_REAPER_PORTABLE_LINUX="$DIR_USER_OPT/reaper-portable/reaper-linux"
DIR_REAPER_PORTABLE_MACOS="$DIR_USER_OPT/reaper-portable/reaper-macos"
DIR_REAPER_PORTABLE_LINUX="$DIR_USER_OPT/reaper-portable/linux"
DIR_REAPER_PORTABLE_MACOS="$DIR_USER_OPT/reaper-portable/macos"
# clean-up of home dir
export __CF_USER_TEXT_ENCODING="0x0:0x0"

View File

@@ -2,16 +2,18 @@
# trying the "portable install" option; using this launch script to point to that
source "$XDG_CONFIG_HOME/zsh/.zshenv"
reaper_portable_exec_linux="$DIR_REAPER_PORTABLE_LINUX/REAPER/reaper"
reaper_portable_ini_file_linux="$DIR_REAPER_PORTABLE_LINUX/reaper-config/reaper.ini"
reaper_portable_exec_linux="$DIR_REAPER_PORTABLE_LINUX/REAPER/reaper"
[[ ! -x "$reaper_portable_exec_linux" ]] && {
echo "reaper missing or not executable: $reaper_portable_exec_linux" >&2
exit 1
}
reaper_portable_config_linux="$DIR_REAPER_PORTABLE_LINUX/config"
reaper_portable_ini_file_linux="$reaper_portable_config_linux/reaper.ini"
[[ ! -r "$reaper_portable_ini_file_linux" ]] && {
echo "reaper.ini missing or not readable: $reaper_portable_ini_file_linux" >&2
exit 1
[[ ! -d "$reaper_portable_config_linux" ]] && mkdir -p "$reaper_portable_config_linux"
touch "$reaper_portable_ini_file_linux"
}
nohup \

View File

@@ -0,0 +1,33 @@
#! /bin/zsh
# simple unit-conversion util, partly made for fun, not much here so far
conversionUnits=$1
inputsToConvert=($argv[2,-1])
function cmToIn() {
result=$(( 1 / 2.54 * $1 ))
printf '%.1f cm => %.2f in\n' $1 $result
}
function inToCm() {
result=$(( 2.54 * $1 ))
printf '%.2f in => %.1f cm\n' $1 $result
}
function unsupportedUnits() {
echo "unsupported conversion units given: $conversionUnits"
exit 1
}
funcRef=exit # not sure what a good default function is, using exit
case $conversionUnits in
(cm|cm-in) funcRef=cmToIn
;;
(in|in-cm) funcRef=inToCm
;;
(*) funcRef=unsupportedUnits
;;
esac
for i in $inputsToConvert; do $funcRef $i; done

14
src_files/.local/scripts/gfind Executable file
View File

@@ -0,0 +1,14 @@
#! /bin/zsh
# simple wrapper to run both find and grep
# usage: gfind <search-term> [search-directory]
# if no search-directory given, uses . by default
searchTerm=$1
searchDirectory=$(if [[ -n $2 ]] then echo $2; else echo "."; fi)
printf '//// find results for: %s in directory: %s\n' $searchTerm $searchDirectory
find $searchDirectory -iname "*$searchTerm*"
printf '\n//// grep results for: %s in directory: %s\n' $searchTerm $searchDirectory
grep -rIi $searchTerm $searchDirectory

View File

@@ -2,17 +2,15 @@
# trying the "portable install" option; using this launch script to point to that
source "$XDG_CONFIG_HOME/zsh/.zshenv"
reaper_portable_exec_macos="$DIR_REAPER_PORTABLE_MACOS/REAPER.app/Contents/MacOS/REAPER"
reaper_portable_ini_file_macos="$DIR_REAPER_PORTABLE_MACOS/reaper.ini"
reaper_portable_exec_macos="$DIR_REAPER_PORTABLE_MACOS/REAPER.app/Contents/MacOS/REAPER"
[[ ! -x "$reaper_portable_exec_macos" ]] && {
echo "reaper missing or not executable: $reaper_portable_exec_macos" >&2
exit 1
}
[[ ! -r "$reaper_portable_ini_file_macos" ]] && {
echo "reaper.ini missing or not readable: $reaper_portable_ini_file_macos" >&2
exit 1
}
reaper_portable_ini_file_macos="$DIR_REAPER_PORTABLE_MACOS/reaper.ini"
[[ ! -r "$reaper_portable_ini_file_macos" ]] && touch "$reaper_portable_ini_file_macos"
nohup \
$reaper_portable_exec_macos \