Compare commits

..

No commits in common. "8226abf83991466af8d9aa15e1cb710f2475c62b" and "f2ea35680810811115b5e365c697ba491ae29828" have entirely different histories.

10 changed files with 47 additions and 102 deletions

View file

@ -1,18 +1,9 @@
# Font
font-family = JetBrainsMono Nerd Font Mono
font-size = 16
# Theme # Theme
theme = GruvboxDarkHard theme = GruvboxDarkHard
background = 1d2021 background = 1d2021
window-theme = ghostty
# Font window-decoration = false
font-family = JetBrainsMono Nerd Font Mono
font-style = Medium
font-size = 16
font-feature = -calt
font-feature = -liga
font-feature = -dlig
window-padding-color = background
macos-titlebar-style = hidden
term = "xterm-256color"
auto-update = download

View file

@ -8,7 +8,7 @@ vim.keymap.set("n", "<C-n>", "<cmd>cnext<CR>zz")
vim.keymap.set("n", "<A-h>", "<cmd>bp<CR>") vim.keymap.set("n", "<A-h>", "<cmd>bp<CR>")
vim.keymap.set("n", "<A-l>", "<cmd>bn<CR>") vim.keymap.set("n", "<A-l>", "<cmd>bn<CR>")
--jk as escape --jk as escape
vim.keymap.set("i", "jk", "<esc>") vim.keymap.set("i", "jk","<esc>")
-- Copy to system clipboard -- Copy to system clipboard
vim.keymap.set({ 'n', 'x' }, 'gy', '"+y', { desc = 'Copy to system clipboard' }) vim.keymap.set({ 'n', 'x' }, 'gy', '"+y', { desc = 'Copy to system clipboard' })
-- Paste from system clipboard in normal mode -- Paste from system clipboard in normal mode
@ -16,16 +16,10 @@ vim.keymap.set('n', 'gp', '"+p', { desc = 'Paste from system clipboard' })
-- Paste from system clipboard in visual mode without overwriting the clipboard -- Paste from system clipboard in visual mode without overwriting the clipboard
vim.keymap.set('x', 'gp', '"+P', { desc = 'Paste from system clipboard' }) vim.keymap.set('x', 'gp', '"+P', { desc = 'Paste from system clipboard' })
--Center screen after some motions --Center screen after some motions
vim.keymap.set("n", "<C-d>", "<C-d>zz", { desc = "Center cursor after moving down half-page" }) vim.keymap.set("n", "<C-d>", "<C-d>zz", {desc = "Center cursor after moving down half-page"})
vim.keymap.set("n", "<C-u>", "<C-u>zz", { desc = "Center cursor after moving down half-page" }) vim.keymap.set("n", "<C-u>", "<C-u>zz", {desc = "Center cursor after moving down half-page"})
vim.keymap.set("n", "G", "Gzz", { desc = "Center cursor after moving down half-page" }) vim.keymap.set("n", "G", "Gzz", {desc = "Center cursor after moving down half-page"})
--Run lua stuff (ty teej) --Run lua stuff (ty teej)
vim.keymap.set("n", "<space><space>x", "<cmd>source %<CR>") vim.keymap.set("n", "<space><space>x", "<cmd>source %<CR>")
vim.keymap.set("n", "<space>x", ":.lua<CR>") vim.keymap.set("n", "<space>x", ":.lua<CR>")
vim.keymap.set("v", "<space>x", ":lua<CR>") vim.keymap.set("v", "<space>x", ":lua<CR>")
--Merge lines in visual mode
vim.keymap.set("v", "J", function()
for _ = 1, vim.fn.getpos("'>")[2] - vim.fn.getpos("'<")[2] - 1 do
vim.api.nvim_command("normal! J")
end
end)

View file

@ -3,7 +3,7 @@ return {
'saghen/blink.cmp', 'saghen/blink.cmp',
lazy = false, lazy = false,
dependencies = 'rafamadriz/friendly-snippets', dependencies = 'rafamadriz/friendly-snippets',
version = "*", build = 'cargo build --release',
opts = { opts = {
keymap = { keymap = {
preset = 'default', preset = 'default',

View file

@ -181,8 +181,7 @@ return {
markdown = { "mdformat" }, markdown = { "mdformat" },
rust = { "rustfmt" }, rust = { "rustfmt" },
go = { "gofmt" }, go = { "gofmt" },
json = { "jq" }, json = { "jq" }
bash = { "shfmt" }
} }
}) })
end, end,

View file

@ -47,12 +47,5 @@ return {
require("blame").setup() require("blame").setup()
end end
}, },
"tpope/vim-fugitive", "tpope/vim-fugitive"
-- {
-- "nvzone/typr",
-- dependencies = {
-- "nvzone/volt"
-- },
-- opts = {}
-- }
} }

