diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..91e86a5 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "files/motd"] + path = files/motd + url = gitea@git.hoekveen.net:mark/motd.git diff --git a/files/motd b/files/motd new file mode 160000 index 0000000..9614418 --- /dev/null +++ b/files/motd @@ -0,0 +1 @@ +Subproject commit 96144180794da420da7b1b995762914a3523dc2b diff --git a/playbook.yml b/playbook.yml index b724ace..7d32910 100644 --- a/playbook.yml +++ b/playbook.yml @@ -61,3 +61,8 @@ become: true tasks: - import_tasks: tasks/nocturnal_smb.yml +- name: Install tmux + hosts: all + become: true + tasks: + - import_tasks: tasks/tmux.yml diff --git a/tasks/tmux.yml b/tasks/tmux.yml new file mode 100644 index 0000000..53e5e2c --- /dev/null +++ b/tasks/tmux.yml @@ -0,0 +1,17 @@ +- name: Install tmux + pacman: + name: "tmux" + state: present + when: + - ansible_os_family == "Archlinux" +- name: Install tmux + apt: + name: "tmux" + state: present + when: + - ansible_os_family == "Debian" +- name: Copy config file + copy: + src: tmux/tmux.conf + dest: /etc/tmux.conf + mode: "0644" diff --git a/tasks/tmux/tmux.conf b/tasks/tmux/tmux.conf new file mode 100644 index 0000000..b500ac3 --- /dev/null +++ b/tasks/tmux/tmux.conf @@ -0,0 +1,36 @@ +unbind C-b +set-option -g prefix C-space +bind-key C-space send-prefix + +setw -g mode-keys vi +set-window-option -g xterm-keys on +set-window-option -g mode-keys vi +set-window-option -g monitor-activity on + +setw -g automatic-rename +set -g mouse on +set -g history-limit 30000 + +unbind j +unbind '"' # unbind horizontal split +unbind % # unbind vertical split + +bind-key b split-window -v # split pane horizontally +bind-key v split-window -h # split pane vertically +bind-key - split-window -v +bind-key / split-window -h + +bind-key Space list-panes +bind-key Enter break-pane +bind C-j previous-window +bind C-k next-window + +bind-key h select-pane -L +bind-key j select-pane -D +bind-key k select-pane -U +bind-key l select-pane -R + +bind-key C-h resize-pane -L +bind-key C-j resize-pane -D +bind-key C-k resize-pane -U +bind-key C-l resize-pane -R