From 989269f4d5a0d3834bab3003cc557a5df5dbc13e Mon Sep 17 00:00:00 2001 From: iceyrazor Date: Tue, 29 Jul 2025 16:20:22 -0500 Subject: [PATCH] Squashed commit of the following: - customized tmux bar - swapped harpoon keys - fixed exit terminal key - removed trailing commas in waybar config - neovim - added proj search - added notes bind - bind to exit term (doesnt really work for me) - auto cwd OF file dir OR git main dir WHEN bufenter and bind - swaped tmux move keys - changed showmethekey windowrule --- env/.config/nvim/after/plugin/harpoon.lua | 4 +-- env/.config/nvim/after/plugin/telescope.lua | 5 ++++ env/.config/nvim/lua/yourmom/remap.lua | 29 +++++++++++++++++-- env/.config/sway/config | 4 +-- env/.config/tmux/tmux.conf | 31 +++++++++++---------- env/.config/waybar/config.jsonc | 8 +++--- 6 files changed, 56 insertions(+), 25 deletions(-) diff --git a/env/.config/nvim/after/plugin/harpoon.lua b/env/.config/nvim/after/plugin/harpoon.lua index 44b0de5..493a20c 100755 --- a/env/.config/nvim/after/plugin/harpoon.lua +++ b/env/.config/nvim/after/plugin/harpoon.lua @@ -7,8 +7,8 @@ if ok then vim.keymap.set("n","", ui.toggle_quick_menu) - vim.keymap.set("n","", function() ui.nav_file(1) end) - vim.keymap.set("n","", function() ui.nav_file(2) end) + vim.keymap.set("n","", function() ui.nav_file(1) end) + vim.keymap.set("n","", function() ui.nav_file(2) end) vim.keymap.set("n","", function() ui.nav_file(3) end) vim.keymap.set("n","", function() ui.nav_file(4) end) end diff --git a/env/.config/nvim/after/plugin/telescope.lua b/env/.config/nvim/after/plugin/telescope.lua index 8cc8efd..7a9d196 100755 --- a/env/.config/nvim/after/plugin/telescope.lua +++ b/env/.config/nvim/after/plugin/telescope.lua @@ -42,6 +42,7 @@ if ok then vim.keymap.set('n', 'pg', builtin.live_grep, {}) vim.keymap.set('n', 'pb', builtin.buffers, {}) vim.keymap.set('n', 'ph', builtin.help_tags, {}) + vim.keymap.set('n', 'pr', builtin.registers, {}) vim.keymap.set('n', 'ps', function() builtin.grep_string({ search = vim.fn.input("Grep > ") }); end) @@ -56,4 +57,8 @@ if ok then vim.keymap.set('n', 'gg', builtin.git_files, {}) vim.keymap.set('n', 'gs', builtin.git_status, {}) vim.keymap.set('n', 'gm', builtin.git_commits, {}) + + vim.keymap.set('n', 'proj', function () + require('telescope.builtin').find_files({cwd = "~/stuff/scripts"}) + end, {}) end diff --git a/env/.config/nvim/lua/yourmom/remap.lua b/env/.config/nvim/lua/yourmom/remap.lua index 7f837d9..131eff9 100755 --- a/env/.config/nvim/lua/yourmom/remap.lua +++ b/env/.config/nvim/lua/yourmom/remap.lua @@ -1,7 +1,10 @@ vim.g.mapleader=" " vim.g.maplocalleader=" " + vim.keymap.set("n", "pv", vim.cmd.Ex) +-- notes +vim.keymap.set("n", "notes", ":e ~/stuff/notes/notes.md") --move highlighted stuffs vim.keymap.set("v", "J", ":m '>+1gv=gv") @@ -62,8 +65,32 @@ vim.keymap.set('n', 'tp', ':tabp') -- make a error check thing for c vim.keymap.set("n", "ee", "oif err != nil {}Oreturn err") +-- terminal niceites +vim.keymap.set("n", "", ":", { desc = "Enter command mode" }) +vim.keymap.set("v", "", ":", { desc = "Enter command mode (visual)" }) +vim.keymap.set("t", "", "", { desc = "Exit terminal" }) +--change cwd to directory of buffer or git master directory +local function set_cwd() + local fname = vim.fn.expand("%:p") + if not fname:find("fugitive") and not fname:find("term") then -- no dot in filename + vim.cmd('cd ' .. vim.fn.expand('%:p:h')) + + local gitroot = vim.fn.system("git rev-parse --show-toplevel") + if string.find(gitroot, "fatal", 1, true) == nil then + vim.cmd("cd " .. gitroot) + end + end +end + +vim.keymap.set("n", "c", set_cwd, {}) + +vim.api.nvim_create_autocmd({ "BufEnter" }, { + pattern = "*", + callback = set_cwd +}) + -- auto closing para local function set_auto_close(doclose) if doclose==true then @@ -105,8 +132,6 @@ end vim.keymap.set("n", "k", toggle_auto_close) - - -- update every buffer vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost" }, { pattern = "*", diff --git a/env/.config/sway/config b/env/.config/sway/config index ff7979b..ab4329f 100644 --- a/env/.config/sway/config +++ b/env/.config/sway/config @@ -254,8 +254,8 @@ for_window [app_id="showmethekey-gtk"] \ floating enable, \ sticky enable, \ border none, \ - move position 257 1664, \ - resize set 1487 50, \ + move position 357 1660, \ + resize set 1160 50, \ # im-emoji-picker window no_focus [title="im-emoji-picker"] diff --git a/env/.config/tmux/tmux.conf b/env/.config/tmux/tmux.conf index d2b4d47..a668637 100755 --- a/env/.config/tmux/tmux.conf +++ b/env/.config/tmux/tmux.conf @@ -36,15 +36,15 @@ setw -g pane-base-index 1 set -g renumber-windows on # renumber windows when one is closed # nav rebinds -bind -r C-h select-pane -L -bind -r C-j select-pane -D -bind -r C-k select-pane -U -bind -r C-l select-pane -R +bind -r h select-pane -L +bind -r j select-pane -D +bind -r k select-pane -U +bind -r l select-pane -R -bind -r h resize-pane -L 5 -bind -r j resize-pane -D 5 -bind -r k resize-pane -U 5 -bind -r l resize-pane -R 5 +bind -r C-h resize-pane -L 5 +bind -r C-j resize-pane -D 5 +bind -r C-k resize-pane -U 5 +bind -r C-l resize-pane -R 5 bind -r m resize-pane -Z # maximize # pane joining @@ -60,14 +60,15 @@ bind-key -r H split-window -h -f # colors/theme -set -g status-bg "#333333" +# using vars in this cause the  chars to not use the color +set -g status-bg "#222222" set -g status-fg "#f1f1f1" -set -wg mode-style bg="#333334" -set -g pane-border-style fg='#333333' +set -wg mode-style bg="#222222" +set -g pane-border-style fg='#222222' set -g pane-active-border-style fg='#a030f0' active_window_fg='#e080f0' -set -g status-left "#[fg=${session_fg},bold,bg=${bg}][ #S] " +set -g status-left "#[fg=#f1f1f1,bold,bg=#4020af]  #S #[fg=#4020af,bg=#222222] " set -g status-left-length 40 -set -g window-status-current-format "#[fg=${active_window_fg},bg=default] #I:#W" -set -g window-status-format "#[fg=${default_fg},bg=default]#I:#W" -# set -g window-status-last-style "fg=${default_fg},bg=default" +set -g window-status-current-format "#[fg=${active_window_fg},bg=#222222]#I:#W #[fg=#f1f1f1,bg=#222222]" +set -g window-status-format "#[fg=#f1f1f1,bg=#222222]#I:#W #[fg=#f1f1f1,bg=#222222]" +set -g status-right '#[fg=#4020af,bg=#222222]#[fg=#f1f1f1,bg=#4020af] @#H %H:%M %d-%b-%y' diff --git a/env/.config/waybar/config.jsonc b/env/.config/waybar/config.jsonc index fda6a87..b469e7a 100644 --- a/env/.config/waybar/config.jsonc +++ b/env/.config/waybar/config.jsonc @@ -24,12 +24,12 @@ "custom/ws_end_arrow":{ "format": "", - "tooltip": false, + "tooltip": false }, "custom/mod_end_arrow":{ "format": "", - "tooltip": false, + "tooltip": false }, "hyprland/workspaces": { @@ -84,7 +84,7 @@ "17": ["DP-1"], "18": ["DP-1"], "19": ["DP-1"], - "20": ["DP-1"], + "20": ["DP-1"] }, "sort-by-name": true }, @@ -133,7 +133,7 @@ "17": ["DP-1"], "18": ["DP-1"], "19": ["DP-1"], - "20": ["DP-1"], + "20": ["DP-1"] }, "sort-by-name": true },