View file

@ -84,17 +84,13 @@ return {
table.insert(newVirtText, { suffix, 'MoreMsg' }) table.insert(newVirtText, { suffix, 'MoreMsg' })
return newVirtText return newVirtText
end end
-- global handler
-- `handler` is the 2nd parameter of `setFoldVirtTextHandler`,
-- check out `./lua/ufo.lua` and search `setFoldVirtTextHandler` for detail.
require('ufo').setup({ require('ufo').setup({
fold_virt_text_handler = handler fold_virt_text_handler = handler
}) })
end end
},
{
"OXY2DEV/markview.nvim",
ft = "markdown",
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-tree/nvim-web-devicons"
}
} }
} }

View file

@ -25,7 +25,7 @@ bind-key 'o' if-shell "$is_vim" 'send-keys F8' 'select-pane -R'
# Tmus sessionizer # Tmus sessionizer
unbind s unbind s
bind-key 's' display-popup -E -w 60% -h 40% "~/.local/bin/tms" bind-key 's' display-popup -E -w 90% -h 90% "~/.local/bin/tms"
unbind g unbind g
bind-key 'g' display-popup -d '#{pane_current_path}' -E -w 100% -h 100% "lazygit" bind-key 'g' display-popup -d '#{pane_current_path}' -E -w 100% -h 100% "lazygit"

View file

@ -44,6 +44,5 @@ export XDG_CONFIG_HOME="${HOME}/.config"
export XDG_CACHE_HOME="${HOME}/.cache" export XDG_CACHE_HOME="${HOME}/.cache"
export XDG_DATA_HOME="${HOME}/.local/share" export XDG_DATA_HOME="${HOME}/.local/share"
export XDG_STATE_HOME="${HOME}/.local/state" export XDG_STATE_HOME="${HOME}/.local/state"
export XDG_RUNTIME_DIR=/tmp
. "$HOME/.cargo/env" . "$HOME/.cargo/env"

View file

@ -81,16 +81,14 @@ case $1 in
tmux_bar_focused_fg="#1d2021" tmux_bar_focused_fg="#1d2021"
for addr in $XDG_RUNTIME_DIR/nvim.*; do nvim --server /tmp/nvim.pipe --remote-send ':lua vim.g.gruvbox_material_better_performance = 1<CR>' || true
nvim --server $addr --remote-send ':lua vim.g.gruvbox_material_better_performance = 1<CR>' || true echo "vim.g.gruvbox_material_better_performance = 1" > ~/.config/nvim/lua/core/theme.lua
echo "vim.g.gruvbox_material_better_performance = 1" > ~/.config/nvim/lua/core/theme.lua nvim --server /tmp/nvim.pipe --remote-send ':lua vim.g.gruvbox_material_background = "hard"<CR>' || true
nvim --server $addr --remote-send ':lua vim.g.gruvbox_material_background = "hard"<CR>' || true echo "vim.g.gruvbox_material_background = 'hard'" >> ~/.config/nvim/lua/core/theme.lua
echo "vim.g.gruvbox_material_background = 'hard'" >> ~/.config/nvim/lua/core/theme.lua nvim --server /tmp/nvim.pipe --remote-send ':lua vim.g.gruvbox_material_foreground = "original"<CR>' || true
nvim --server $addr --remote-send ':lua vim.g.gruvbox_material_foreground = "original"<CR>' || true echo "vim.g.gruvbox_material_foreground = 'original'" >> ~/.config/nvim/lua/core/theme.lua
echo "vim.g.gruvbox_material_foreground = 'original'" >> ~/.config/nvim/lua/core/theme.lua nvim --server /tmp/nvim.pipe --remote-send ':lua vim.opt.background = "dark"<CR>' || true
nvim --server $addr --remote-send ':lua vim.opt.background = "dark"<CR>' || true echo "vim.opt.background = 'dark'" >> ~/.config/nvim/lua/core/theme.lua
echo "vim.opt.background = 'dark'" >> ~/.config/nvim/lua/core/theme.lua
done
#Change kitty theme #Change kitty theme
kitten themes --reload-in=all Gruvbox Dark kitten themes --reload-in=all Gruvbox Dark
@ -108,16 +106,14 @@ case $1 in
tmux_bar_focused_fg="#f2e5bc" tmux_bar_focused_fg="#f2e5bc"
for addr in $XDG_RUNTIME_DIR/nvim.*; do nvim --server /tmp/nvim.pipe --remote-send ':lua vim.g.gruvbox_material_better_performance = 1<CR>' || true
nvim --server $addr --remote-send ':lua vim.g.gruvbox_material_better_performance = 1<CR>' || true echo "vim.g.gruvbox_material_better_performance = 1" > ~/.config/nvim/lua/core/theme.lua
echo "vim.g.gruvbox_material_better_performance = 1" > ~/.config/nvim/lua/core/theme.lua nvim --server /tmp/nvim.pipe --remote-send ':lua vim.g.gruvbox_material_background = "soft"<CR>' || true
nvim --server $addr --remote-send ':lua vim.g.gruvbox_material_background = "soft"<CR>' || true echo "vim.g.gruvbox_material_background = 'soft'" >> ~/.config/nvim/lua/core/theme.lua
echo "vim.g.gruvbox_material_background = 'soft'" >> ~/.config/nvim/lua/core/theme.lua nvim --server /tmp/nvim.pipe --remote-send ':lua vim.g.gruvbox_material_foreground = "original"<CR>' || true
nvim --server $addr --remote-send ':lua vim.g.gruvbox_material_foreground = "original"<CR>' || true echo "vim.g.gruvbox_material_foreground = 'original'" >> ~/.config/nvim/lua/core/theme.lua
echo "vim.g.gruvbox_material_foreground = 'original'" >> ~/.config/nvim/lua/core/theme.lua nvim --server /tmp/nvim.pipe --remote-send ':lua vim.opt.background = "light"<CR>' || true
nvim --server $addr --remote-send ':lua vim.opt.background = "light"<CR>' || true echo "vim.opt.background = 'light'" >> ~/.config/nvim/lua/core/theme.lua
echo "vim.opt.background = 'light'" >> ~/.config/nvim/lua/core/theme.lua
done
#Change kitty theme #Change kitty theme
kitten themes --reload-in=all Gruvbox Light kitten themes --reload-in=all Gruvbox Light

