mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-16 07:02:37 +00:00
Compare commits
3 Commits
d27f2ad490
...
f325d61131
| Author | SHA1 | Date | |
|---|---|---|---|
|
f325d61131
|
|||
|
ae13738a4d
|
|||
|
6c84428179
|
@@ -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,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user