Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions devtools/setup-dev/ansible/generate_packages_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,8 @@ func TestHerdrSkippedOnTermux(t *testing.T) {
"import_playbook: gather-facts.yml",
"import_playbook: herdr.yml\n when: ansible_facts['env']['TERMUX_VERSION'] is not defined",
"meta: end_play\n when: ansible_facts['env']['TERMUX_VERSION'] is defined",
"prefix = \"ctrl+]\"",
"close_pane = \"\"",
} {
if !strings.Contains(setup, want) {
t.Errorf("setup-herdr.yml missing %q", want)
Expand Down
10 changes: 7 additions & 3 deletions devtools/setup-dev/ansible/setup-herdr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
state: directory
mode: '0755'

- name: Ensure herdr uses ctrl+] as the prefix key
- name: Ensure herdr uses ctrl+] and leaves close_pane unbound
ansible.builtin.blockinfile:
path: "{{ herdr_config_dir }}/config.toml"
append_newline: true
Expand All @@ -51,8 +51,12 @@
# sequence.
# Action bindings are symbolic ("prefix+c", "prefix+v", ...), so they
# follow this key automatically and need no changes.
# prefix+x (close_pane) sits next to prefix+c (new tab). An empty
# binding drops that shortcut. The mouse menu and `herdr pane close`
# still close a pane.
[keys]
prefix = "ctrl+]"
close_pane = ""
register: herdr_prefix_config

# blockinfile appends the managed block verbatim, so a hand-written [keys]
Expand All @@ -66,8 +70,8 @@
environment:
PATH: "{{ ansible_facts['env']['HOME'] }}/.local/bin:{{ ansible_facts['env']['PATH'] }}"

# Applies the new prefix to an already-running session. A missing server is
# the normal case on a fresh machine, so failures here are not fatal.
# Applies the keybinding change to an already-running session. A missing
# server is the normal case on a fresh machine, so failures here are not fatal.
- name: Reload the configuration in a running herdr server
ansible.builtin.command: herdr server reload-config
register: herdr_reload
Expand Down
Loading