View file

@ -1,56 +1,33 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if [[ $# -eq 1 ]]; then if [[ $# -eq 1 ]]; then
selected_path=$1 selected=$1
else else
# Define commands dynamically with display names uni_projects=$(find ~/projects/University -mindepth 3 -maxdepth 3 -type d)
personal_projects=$(find ~/projects/Personal -mindepth 1 -maxdepth 1 -type d)
declare -A commands=( work_projects=$(find ~/projects/Work -mindepth 1 -maxdepth 1 -type d)
["University"]="fd . ~/projects/University --exact-depth 3 --type d 2> /dev/null" vaults=$(find ~/vaults -mindepth 2 -maxdepth 2 -type d)
["Personal"]="fd . ~/projects/Personal --exact-depth 1 --type d 2> /dev/null" gits=$(find ~/gits -mindepth 1 -maxdepth 1 -type d)
["Work"]="fd . ~/projects/Work --exact-depth 1 --type d 2> /dev/null" dotfiles=$(find ~/.config -mindepth 1 -maxdepth 1 -type d)
["Vaults"]="fd . ~/vaults --exact-depth 2 --type d 2> /dev/null" #Merge the two lists
["Git Repositories"]="fd . ~/gits --exact-depth 1 --type d 2> /dev/null" selected=$(echo -e "$uni_projects\n$personal_projects\n$work_projects\n$dotfiles\n$gits\n$vaults" | fzf)
["Dotfiles"]="fd . ~/.config --exact-depth 1 --type d 2> /dev/null"
)
# Initialize combined list
combined_list=""
for display_name in "${!commands[@]}"; do
command="${commands[$display_name]}"
result=$(eval $command | while read -r path; do
last_segment=$(basename "$path")
echo -e "$display_name > $last_segment\t$path"
done)
[[ -n "$result" ]] && combined_list+="$result\n"
done
selected=$(echo -e "$combined_list" | fzf --with-nth=1 --delimiter='\t' --prompt="Select a project: " \
--preview "eza --tree --level=2 --icons --color=always {2}" \
--preview-window=right:50%:wrap)
selected_path=$(echo "$selected" | awk -F'\t' '{print $2}')
fi fi
# Exit if no selection was made if [[ -z $selected ]]; then
if [[ -z $selected_path ]]; then
exit 0 exit 0
fi fi
# Prepare tmux session name selected_name=$(basename "$selected" | tr . _)
selected_name=$(basename "$selected_path" | tr . _)
selected_name=${selected_name^^} selected_name=${selected_name^^}
tmux_running=$(pgrep tmux) tmux_running=$(pgrep tmux)
if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then
tmux new-session -s $selected_name -c "$selected_path" tmux new-session -s $selected_name -c $selected
exit 0 exit 0
fi fi
if ! tmux has-session -t=$selected_name 2> /dev/null; then if ! tmux has-session -t=$selected_name 2> /dev/null; then
tmux new-session -ds $selected_name -c "$selected_path" tmux new-session -ds $selected_name -c $selected
fi fi
tmux switch-client -t $selected_name tmux switch-client -t $selected_name