-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
configs: tmux: Add support for systemd-nspawn
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
- Loading branch information
1 parent
94f5f24
commit 7d13763
Showing
9 changed files
with
94 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# new window using c | ||
unbind c | ||
bind-key c new-window dbxe | ||
|
||
# run commands in distrobox using r | ||
bind-key r { | ||
command-prompt -p "run command (distrobox):" { | ||
new-window 'dbxe -- fish -c "begin; %1; end; or exec fish -l"' | ||
} | ||
} | ||
|
||
# open specific distrobox container using N | ||
bind-key N { | ||
command-prompt -p "distrobox container:" { | ||
new-window 'dbxe %1; or exec fish -l' | ||
} | ||
} | ||
bind-key E { | ||
command-prompt -p "new ephemeral distrobox container:" { | ||
new-window 'dbxeph %1' | ||
} | ||
} | ||
|
||
# split panes into distrobox container using | and - | ||
bind-key | split-window -h dbxe | ||
bind-key - split-window -v dbxe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# new window using c | ||
unbind c | ||
bind-key c new-window mchsh | ||
|
||
# open ephemeral container using E | ||
bind-key E new-window 'sd_nspawn -e' | ||
|
||
# run commands in systemd-nspawn using r | ||
bind-key r { | ||
command-prompt -p "run command (systemd-nspawn):" { | ||
new-window "sd_nspawn -r '%1'; or exec fish -l" | ||
} | ||
} | ||
|
||
# split panes into systemd-nspawn container using | and - | ||
bind-key | split-window -h mchsh | ||
bind-key - split-window -v mchsh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Bind prefix to Ctrl-Space instead of Ctrl-Space on the host | ||
unbind C-b | ||
set-option -g prefix C-Space | ||
bind-key C-Space send-prefix | ||
|
||
set-window-option -g window-status-current-style fg=blue,bg=default,bold | ||
|
||
source ~/.tmux.conf.common | ||
source ~/.tmux.conf.container |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
set-window-option -g window-status-current-style fg=red,bg=default,bold | ||
|
||
source ~/.tmux.conf.common | ||
source ~/.tmux.conf.container |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
session_name: qemu | ||
windows: | ||
- window_name: distrobox and cbl_vmm | ||
- window_name: nspawn and cbl_vmm | ||
focus: true | ||
layout: 61d8,269x53,0,0[269x41,0,0,57,269x11,0,42{134x11,0,42,58,134x11,135,42,59}] | ||
start_directory: '~' | ||
panes: | ||
- shell: dbxe | ||
- shell: mchsh | ||
shell_command: | ||
- cmd: ssh_vm | ||
enter: false | ||
- shell: dbxe | ||
sleep_before: 1 | ||
- shell: mchsh | ||
shell_command: | ||
- cmd: cbl_vmm run -c (math (nproc) / 2) -m (math (nproc) x 0.75) | ||
enter: false | ||
sleep_before: 1 | ||
focus: true | ||
- shell: dbxe | ||
- shell: mchsh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters