diff --git a/.config/scripts/sessions.sh b/.config/scripts/sessions.sh index fdcb222..fe83191 100755 --- a/.config/scripts/sessions.sh +++ b/.config/scripts/sessions.sh @@ -82,12 +82,23 @@ goland-new() { if [[ $dir == *'dotnet'* ]]; then /home/user/.local/share/JetBrains/Toolbox/apps/rider/bin/rider $dir & - elif [[ $dir == *'go'* ]]; then - /home/user/.local/share/JetBrains/Toolbox/scripts/goland $dir & - elif [[ $dir == *'devops'* ]]; then - /home/user/.local/share/JetBrains/Toolbox/scripts/goland $dir & + return fi + + /home/user/.local/share/JetBrains/Toolbox/scripts/goland $dir & #sleep 1 && /home/user/.local/share/JetBrains/Toolbox/apps/goland/bin/goland $dir & + # + name=$(basename "$dir") + if [[ $name == .* ]]; then + name=${name#.} + fi + + tmux has-session -t ${name} 2>/dev/null && { + tmux switch-client -t ${name} + return + } + + tmux new-session -d -s "$name" -c "$dir" } switch() { diff --git a/.ideavimrc b/.ideavimrc index 3e321be..f322356 100644 --- a/.ideavimrc +++ b/.ideavimrc @@ -218,7 +218,7 @@ map GP (TUILauncher.glab-ci-view-web) let g:WhichKeyDesc_Tools = "t Tools" let g:WhichKeyDesc_Tools_Copilot = "tc Continue" let g:WhichKeyDesc_Tools_Debug = "td Debug" -let g:WhichKeyDesc_Tools_Database = "td Database" +let g:WhichKeyDesc_Tools_Database = "tD Database" let g:WhichKeyDesc_Tools_Terminal = "tt Terminal" let g:WhichKeyDesc_tools_mergerequest = "tm Merge Request" let g:WhichKeyDesc_tools_services = "ts Services" @@ -235,7 +235,7 @@ map ts (ActivateServicesToolWindow) map tk (TUILauncher.k9s) map ty (TUILauncher.yazi) map tg (TUILauncher.lazygit) -map tD tD (ActivateDatabaseToolWindow) " Easy visual indentation vnoremap <