diff --git a/docs/todo.md b/docs/todo.md index 492ceba..8569521 100644 --- a/docs/todo.md +++ b/docs/todo.md @@ -1,10 +1,8 @@ # todo items -- config for terminal (kitty? havoc?) - config for shell (likely oksh) - config for calcurse - config for mpd, and client(s), (mpd clients to consider: mpc, ncmpcpp, ncmpc, inori) -- decide what i'm doing for music streaming; spotify official? web? tui option? - 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 diff --git a/src_files/.config/htop/htoprc b/src_files/.config/htop/htoprc index fa1329d..27aa5b9 100644 --- a/src_files/.config/htop/htoprc +++ b/src_files/.config/htop/htoprc @@ -28,7 +28,7 @@ show_cpu_frequency=0 show_cached_memory=1 update_process_names=0 account_guest_in_cpu_meter=0 -color_scheme=5 +color_scheme=6 enable_mouse=1 delay=40 hide_function_bar=0 diff --git a/src_files/.config/nvim/lua/key_mappings.lua b/src_files/.config/nvim/lua/key_mappings.lua index fe4b0ae..cd89cf9 100644 --- a/src_files/.config/nvim/lua/key_mappings.lua +++ b/src_files/.config/nvim/lua/key_mappings.lua @@ -11,7 +11,7 @@ vim.keymap.set("n", "n", vim.cmd.Ex) vim.keymap.set("v", "J", ":m '>+1gv") vim.keymap.set("v", "K", ":m '<-2gv") --- reduce effective distance of half-page jumps and vertically-center the cursor +-- reduce effective distance of half-page jumps and vertically-pad the cursor vim.keymap.set("n", "", "4M") vim.keymap.set("n", "", "4M") @@ -60,6 +60,14 @@ kmgAutocmd('FileType', { end }) +------------------------------------------------------------------------------------------ +-- visual/ui-related toggles and shortcuts + +vim.keymap.set("n", "vl", function() ToggleCursorLine() end) +vim.keymap.set("n", "vc", function() ToggleColorColumn('90') end) +vim.keymap.set("n", "vn", function() ToggleLineNumbers() end) +vim.keymap.set("n", "vw", function() ToggleWritingMode() end) + ------------------------------------------------------------------------------------------ -- quickfix and location lists -- ref: :h quickfix or :h location-list @@ -118,10 +126,10 @@ kmgAutocmd('LspAttach', { vim.keymap.set("n", "lv", function() vim.diagnostic.open_float() end, opts) vim.keymap.set("n", "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", "vws", function() vim.lsp.buf.workspace_symbol() end, opts) - -- vim.keymap.set("n", "vca", function() vim.lsp.buf.code_action() end, opts) - -- vim.keymap.set("n", "vrl", function() vim.lsp.buf.references() end, opts) - -- vim.keymap.set("n", "vrn", function() vim.lsp.buf.rename() end, opts) + -- vim.keymap.set("n", "lws", function() vim.lsp.buf.workspace_symbol() end, opts) + -- vim.keymap.set("n", "lca", function() vim.lsp.buf.code_action() end, opts) + -- vim.keymap.set("n", "lrl", function() vim.lsp.buf.references() end, opts) + -- vim.keymap.set("n", "lrn", function() vim.lsp.buf.rename() end, opts) end }) diff --git a/src_files/.config/nvim/lua/settings.lua b/src_files/.config/nvim/lua/settings.lua index cedcc0f..6b1e71a 100644 --- a/src_files/.config/nvim/lua/settings.lua +++ b/src_files/.config/nvim/lua/settings.lua @@ -5,17 +5,24 @@ vim.opt.incsearch = true vim.opt.termguicolors = true vim.opt.scrolloff = 2 -vim.opt.colorcolumn = "90" +vim.opt.colorcolumn = '' -- default to off, see keymapping shortcut to toggle vim.opt.signcolumn = "yes" -- "auto", "yes", "no", "number" vim.opt.laststatus = 2 vim.opt.splitright = true vim.opt.splitbelow = true -vim.opt.nu = true +vim.opt.number = true vim.opt.relativenumber = true vim.opt.cursorline = true vim.opt.cursorlineopt = "both" vim.opt.smartindent = true + vim.opt.wrap = true +vim.opt.textwidth = 0 +vim.opt.wrapmargin = 0 +vim.opt.fillchars = { eob = ' ' } + +vim.opt.spell = false +vim.opt.spelllang = 'en_us' vim.opt.errorbells = false vim.opt.visualbell = false diff --git a/src_files/.config/nvim/lua/util_functions.lua b/src_files/.config/nvim/lua/util_functions.lua index 774374d..4a0a679 100644 --- a/src_files/.config/nvim/lua/util_functions.lua +++ b/src_files/.config/nvim/lua/util_functions.lua @@ -15,7 +15,7 @@ function TmpBuff(split_opt) vim.opt_local.buftype = "nofile" vim.opt_local.bufhidden = "hide" vim.opt_local.swapfile = false - vim.cmd("file tmp_" .. os.date("%Y%m%d_%H%M%S")) + vim.cmd("file tmp_" .. os.date("%Y%m%d_%H%M%S") .. "_" .. math.random(471)) end function ReadShellCmd(command) @@ -32,3 +32,88 @@ function ToggleTabsSpaces() end end +function ToggleLineNumbers() + if vim.opt.number:get() then + vim.opt.number = false + vim.opt.relativenumber = false + else + vim.opt.number = true + vim.opt.relativenumber = true + end +end + +function ToggleColorColumn(column_string) + if #vim.opt.colorcolumn:get() == 0 then + vim.opt.colorcolumn = (column_string or '90') + else + vim.opt.colorcolumn = '' + end +end + +function ToggleCursorLine() + vim.opt.cursorline = (not vim.opt.cursorline:get()) +end + +local function EnableWritingModeUiForCurrentWindow() + vim.opt_local.number = false + vim.opt_local.relativenumber = false + vim.opt_local.colorcolumn = '' + vim.opt_local.signcolumn = "no" + vim.opt_local.cursorline = false + vim.opt_local.winfixwidth = true + -- vim.opt_local.wrap = true -- TODO: needed? + vim.opt_local.laststatus = 0 +end + +function ToggleWritingMode() + if vim.g.writing_mode then + vim.g.writing_mode = false + + vim.api.nvim_set_hl(0, 'WinSeparator', vim.g.wrmode_prev_hl_winsep or {}) + vim.opt_local.winfixwidth = false + vim.cmd("wincmd l") + vim.api.nvim_win_close(0, false) + vim.cmd("wincmd h") + vim.api.nvim_win_close(0, false) + + vim.opt_local.number = true + vim.opt_local.relativenumber = true + vim.opt_local.signcolumn = "yes" + vim.opt_local.cursorline = true + vim.opt_local.spell = false + -- vim.opt_local.wrap = true -- TODO: needed? + vim.opt_local.textwidth = 0 + vim.opt_local.scrolloff = 2 + vim.opt_local.formatoptions:remove('t') + vim.opt_local.laststatus = 0 + -- vim.cmd("vertical resize") + else + vim.g.writing_mode = true + + vim.g.wrmode_prev_hl_winsep = vim.api.nvim_get_hl(0, { name = 'WinSeparator' }) + vim.api.nvim_set_hl(0, 'WinSeparator', { bg = 'none', fg = '#000000' }) + local window_width = 72 + local window_padding = math.max(math.floor((vim.o.columns - window_width) / 2), 1) + vim.cmd("vsplit") + local writing_pane = vim.api.nvim_get_current_win() + EnableWritingModeUiForCurrentWindow() + vim.opt_local.spell = true + vim.opt_local.textwidth = window_width + vim.opt_local.scrolloff = 14 + vim.opt_local.formatoptions:append('t') + vim.cmd("wincmd h") + TmpBuff('enew') + local padding_pane_left = vim.api.nvim_get_current_win() + EnableWritingModeUiForCurrentWindow() + vim.cmd("wincmd l") + TmpBuff('vnew') + local padding_pane_right = vim.api.nvim_get_current_win() + EnableWritingModeUiForCurrentWindow() + vim.api.nvim_set_current_win(writing_pane) + + vim.api.nvim_win_set_width(padding_pane_left, window_padding) + vim.api.nvim_win_set_width(padding_pane_right, window_padding) + vim.api.nvim_win_set_width(writing_pane, window_width) + end +end + diff --git a/src_files/.config/tmux/tmux.conf b/src_files/.config/tmux/tmux.conf index 197e70d..c31bb9a 100644 --- a/src_files/.config/tmux/tmux.conf +++ b/src_files/.config/tmux/tmux.conf @@ -1,10 +1,19 @@ set -s escape-time 0 +# replace default prefix and bind-key unbind C-b set-option -g prefix C-Space bind-key C-Space send-prefix + +# settings for status line and window list +set-option -g base-index 1 +set-option -g status-position 'bottom' +set-option -g status-left-length 28 +set-option -Fg status-right '#{host} | %Y%m%d %H:%M' # or maybe host_short + +# theme settings +set-option -g status-style "bg=default fg=default" # default, theme files can overwrite source-file "$XDG_CONFIG_HOME/tmux/theme.conf" -set -g base-index 1 # unbind keys unbind-key f; unbind-key C-f; unbind-key s; unbind-key C-s diff --git a/src_files/.config/zz-this-box/themes/gruvbox/tmux.conf b/src_files/.config/zz-this-box/themes/gruvbox/tmux.conf index 8b039e1..127c7b3 100644 --- a/src_files/.config/zz-this-box/themes/gruvbox/tmux.conf +++ b/src_files/.config/zz-this-box/themes/gruvbox/tmux.conf @@ -1,5 +1,2 @@ -set -g status-style 'bg=#111111 fg=#22cc00' - -# transparency -set-window-option -g window-style bg=default -# set-option -g status-style bg=default +set-window-option -g window-style bg=default # transparency +set-option -g status-style 'bg=default fg=#22cc00' diff --git a/src_files/.config/zz-this-box/themes/gruvbox/wallpaper/01-kjas-airport-03.jpg b/src_files/.config/zz-this-box/themes/gruvbox/wallpaper/01-kjas-airport-03.jpg new file mode 100644 index 0000000..ec6111b Binary files /dev/null and b/src_files/.config/zz-this-box/themes/gruvbox/wallpaper/01-kjas-airport-03.jpg differ diff --git a/src_files/.config/zz-this-box/themes/gruvbox/wallpaper/02-kjas-airport-01.jpg b/src_files/.config/zz-this-box/themes/gruvbox/wallpaper/02-kjas-airport-01.jpg new file mode 100644 index 0000000..4b8d4d1 Binary files /dev/null and b/src_files/.config/zz-this-box/themes/gruvbox/wallpaper/02-kjas-airport-01.jpg differ diff --git a/src_files/.config/zz-this-box/themes/osaka-jade/tmux.conf b/src_files/.config/zz-this-box/themes/osaka-jade/tmux.conf index 478b537..27b6e6f 100644 --- a/src_files/.config/zz-this-box/themes/osaka-jade/tmux.conf +++ b/src_files/.config/zz-this-box/themes/osaka-jade/tmux.conf @@ -1,5 +1,2 @@ -set -g status-style 'bg=#549E6A fg=#000000' - -# transparency -set-window-option -g window-style bg=default -# set-option -g status-style bg=default +set-window-option -g window-style bg=default # transparency +set-option -g status-style 'bg=#549E6A fg=#000000' diff --git a/src_files/.config/zz-this-box/themes/pina/tmux.conf b/src_files/.config/zz-this-box/themes/pina/tmux.conf index 8b039e1..b03b147 100644 --- a/src_files/.config/zz-this-box/themes/pina/tmux.conf +++ b/src_files/.config/zz-this-box/themes/pina/tmux.conf @@ -1,5 +1,2 @@ -set -g status-style 'bg=#111111 fg=#22cc00' - -# transparency -set-window-option -g window-style bg=default -# set-option -g status-style bg=default +set-window-option -g window-style bg=default # transparency +set-option -g status-style 'bg=default fg=#7db085' diff --git a/src_files/.config/zz-this-box/themes/pina/wallpaper/02-santa-monica-beach-05.jpg b/src_files/.config/zz-this-box/themes/pina/wallpaper/02-santa-monica-beach-05.jpg new file mode 100644 index 0000000..e845ade Binary files /dev/null and b/src_files/.config/zz-this-box/themes/pina/wallpaper/02-santa-monica-beach-05.jpg differ diff --git a/src_files/.config/zz-this-box/themes/tokyodark/tmux.conf b/src_files/.config/zz-this-box/themes/tokyodark/tmux.conf index 8b039e1..127c7b3 100644 --- a/src_files/.config/zz-this-box/themes/tokyodark/tmux.conf +++ b/src_files/.config/zz-this-box/themes/tokyodark/tmux.conf @@ -1,5 +1,2 @@ -set -g status-style 'bg=#111111 fg=#22cc00' - -# transparency -set-window-option -g window-style bg=default -# set-option -g status-style bg=default +set-window-option -g window-style bg=default # transparency +set-option -g status-style 'bg=default fg=#22cc00' diff --git a/src_files/imports/themes-omarchy-core/gruvbox/backgrounds/01-grubox-bg.jpg b/src_files/imports/themes-omarchy-core/gruvbox/backgrounds/03-grubox-bg-1-gruvbox.jpg similarity index 100% rename from src_files/imports/themes-omarchy-core/gruvbox/backgrounds/01-grubox-bg.jpg rename to src_files/imports/themes-omarchy-core/gruvbox/backgrounds/03-grubox-bg-1-gruvbox.jpg diff --git a/src_files/imports/themes-omarchy-extra/pina/backgrounds/01-pina-bg.jpg b/src_files/imports/themes-omarchy-extra/pina/backgrounds/01-pina-bg-1.jpg similarity index 100% rename from src_files/imports/themes-omarchy-extra/pina/backgrounds/01-pina-bg.jpg rename to src_files/imports/themes-omarchy-extra/pina/backgrounds/01-pina-bg-1.jpg