aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtask/.local/bin/task-context.sh2
-rwxr-xr-xtmux/.local/bin/tmux-kill-menu.sh2
-rwxr-xr-xtmux/.local/bin/tmux-menu.sh24
3 files changed, 10 insertions, 18 deletions
diff --git a/task/.local/bin/task-context.sh b/task/.local/bin/task-context.sh
index 9690a4a..4892557 100755
--- a/task/.local/bin/task-context.sh
+++ b/task/.local/bin/task-context.sh
@@ -1,4 +1,4 @@
#!/bin/sh
# TODO: list contexts using taskwarrior
-echo "none default dev codex reading writing" | sed 's/ /\n/g' | dmenu -l 10 | xargs task context
+echo "none default dev codex reading writing" | sed 's/ /\n/g' | dmenu | xargs task context
diff --git a/tmux/.local/bin/tmux-kill-menu.sh b/tmux/.local/bin/tmux-kill-menu.sh
index e910a4d..3d72f7f 100755
--- a/tmux/.local/bin/tmux-kill-menu.sh
+++ b/tmux/.local/bin/tmux-kill-menu.sh
@@ -1,2 +1,2 @@
#!/bin/sh
-tmux ls -F "#{session_name}" | dmenu -l 10 | xargs tmux kill-session -t
+tmux ls -F "#{session_name}" | dmenu | xargs tmux kill-session -t
diff --git a/tmux/.local/bin/tmux-menu.sh b/tmux/.local/bin/tmux-menu.sh
index a0fa6e2..8b8f928 100755
--- a/tmux/.local/bin/tmux-menu.sh
+++ b/tmux/.local/bin/tmux-menu.sh
@@ -1,20 +1,12 @@
#!/bin/sh
PROJECTS_DIRS="$HOME/Documents/Projects $HOME/Documents/Projects/hp"
-TMUXINATOR_PROJECTS_DIR="$HOME/.config/tmuxinator"
-SELECTED=$({ for dir in $PROJECTS_DIRS; do ls $dir; done; ls $TMUXINATOR_PROJECTS_DIR; } | dmenu -l 10)
+SELECTED=$({ for dir in $PROJECTS_DIRS; do ls $dir; done; } | dmenu)
-if [ $(echo $SELECTED | grep '.yml') ]; then
- # Tmuxinator project was selected, start it
- tmuxinator start "${SELECTED%.*}"
-else
- # Project directory was selected, find its full path (in any of the dirs)
- for dir in $PROJECTS_DIRS; do
- FULL_PATH=$(find -L $dir -maxdepth 1 -type d -name $SELECTED)
- if [ -n "$FULL_PATH" ]; then
- # Start project based on the template
- tmuxinator start --no-attach -p=$HOME/.config/tmuxinator/.template.yml name=$SELECTED root=$FULL_PATH 2>/dev/null &
- break
- fi
- done;
-fi
+for dir in $PROJECTS_DIRS; do
+ FULL_PATH=$(find -L $dir -maxdepth 1 -type d -name $SELECTED)
+ if [ -n "$FULL_PATH" ]; then
+ tmux new-session -s $SELECTED -c $FULL_PATH \; send-keys "nvim" Enter \; split-window -h \; rename-window editor
+ break
+ fi
+done;