Skip to content

Commit

Permalink
Merge branch 'master' of git.sos.ethz.ch:ansibleroles/tmux
Browse files Browse the repository at this point in the history
  • Loading branch information
uubk committed Feb 17, 2019
2 parents db8c3d0 + 8e0a5f5 commit 98fff4b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
---
- set_fact:
powerline_packages:
packages:
- tmux
- powerline
when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu"

- set_fact:
powerline_packages:
packages:
- tmux
- powerline
- tmux-powerline
when: ansible_distribution == "Fedora"

- name: install packages
become: True
package:
name: "{{ item }}"
name: "{{ packages }}"
state: present
with_items:
- tmux
- "{{ powerline_packages }}"

- name: detect tmux version
shell: tmux -V | cut -d ' ' -f2
Expand Down
4 changes: 2 additions & 2 deletions templates/tmux.conf.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Managed by ansible

{% if tmux_version.stdout is version_compare('2.1', '>=') %}
{% if tmux_version.stdout is version('2.1', '>=') %}
# tmux {{ tmux_version.stdout }} is >= 2.1 -> new mouse handling
set -g mouse on

Expand Down Expand Up @@ -52,7 +52,7 @@ set -g base-index 1
setw -g pane-base-index 1

# Activate Powerline. We assume that the most recent version supported in Debian's powerline package is the most recent version of tmux shipped in Debian. Powerline has it's own config...
{% if ansible_distribution == "Debian" %}
{% if ansible_distribution == "Debian" or ansible_distribution == "Ubuntu" %}
source '/usr/share/powerline/bindings/tmux/powerline.conf'
{% elif ansible_distribution == "Fedora" %}
source '/usr/share/tmux/powerline.conf'
Expand Down

0 comments on commit 98fff4b

Please sign in to comment.