mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-16 15:12:36 +00:00
Compare commits
3 Commits
d27f2ad490
...
f325d61131
| Author | SHA1 | Date | |
|---|---|---|---|
|
f325d61131
|
|||
|
ae13738a4d
|
|||
|
6c84428179
|
@@ -1,23 +1,23 @@
|
||||
return {
|
||||
"j-hui/fidget.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
local fidget = require("fidget")
|
||||
fidget.setup({
|
||||
notification = {
|
||||
window = {
|
||||
normal_hl = "String", -- Base highlight group in the notification window
|
||||
winblend = 0, -- Background color opacity in the notification window
|
||||
border = "rounded", -- Border around the notification window
|
||||
zindex = 45, -- Stacking priority of the notification window
|
||||
max_width = 0, -- Maximum width of the notification window
|
||||
max_height = 0, -- Maximum height of the notification window
|
||||
x_padding = 1, -- Padding from right edge of window boundary
|
||||
y_padding = 1, -- Padding from bottom edge of window boundary
|
||||
align = "bottom", -- How to align the notification window
|
||||
relative = "editor", -- What the notification window position is relative to
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
"j-hui/fidget.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
local fidget = require("fidget")
|
||||
fidget.setup({
|
||||
notification = {
|
||||
window = {
|
||||
normal_hl = "String", -- Base highlight group in the notification window
|
||||
winblend = 0, -- Background color opacity in the notification window
|
||||
border = "rounded", -- Border around the notification window
|
||||
zindex = 45, -- Stacking priority of the notification window
|
||||
max_width = 0, -- Maximum width of the notification window
|
||||
max_height = 0, -- Maximum height of the notification window
|
||||
x_padding = 1, -- Padding from right edge of window boundary
|
||||
y_padding = 1, -- Padding from bottom edge of window boundary
|
||||
align = "bottom", -- How to align the notification window
|
||||
relative = "editor", -- What the notification window position is relative to
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ require("lazy").setup({
|
||||
},
|
||||
|
||||
-- LSP, formatting, etc. --
|
||||
{ "folke/neodev.nvim", opts = {} },
|
||||
--{ "folke/neodev.nvim", opts = {} },
|
||||
}, {
|
||||
checker = {
|
||||
enabled = true,
|
||||
|
||||
@@ -41,6 +41,17 @@ function setup_fuzzy_find_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 ####################
|
||||
|
||||
declare choose="${chooseOpt[-1]}"
|
||||
@@ -83,16 +94,19 @@ selected_name=$(basename "$selected" | tr . _)
|
||||
tmux_running=$(pgrep tmux)
|
||||
|
||||
if [[ -z $TMUX ]] && [[ -z $tmux_running ]]; then
|
||||
tmux new-session -s "$selected_name" -c "$selected"
|
||||
exit 0
|
||||
create_session "$selected_name" "$selected"
|
||||
# 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
|
||||
|
||||
# Create a session if it doesn't exist.
|
||||
if ! tmux has-session -t "$selected_name" 2> /dev/null; then
|
||||
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"
|
||||
fi
|
||||
# if ! tmux has-session -t "$selected_name" 2> /dev/null; then
|
||||
# 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"
|
||||
# fi
|
||||
|
||||
[ -z $TMUX ] && tmux attach -t "$selected_name" \
|
||||
|| tmux switch-client -t "$selected_name"
|
||||
|
||||
Reference in New Issue
Block a user