quality of life tools role

main
Ricard Illa 2022-09-04 18:57:47 +02:00
parent 2a76d87f18
commit ba6a8708c2
No known key found for this signature in database
GPG Key ID: F69A672B72E54902
3 changed files with 122 additions and 0 deletions

View File

@ -26,6 +26,7 @@
- basic - basic
- users - users
- sshd - sshd
- quality_of_life
- tinyproxy - tinyproxy
vars: vars:
users: users:
@ -42,6 +43,7 @@
- basic - basic
- users - users
- sshd - sshd
- quality_of_life
vars: vars:
users: users:
- rilla - rilla
@ -56,6 +58,7 @@
- basic - basic
- users - users
- sshd - sshd
- quality_of_life
vars: vars:
users: users:
- rilla - rilla

View File

@ -0,0 +1,74 @@
# set -g default-terminal "screen-256color"
set -g default-terminal "tmux-256color"
#set -g default-terminal "alacritty"
set-option -sa terminal-overrides ',alacritty:RGB'
set-option -g prefix C-a
setw -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind -n M-m resize-pane -Z
bind-key -T copy-mode-vi 'C-h' select-pane -L
bind-key -T copy-mode-vi 'C-j' select-pane -D
bind-key -T copy-mode-vi 'C-k' select-pane -U
bind-key -T copy-mode-vi 'C-l' select-pane -R
bind 1 select-window -t 1
bind 2 select-window -t 2
bind 3 select-window -t 3
bind 4 select-window -t 4
bind 5 select-window -t 5
bind 6 select-window -t 6
bind 7 select-window -t 7
bind 8 select-window -t 8
bind 9 select-window -t 9
bind -n M-p select-window -p
bind -n M-n select-window -n
set -g base-index 1
setw -g pane-base-index 1
unbind p
bind-key -T copy-mode-vi y \
send-keys -X copy-pipe-and-cancel "xsel -i -p && xsel -o -p | xsel -i -b"
bind-key p run "xsel -o | tmux load-buffer - ; tmux paste-buffer"
bind c new-window -c "#{pane_current_path}"
bind = split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind r source-file ~/.tmux.conf
set-option -g automatic-rename on
set -g mouse on
set -sg escape-time 0
set -g status-left-length 32
set -g status-right-length 150
set -g status-fg '#ebdbb2'
set -g status-bg '#282828'
#set -g window-status-activity-attr bold
#set -g pane-border-fg '#7f8289'
#set -g pane-active-border-fg '#458588'
#set -g message-bg '#282828'
#set -g message-fg '#ebdbb2'
#set -g message-attr bold
setw -g window-status-separator ' '
set -g status-left '#[bg=#ebdbb2,fg=#282828,bold] #H #[bg=#282828] '
set -g window-status-format "#[fg=#ebdbb2,bg=#a89974] #I #[fg=#a89974,bg=#282828]#[fg=#a89974,bg=#282828] #W "
set -g window-status-current-format "#[fg=#fbf1c7,bg=#458588,noreverse,bold] #I #[fg=#458588,bg=#282828]#[fg=#fbf1c7,bg=#282828,noreverse,bold] #W "
#set -g status-right '#[bg=#282828,fg=#665c54]#[fg=#282828,bg=#665c54,bold] %a %b %d #[fg=#7c6f64,bg=#665c54]#[bg=#7c6f64,fg=#282828,bold] %I:%M #[bg=#7c6f64,fg=#c0c5ce,bold]#[fg=#282828,bg=#c0c5ce,bold] #H '
set -g status-right ''

View File

@ -0,0 +1,45 @@
---
- name: quality of life packages
apk:
name:
- htop
- mksh # I want something somewhat nicer thant busybox ash
- mosh
- neovim
- ripgrep
- tmux
when: ansible_distribution == "Alpine"
- name: install python3
apt:
name:
- htop
- mosh
- neovim
- ripgrep
- tmux
when: ansible_distribution in ["Debian", "Ubuntu"]
- name: install python3
openbsd_pkg:
name:
- htop
- mosh
- neovim
- ripgrep
# OpenBSD already ships with tmux
when: ansible_distribution == "OpenBSD"
- name: make tmux config directory
file:
path: /home/rilla/.config/tmux
state: directory
owner: rilla
group: rilla
- name: copy tmux config
copy:
src: tmux.conf
dest: /home/rilla/.config/tmux/tmux.conf
owner: rilla
group: rilla