Compare commits
2 Commits
3d3a56e0ee
...
9c141172d6
Author | SHA1 | Date | |
---|---|---|---|
9c141172d6 | |||
aa9ff89aa5 |
20
project.sh
Executable file
20
project.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
projects=()
|
||||
|
||||
# Get list of projects from ~/Projects
|
||||
for dir in $HOME/Projects/**/*; do
|
||||
if [ -d $dir ]; then
|
||||
projects+=(${dir#$HOME/Projects/})
|
||||
fi
|
||||
done
|
||||
|
||||
project=$(
|
||||
echo "${projects[@]}" | tr ' ' '\n' | sort -u |
|
||||
fzf --layout=reverse --info=hidden --border=rounded --cycle
|
||||
)
|
||||
|
||||
tmux new-window -n $project -c "~/Projects/$project"
|
||||
~/.local/share/tmux/layouts/window-auto
|
@ -63,11 +63,13 @@ if -b '[ "`uname`" = "Darwin" ]' \
|
||||
'set -g default-command "reattach-to-user-namespace -l $SHELL"'
|
||||
|
||||
# Open a popup with running the default shell
|
||||
bind C-t display-popup -S fg=#54546D -b rounded -d '#{pane_current_path}' -E $SHELL
|
||||
bind T display-popup -S fg=#54546D -b rounded -d '#{pane_current_path}' -E $SHELL
|
||||
# Open a popup with session creator/switcher
|
||||
bind C-s display-popup -B -w 60 -h 10 -E '~/.config/tmux/session.sh'
|
||||
bind S display-popup -B -w 60 -h 10 -E '~/.config/tmux/session.sh'
|
||||
# Open a popup with project selector
|
||||
bind P display-popup -B -w 60 -h 10 -E '~/.config/tmux/project.sh'
|
||||
# Open a popup to pick an interpreter then launch it
|
||||
bind C-i display-popup -S fg=#54546D -b rounded -d '#{pane_current_path}' -E '$SHELL -i ~/.config/tmux/interpreter.sh'
|
||||
bind I display-popup -S fg=#54546D -b rounded -d '#{pane_current_path}' -E '$SHELL -i ~/.config/tmux/interpreter.sh'
|
||||
|
||||
# Restore old next/previous window bindings
|
||||
bind C-n next-window
|
||||
|
Loading…
x
Reference in New Issue
Block a user