diff --git a/docs/todo.md b/docs/todo.md index 3c3bed5..e57b274 100644 --- a/docs/todo.md +++ b/docs/todo.md @@ -6,5 +6,6 @@ - web browsers config and install - get find, xargs, awk (use nawk) as unified as i can across system types - pick rss reader; newsboat? others? option with inbox and separate queues? +- make all these scripts posix-complient (or at least usable in ksh/oksh) - decide if i even want a filemanager; if yes, pick one and configure diff --git a/docs/workflow-and-workspaces-scheme.md b/docs/workflow-and-workspaces-scheme.md index 75bc4ac..7345d08 100644 --- a/docs/workflow-and-workspaces-scheme.md +++ b/docs/workflow-and-workspaces-scheme.md @@ -6,18 +6,18 @@ 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) | +| key | app/focus +|-----|----------- +| 1. | system monitor (htop) +| 2. | music makeing - misc +| 3. | music making - daw +| 4. | stack: drawing (gimp), obsidian +| 5. | listening/wathcing (any music, audio, or video) +| 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 diff --git a/home_dir_clean.sh b/home_dir_clean.sh new file mode 100755 index 0000000..d82eef1 --- /dev/null +++ b/home_dir_clean.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# adjust settings in src_files/shell/profile, src_files/shell/rc, or otherwise +# for programs i actually use or programs which have simple enough configuration +# options to follow the XDG spec. +# this script is for everything else, which i just want to wipe out quickly. + +rm -rf "$HOME"/.bash* diff --git a/make_dirs.sh b/make_dirs.sh index 23a9e2d..c876324 100755 --- a/make_dirs.sh +++ b/make_dirs.sh @@ -1,33 +1,37 @@ -#!/bin/zsh +#!/bin/sh -echo "---- making system dirs ----------------" . ./src_files/shell/profile # ensure env vars set for use below +echo "---- making system dirs ----------------" # 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_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_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 +! [ -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 +! [ -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" + +# echo "---- making system or home-cleanup files" +# ! [ -d "$(dirname $HISTFILE)" ] && mkdir -p "$(dirname $HISTFILE)" +# ! [ -r "$HISTFILE" ] && touch "$HISTFILE" diff --git a/src_files/.config/nvim/init.lua b/src_files/.config/nvim/init.lua index 714bb0a..8598c9e 100644 --- a/src_files/.config/nvim/init.lua +++ b/src_files/.config/nvim/init.lua @@ -1,16 +1,6 @@ -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") - -csgAutocmd({"BufWritePre"}, { - group = csGroup, - pattern = "*", - command = [[%s/\s\+$//e]], -}) - +require("auto_commands") ThemeUpdate() - diff --git a/src_files/.config/nvim/lua/auto_commands.lua b/src_files/.config/nvim/lua/auto_commands.lua new file mode 100644 index 0000000..0599e80 --- /dev/null +++ b/src_files/.config/nvim/lua/auto_commands.lua @@ -0,0 +1,15 @@ +local autoCmdGroup = vim.api.nvim_create_augroup("autoCmdGroup", { clear = true }) +local autoCmd = vim.api.nvim_create_autocmd + +autoCmd({"BufWritePre"}, { + group = autoCmdGroup, + pattern = "*", + command = [[%s/\s\+$//e]], +}) + +autoCmd({"BufReadPre"}, { + group = autoCmdGroup, + pattern = os.getenv("DIR_NOTES") .. "/**/*.md", + command = [[lua vim.opt_local.conceallevel = 1]], +}) + diff --git a/src_files/.config/nvim/lua/plugins_lazy/obsidian.lua b/src_files/.config/nvim/lua/plugins_lazy/obsidian.lua new file mode 100644 index 0000000..5599a66 --- /dev/null +++ b/src_files/.config/nvim/lua/plugins_lazy/obsidian.lua @@ -0,0 +1,16 @@ +return { + { + "obsidian-nvim/obsidian.nvim", + version = "*", -- '*' for latest release, not latest commit + ft = "markdown", + opts = { + workspaces = { + { + name = "notes", + path = os.getenv("DIR_NOTES"), + }, + }, + legacy_commands = false, + }, + }, +} diff --git a/src_files/.config/nvim/lua/settings.lua b/src_files/.config/nvim/lua/settings.lua index 6b1e71a..0dfc024 100644 --- a/src_files/.config/nvim/lua/settings.lua +++ b/src_files/.config/nvim/lua/settings.lua @@ -21,6 +21,8 @@ vim.opt.textwidth = 0 vim.opt.wrapmargin = 0 vim.opt.fillchars = { eob = ' ' } +vim.opt.conceallevel = 0 + vim.opt.spell = false vim.opt.spelllang = 'en_us' diff --git a/src_files/shell/profile b/src_files/shell/profile index 3d796c4..921cd29 100644 --- a/src_files/shell/profile +++ b/src_files/shell/profile @@ -30,7 +30,7 @@ export XDG_DATA_DIRS="/usr/local/share:/usr/share" # directory for theme/style stuff export DIR_THEME_SETTINGS="$XDG_CONFIG_HOME/zz-this-box/themes" -export DEFAULT_THEME_NAME="tokyodark" +export DEFAULT_THEME_NAME="gruvbox" # zsh export ZDOTDIR="$XDG_CONFIG_HOME/zsh" # may already be set, set anyway @@ -51,6 +51,7 @@ export DIR_REAPER_PORTABLE_SHARED="$DIR_USER_OPT/reaper-portable/shared" export DIR_REAPER_PORTABLE_LINUX="$DIR_USER_OPT/reaper-portable/linux" export DIR_REAPER_PORTABLE_MACOS="$DIR_USER_OPT/reaper-portable/macos" -# clean-up of home dir +# xdg spec and/or clean-up of home dir export __CF_USER_TEXT_ENCODING="0x0:0x0" # TODO: does this actually accomplish anything? +export ANDROID_USER_HOME="$XDG_DATA_HOME/android" diff --git a/src_files/shell/rc b/src_files/shell/rc index e59231e..a3eaa71 100644 --- a/src_files/shell/rc +++ b/src_files/shell/rc @@ -66,3 +66,7 @@ alias shrug='echo "¯\\_(ツ)_/¯"' # programming and language setup export DEVKITARM=/opt/devkitpro/devkitARM + +# xdg spec and/or clean-up of home dir +alias adb="HOME='$XDG_DATA_HOME/android' adb" +