diff --git a/defaults/main.yml b/defaults/main.yml index aba2422..94e40d2 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -6,6 +6,7 @@ locales_gen: - en_US.UTF-8 - de_DE.UTF-8 locales_default: de_DE.UTF-8 +x11_keymap: de users: - vagrant sudoers: diff --git a/files/tmux.conf b/files/tmux.conf new file mode 100644 index 0000000..c12f268 --- /dev/null +++ b/files/tmux.conf @@ -0,0 +1,59 @@ +#new-session -n $HOST +unbind C-b + +set -g prefix C-y +bind-key y send-prefix # For nested tmux sessions + +set -g default-terminal "screen-256color" + +set -g history-limit 10000 +set -g update-environment "DBUS_SESSION_BUS_ADDRESS DISPLAY SSH_AUTH_SOCK XAUTHORITY" + +set -g base-index 1 +set-window-option -g pane-base-index 1 +#set -g mouse-select-pane on +#set -g mouse on + +############################################################################ +## Status Bar +############################################################################# +#set-option -g status-utf8 on +#set-option -g status-justify right +#set-option -g status-bg black # colour213 # pink +#set-option -g status-fg cyan +#set-option -g status-interval 5 +#set-option -g status-left-length 30 +#set-option -g status-left '#[fg=magenta]» #[fg=blue,bold]#T#[default]' +#set-option -g status-right '#[fg=red,bold][[ #(git branch) branch ]] #[fg=cyan]»» #[fg=blue,bold]###S #[fg=magenta]%R %m-%d#(acpi | cut -d ',' -f 2)#[default]' +#set-option -g visual-activity on + +# Titles (window number, program name, active (or not) +set-option -g set-titles on +set-option -g set-titles-string '#H:#S.#I.#P #W #T' + +set -s escape-time 0 + +setw -g automatic-rename +setw -g aggressive-resize on +setw -g mode-keys vi + +#bind - set default-path $PWD \; split-window -v\; set default-path ~/ +#bind | set default-path $PWD \; split-window -h\; set default-path ~/ +unbind % +#unbind : +bind - split-window -v +bind | split-window -h + +bind-key C-y last-window +bind-key k kill-window +bind-key K kill-session + +bind-key c new-window -c "#{pane_current_path}" + +# force a reload of the config file +unbind r +bind r source-file ~/.tmux.conf \; display-message "Config reloaded." + +unbind ^A +bind ^A select-pane -t :.+ + diff --git a/tasks/locales-debian.yml b/tasks/locales-debian.yml index a1d5be5..741fc40 100644 --- a/tasks/locales-debian.yml +++ b/tasks/locales-debian.yml @@ -15,11 +15,19 @@ locale_lang: "{{ locale_status.stdout | regex_search('LANG=([^\n]+)', '\\1') | first }}" when: not ansible_check_mode -- debug: - var: locale_lang +- name: Extract X11 keymap from current locale configuration + set_fact: + locale_x11_keymap: "{{ locale_status.stdout | regex_search('X11 Layout: ([^\n]+)', '\\1') | first }}" + when: not ansible_check_mode - name: Set default locale command: localectl set-locale LANG={{ locales_default }} when: - not ansible_check_mode - - locale_lang != locales_default \ No newline at end of file + - locale_lang != locales_default + +- name: Set default X11 keymap + command: localectl set-keymap {{ x11_keymap }} + when: + - not ansible_check_mode + - locale_x11_keymap != x11_keymap \ No newline at end of file diff --git a/tasks/users.yml b/tasks/users.yml index ff45af8..174f48f 100644 --- a/tasks/users.yml +++ b/tasks/users.yml @@ -35,6 +35,7 @@ state: present key: "{{ lookup('file', 'public_keys/id_{{ item }}.pub') }}" with_items: "{{ users }}" + ignore_errors: yes - name: 'Ensure that wheel group is existing' group: @@ -49,5 +50,10 @@ with_items: "{{ sudoers }}" - name: Copy tmux config - copy: src=files/tmux.conf dest=/home/{{ item }}/.tmux.conf mode=0644 + copy: + src: files/tmux.conf + dest: /home/{{ item }}/.tmux.conf + mode: 0644 + owner: "{{ item }}" + group: "{{ item }}" with_items: "{{ users }}" \ No newline at end of file