3 Commits

3 changed files with 43 additions and 29 deletions

View File

@@ -1,23 +1,23 @@
return { return {
"j-hui/fidget.nvim", "j-hui/fidget.nvim",
event = "VeryLazy", event = "VeryLazy",
config = function() config = function()
local fidget = require("fidget") local fidget = require("fidget")
fidget.setup({ fidget.setup({
notification = { notification = {
window = { window = {
normal_hl = "String", -- Base highlight group in the notification window normal_hl = "String", -- Base highlight group in the notification window
winblend = 0, -- Background color opacity in the notification window winblend = 0, -- Background color opacity in the notification window
border = "rounded", -- Border around the notification window border = "rounded", -- Border around the notification window
zindex = 45, -- Stacking priority of the notification window zindex = 45, -- Stacking priority of the notification window
max_width = 0, -- Maximum width of the notification window max_width = 0, -- Maximum width of the notification window
max_height = 0, -- Maximum height of the notification window max_height = 0, -- Maximum height of the notification window
x_padding = 1, -- Padding from right edge of window boundary x_padding = 1, -- Padding from right edge of window boundary
y_padding = 1, -- Padding from bottom edge of window boundary y_padding = 1, -- Padding from bottom edge of window boundary
align = "bottom", -- How to align the notification window align = "bottom", -- How to align the notification window
relative = "editor", -- What the notification window position is relative to relative = "editor", -- What the notification window position is relative to
}, },
}, },
}) })
end, end,
} }

View File

@@ -42,7 +42,7 @@ require("lazy").setup({
}, },
-- LSP, formatting, etc. -- -- LSP, formatting, etc. --
{ "folke/neodev.nvim", opts = {} }, --{ "folke/neodev.nvim", opts = {} },
}, { }, {
checker = { checker = {
enabled = true, enabled = true,

View File

@@ -41,6 +41,17 @@ function setup_fuzzy_find_paths() {
debug_print "paths: $paths" debug_print "paths: $paths"
} }
function create_session() {
local selected_name=$1
local selected=$2
tmux new-session -ds "$selected_name" -c "$selected" -n "editor"
tmux send-keys -t editor 'n' Enter
tmux new-window -d -n "terminal" -c "$selected"
tmux new-window -d -n 'files' -c "$selected"
tmux send-keys -t files 'yazi' Enter
}
#################### MAIN #################### #################### MAIN ####################
declare choose="${chooseOpt[-1]}" declare choose="${chooseOpt[-1]}"
@@ -83,16 +94,19 @@ selected_name=$(basename "$selected" | tr . _)
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" create_session "$selected_name" "$selected"
exit 0 # tmux new-session -s "$selected_name" -c "$selected"
# exit 0
elif ! tmux has-session -t "$selected_name" 2> /dev/null; then
create_session "$selected_name" "$selected"
fi fi
# Create a session if it doesn't exist. # Create a session if it doesn't exist.
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" -n "editor" # tmux new-session -ds "$selected_name" -c "$selected" -n "editor"
tmux send-keys -t editor 'n' Enter # tmux send-keys -t editor 'n' Enter
tmux new-window -d -n "terminal" -c "$selected" # tmux new-window -d -n "terminal" -c "$selected"
fi # fi
[ -z $TMUX ] && tmux attach -t "$selected_name" \ [ -z $TMUX ] && tmux attach -t "$selected_name" \
|| tmux switch-client -t "$selected_name" || tmux switch-client -t "$selected_name"