mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
fish: formatted fish functions
This commit is contained in:
parent
6169d1e7ff
commit
667dce99d1
15 changed files with 176 additions and 176 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue