fish: formatted fish functions

This commit is contained in:
Primrose 2024-07-18 01:11:23 +02:00
parent 6169d1e7ff
commit 667dce99d1
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
15 changed files with 176 additions and 176 deletions

View file

@ -1,20 +1,20 @@
function tmux_home
# echo "---home---" >> /tmp/TMUX_DEBUG
# echo (cat /tmp/TMUX_LAST) >> /tmp/TMUX_DEBUG
echo (tmux display-message -p '#S') > /tmp/TMUX_LAST
# echo (cat /tmp/TMUX_LAST) >> /tmp/TMUX_DEBUG
# echo "---home---" >> /tmp/TMUX_DEBUG
# echo (cat /tmp/TMUX_LAST) >> /tmp/TMUX_DEBUG
echo (tmux display-message -p '#S') >/tmp/TMUX_LAST
# echo (cat /tmp/TMUX_LAST) >> /tmp/TMUX_DEBUG
# create session if doesn't exist
if ! tmux has-session -t="home" 2> /dev/null
tmux \
new-session -ds "home" \; \
new-window -t "home" \; \
select-window -t "home":1
end
# create session if doesn't exist
if ! tmux has-session -t="home" 2>/dev/null
tmux \
new-session -ds home \; \
new-window -t home \; \
select-window -t "home":1
end
if [ -z $TMUX ]
tmux attach-session -t "home"
else
tmux switch-client -t "home"
end
if [ -z $TMUX ]
tmux attach-session -t home
else
tmux switch-client -t home
end
end