mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nix: expose shared home manager configuration via homeModules
This commit is contained in:
parent
5155bd69e8
commit
5b95c43559
47 changed files with 45 additions and 29 deletions
18
nix/homeModules/fish/functions/tmux_home.fish
Normal file
18
nix/homeModules/fish/functions/tmux_home.fish
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# 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
|
||||
|
||||
if [ -z $TMUX ]
|
||||
tmux attach-session -t "home"
|
||||
else
|
||||
tmux switch-client -t "home"
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue