From 5b6aa3d6fba39eaf1bdcbd96e1712b7cdf0a8236 Mon Sep 17 00:00:00 2001 From: goodhumored Date: Thu, 25 Jul 2024 01:14:08 +0300 Subject: [PATCH] tmux plugins added to gitmodules --- .gitmodules | 18 ++++++++++++++++++ .stow-local-ignore | 3 +++ .tmux/plugins/tmux | 1 + .tmux/plugins/tmux-copycat | 1 + .tmux/plugins/tmux-open | 1 + .tmux/plugins/tmux-sensible | 1 + .tmux/plugins/tmux-yank | 1 + .tmux/plugins/tpm | 1 + add-tmux-plugins.sh | 20 ++++++++++++++++++++ 9 files changed, 47 insertions(+) create mode 100644 .gitmodules create mode 100644 .stow-local-ignore create mode 160000 .tmux/plugins/tmux create mode 160000 .tmux/plugins/tmux-copycat create mode 160000 .tmux/plugins/tmux-open create mode 160000 .tmux/plugins/tmux-sensible create mode 160000 .tmux/plugins/tmux-yank create mode 160000 .tmux/plugins/tpm create mode 100755 add-tmux-plugins.sh diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..323e94b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,18 @@ +[submodule ".tmux/plugins/tpm"] + path = .tmux/plugins/tpm + url = https://github.com/tmux-plugins/tpm +[submodule ".tmux/plugins/tmux"] + path = .tmux/plugins/tmux + url = https://git::@github.com/dracula/tmux +[submodule ".tmux/plugins/tmux-copycat"] + path = .tmux/plugins/tmux-copycat + url = https://git::@github.com/tmux-plugins/tmux-copycat +[submodule ".tmux/plugins/tmux-open"] + path = .tmux/plugins/tmux-open + url = https://git::@github.com/tmux-plugins/tmux-open +[submodule ".tmux/plugins/tmux-sensible"] + path = .tmux/plugins/tmux-sensible + url = https://git::@github.com/tmux-plugins/tmux-sensible +[submodule ".tmux/plugins/tmux-yank"] + path = .tmux/plugins/tmux-yank + url = https://git::@github.com/tmux-plugins/tmux-yank diff --git a/.stow-local-ignore b/.stow-local-ignore new file mode 100644 index 0000000..6d4f444 --- /dev/null +++ b/.stow-local-ignore @@ -0,0 +1,3 @@ +add-tmux-plugins.sh +.git +.gitmodules diff --git a/.tmux/plugins/tmux b/.tmux/plugins/tmux new file mode 160000 index 0000000..c2b1d67 --- /dev/null +++ b/.tmux/plugins/tmux @@ -0,0 +1 @@ +Subproject commit c2b1d67cbda5c44ea8ee25d2ab307063e6959d0f diff --git a/.tmux/plugins/tmux-copycat b/.tmux/plugins/tmux-copycat new file mode 160000 index 0000000..d7f7e6c --- /dev/null +++ b/.tmux/plugins/tmux-copycat @@ -0,0 +1 @@ +Subproject commit d7f7e6c1de0bc0d6915f4beea5be6a8a42045c09 diff --git a/.tmux/plugins/tmux-open b/.tmux/plugins/tmux-open new file mode 160000 index 0000000..763d0a8 --- /dev/null +++ b/.tmux/plugins/tmux-open @@ -0,0 +1 @@ +Subproject commit 763d0a852e6703ce0f5090a508330012a7e6788e diff --git a/.tmux/plugins/tmux-sensible b/.tmux/plugins/tmux-sensible new file mode 160000 index 0000000..25cb91f --- /dev/null +++ b/.tmux/plugins/tmux-sensible @@ -0,0 +1 @@ +Subproject commit 25cb91f42d020f675bb0a2ce3fbd3a5d96119efa diff --git a/.tmux/plugins/tmux-yank b/.tmux/plugins/tmux-yank new file mode 160000 index 0000000..acfd36e --- /dev/null +++ b/.tmux/plugins/tmux-yank @@ -0,0 +1 @@ +Subproject commit acfd36e4fcba99f8310a7dfb432111c242fe7392 diff --git a/.tmux/plugins/tpm b/.tmux/plugins/tpm new file mode 160000 index 0000000..99469c4 --- /dev/null +++ b/.tmux/plugins/tpm @@ -0,0 +1 @@ +Subproject commit 99469c4a9b1ccf77fade25842dc7bafbc8ce9946 diff --git a/add-tmux-plugins.sh b/add-tmux-plugins.sh new file mode 100755 index 0000000..511cfb7 --- /dev/null +++ b/add-tmux-plugins.sh @@ -0,0 +1,20 @@ +pwd +ls .tmux/plugins +for repo in .tmux/plugins/* ; do + if [ -d "$repo/.git" ]; then + # Remove trailing slash from the directory name + repo=${repo%/} + + # Get the origin URL of the repository + url=$(git -C "$repo" remote get-url origin) + + if [ -n "$url" ]; then + echo "adding repo $repo: $url" + # Add the repository as a submodule using its origin URL + git rm --cached -f "$repo" + git submodule add "$url" "$repo" + else + echo "No origin URL found for $repo" + fi + fi +done