From 066ef0e6fa5b1eaedbdce14da6b33edeab8b8153 Mon Sep 17 00:00:00 2001 From: david Date: Sat, 8 Nov 2025 00:49:37 -0600 Subject: [PATCH] Adjust/add install/build programs, add mpv config, clean up zsh config --- docs/attribution.md | 10 +++++---- docs/todo.md | 2 -- install_programs.sh | 23 ++++++++++++++++---- installs_and_builds/custom_default_ksh | 7 ++++++ installs_and_builds/programs.csv | 30 ++++++++++++++------------ make_dirs.sh | 1 - src_files/.config/mpv/input.conf | 4 ++++ src_files/.config/mpv/mpv.conf | 3 +++ src_files/.config/zsh/.zshenv | 1 - src_files/.config/zsh/.zshrc | 12 ++++++----- src_files/.config/zsh/zsh-general-dev | 2 ++ src_files/.config/zsh/zsh-life-system | 7 ------ 12 files changed, 64 insertions(+), 38 deletions(-) create mode 100755 installs_and_builds/custom_default_ksh create mode 100644 src_files/.config/mpv/input.conf create mode 100644 src_files/.config/mpv/mpv.conf delete mode 100644 src_files/.config/zsh/zsh-life-system diff --git a/docs/attribution.md b/docs/attribution.md index 6afe1c1..11bb5f9 100644 --- a/docs/attribution.md +++ b/docs/attribution.md @@ -20,12 +20,14 @@ Author: ThePrimeagen (Michael Paulson) ## Idea of using a list of programs in a file for build/install -The idea of using a file with a list of programs in it to build and/or install was inspired by Luke Smith's [LARBS project](https://github.com/LukeSmithxyz/LARBS/tree/master). +The idea of using a file with a list of programs in it for building and/or +installing programs was inspired by Luke Smith's +[LARBS project](https://github.com/LukeSmithxyz/LARBS/tree/master). ## Some themes and theme-swtiching/setting logic The theme configuration files in this repository under -[src_files/imports/themes-omarchy-core](src_files/imports/themes-omarchy-core) +[src_files/imports/themes-omarchy-core](../src_files/imports/themes-omarchy-core) are copied from, and much of the "theme-switching" or "theme-setting" logic and scripts are derived from, [Omarchy](https://github.com/basecamp/omarchy), which is licensed under the [MIT License](https://github.com/basecamp/omarchy/blob/master/LICENSE). @@ -35,9 +37,9 @@ 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) +[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/ecosystem. 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). +[src_files/imports/themes-omarchy-extra](../src_files/imports/themes-omarchy-extra). diff --git a/docs/todo.md b/docs/todo.md index 8a0d79a..28fea67 100644 --- a/docs/todo.md +++ b/docs/todo.md @@ -3,11 +3,9 @@ - config for: terminal (kitty? havoc?) - config for shell (if keeping zsh, may not need anything beyond what i've already done) - config for mpd, and client(s), (mpd clients to consider: mpc, ncmpcpp, ncmpc, inori) -- config for mpv (if any, may not need anything) - hyprland config and install on linux - web browsers config and install - get find, xargs, awk (use nawk) as unified as i can across system types -- 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? diff --git a/install_programs.sh b/install_programs.sh index 65afbb8..6cf5f60 100755 --- a/install_programs.sh +++ b/install_programs.sh @@ -13,6 +13,24 @@ apply_overrides() { [[ -z $name || -z $kind ]] && echo "zz_skip,zz_skip" || echo "$name,$kind" } +build_custom() { + target=$(echo "custom_$BOX_SETUP_OS-$BOX_SETUP_DISTRO-$1" | tr '-' '_') + [[ ! -e ./installs_and_builds/$target ]] && + target=$(echo "custom_default_$1" | tr '-' '_') + [[ ! -e ./installs_and_builds/$target ]] && + echo "custom build/install script not found for: $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 +} + echo "---- updating package manager / packages" [[ -n "$BOX_SETUP_UPDATE_PKG_MANAGER_AND_DEFS_CMD" ]] && ${=BOX_SETUP_UPDATE_PKG_MANAGER_AND_DEFS_CMD} @@ -32,10 +50,7 @@ sed 1d "installs_and_builds/programs.csv" | [[ $name = 'zz_skip' || $kind = 'zz_skip' ]] && continue [[ $kind = 'package_manager' ]] && ${=BOX_SETUP_INSTALL_COMMAND} ${=name} || { - [[ $kind = 'build_custom' ]] && { - target=$(echo "custom_$BOX_SETUP_OS-$BOX_SETUP_DISTRO-$name" | tr '-' '_') - "./installs_and_builds/$target" - } + [[ $kind = 'build_custom' ]] && build_custom $name } done diff --git a/installs_and_builds/custom_default_ksh b/installs_and_builds/custom_default_ksh new file mode 100755 index 0000000..97251df --- /dev/null +++ b/installs_and_builds/custom_default_ksh @@ -0,0 +1,7 @@ +#!/bin/zsh + +git clone https://github.com/ibara/oksh.git +pushd oksh > /dev/null +./configure +make && sudo make install +popd > /dev/null diff --git a/installs_and_builds/programs.csv b/installs_and_builds/programs.csv index 444ca16..216ce73 100644 --- a/installs_and_builds/programs.csv +++ b/installs_and_builds/programs.csv @@ -1,8 +1,21 @@ name,kind,os_overrides,distro_overrides,system_type_overrides,notes +gcc,package_manager,macos: name='',,, +g++,package_manager,macos: name='',,, +clang,package_manager,macos: name='',,, +clang++,package_manager,macos: name='',,, +musl,package_manager,macos: name='',,, +coreutils,package_manager,linux: name='',,, +findutils,package_manager,linux: name='',,, +make,package_manager,,,, +cmake,package_manager,,,, mpv,package_manager,,,, +kitty,package_manager,macos: name='--cask kitty',,, zsh,package_manager,,,, +ksh,build_custom,,,, +tmux,package_manager,,,, +neovim,package_manager,,,, mutt,package_manager,,,, -docker,package_manager,,,,may need special logic for debian https://docs.docker.com/engine/install/debian/ +podman,package_manager,,,, curl,package_manager,,,, grep,package_manager,,,, ripgrep,package_manager,,,, @@ -10,27 +23,16 @@ sed,package_manager,macos: name='',,, fzf,package_manager,,,, jq,package_manager,,,, parallel,package_manager,,,, -make,package_manager,,,, -cmake,package_manager,,,, gettext,package_manager,,,, htop,package_manager,,,, -neovim,package_manager,,,, +ffmpeg,package_manager,,,work: name='', mpd,package_manager,,,, ncmpcpp,package_manager,,,, -ffmpeg,package_manager,,,work: name='', git,package_manager,,,, -tmux,package_manager,,,, -khal,package_manager,,,, +calcurse,package_manager,,,, zathura,package_manager,macos: name='',,, -gcc,package_manager,macos: name='',,, -g++,package_manager,macos: name='',,, -clang,package_manager,macos: name='',,, -clang++,package_manager,macos: name='',,, tenacity,package_manager,macos: name='--cask audacity',,work: name='',tenacity not available via homebrew; use audacity in macos bitwig-studio,package_manager,macos: name='--cask bitwig-studio',artix: kind='aur'; arch: kind='aur'; alpine: kind='build_custom'; debian: kind='build_custom';,work: name='', -kitty,package_manager,macos: name='--cask kitty',,, gimp,package_manager,macos: name='--cask gimp',,, -coreutils,package_manager,linux: name='',,, -findutils,package_manager,linux: name='',,, --cask nikitabobko/tap/aerospace,package_manager,linux: name='',,, pandoc,package_manager,,arch: name='pandoc-cli'; artix: name='pandoc-bin'; alpine: name='pandoc-cli';,work: name='', diff --git a/make_dirs.sh b/make_dirs.sh index bceccbe..40deae8 100755 --- a/make_dirs.sh +++ b/make_dirs.sh @@ -7,7 +7,6 @@ source ./src_files/.config/zsh/.zshenv # ensure env vars set for use below [[ ! -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" diff --git a/src_files/.config/mpv/input.conf b/src_files/.config/mpv/input.conf new file mode 100644 index 0000000..8e67bea --- /dev/null +++ b/src_files/.config/mpv/input.conf @@ -0,0 +1,4 @@ +h seek -5 +l seek 5 +H seek -30 +L seek 30 diff --git a/src_files/.config/mpv/mpv.conf b/src_files/.config/mpv/mpv.conf new file mode 100644 index 0000000..92b7757 --- /dev/null +++ b/src_files/.config/mpv/mpv.conf @@ -0,0 +1,3 @@ +screenshot-format=png +screenshot-dir="~/dbox/inbox" +screenshot-template="%F-%p-%n" diff --git a/src_files/.config/zsh/.zshenv b/src_files/.config/zsh/.zshenv index 788fd1a..72a64b7 100644 --- a/src_files/.config/zsh/.zshenv +++ b/src_files/.config/zsh/.zshenv @@ -14,7 +14,6 @@ export DIR_GIT_PROJECTS="$DIR_DEV/git" export DIR_LOCAL="$HOME/.local" export DIR_BIN="$DIR_LOCAL/bin" export DIR_SCRIPTS="$DIR_LOCAL/scripts" -export DIR_TMP="$DIR_LOCAL/tmp" export DIR_USER_OPT="$HOME/opt" export DIR_USER_LIB="$DIR_LOCAL/lib" diff --git a/src_files/.config/zsh/.zshrc b/src_files/.config/zsh/.zshrc index 327eac6..a203c99 100644 --- a/src_files/.config/zsh/.zshrc +++ b/src_files/.config/zsh/.zshrc @@ -20,21 +20,23 @@ alias tmi='tmux-session-init' # executable overrides alias ls='ls -F' +alias ksh=oksh # NOTE: if i ever use openBSD, conditionally remove this alias + +# focus/productivity/similar +alias note="cd $DIR_NOTES/inbox; $EDITOR" +alias todo="cd $DIR_NOTES/rhythm; $EDITOR todo.md" +alias budget="open $DIR_HOME_BOX/finance/budget/.current" # misc commands -alias cal='khal calendar' alias pdt='ping -c 2 drinkingtea.net' alias ppw='ping -c 2 pinewoods.xyz' alias weather='curl "wttr.in/dfw?2&F"' alias shrug='echo "¯\\_(ツ)_/¯"' -alias journal="cd $DIR_HOME_BOX; $EDITOR .current-journal" -alias ncspotkeys="$EDITOR $DIR_GIT_PROJECTS/other/ncspot/doc/users.md" # source extensions and system-specific files [[ -a "$ZDOTDIR/zsh-general-dev" ]] && source "$ZDOTDIR/zsh-general-dev" -[[ -a "$ZDOTDIR/zsh-life-system" ]] && source "$ZDOTDIR/zsh-life-system" -# dev/lang setup +# programming and language setup [[ -n $(command -v mise) ]] && eval "$(mise activate zsh)" export DEVKITARM=/opt/devkitpro/devkitARM diff --git a/src_files/.config/zsh/zsh-general-dev b/src_files/.config/zsh/zsh-general-dev index e707c49..cc5237a 100644 --- a/src_files/.config/zsh/zsh-general-dev +++ b/src_files/.config/zsh/zsh-general-dev @@ -22,3 +22,5 @@ alias lintjs='npx prettier --write' alias prl='poetry run black' alias prt='poetry run pytest' +# containerization +alias docker=podman diff --git a/src_files/.config/zsh/zsh-life-system b/src_files/.config/zsh/zsh-life-system deleted file mode 100644 index cb40038..0000000 --- a/src_files/.config/zsh/zsh-life-system +++ /dev/null @@ -1,7 +0,0 @@ -# life system shortcuts -alias life-system="cd $DIR_HOME_BOX/life/system; clear; ls" -alias goals="clear; sed -n 2,7p $DIR_HOME_BOX/life/system/direction/goals/current-goals.txt" -alias note="cd $DIR_HOME_BOX/life/system/tasks/inbox; $EDITOR" -alias todo="cd $DIR_HOME_BOX/life/system/tasks; $EDITOR +5 todo.txt" -alias budget="open $DIR_HOME_BOX/life/finance/budget/.current" -