Compare commits

..

No commits in common. "34b297a1ec56282f0ce6f9d0f7e17eceaab4824e" and "2050f4f130f771e821b220fb9c06b58fb10da4b1" have entirely different histories.

4 changed files with 52 additions and 20 deletions

View File

@ -1,9 +0,0 @@
#!/usr/bin/env bash
session_name=$(tmux display-message -p '#S')
session_layout=~/.local/share/tmux/layouts/session-$session_name
if [ -f $session_layout ]; then
tmux source-file $session_layout
else
tmux rename-window home
fi

View File

@ -1,6 +0,0 @@
rename-window home
new-window -c ~/.config/local
rename-window local
select-window local:home
# vim: filetype=tmux

View File

@ -1,4 +1,49 @@
---
- name: tmux install package
become: '{{package_become}}'
package:
name: tmux
state: present
- name: tmux install macOS packages
when: ansible_os_family == "Darwin"
homebrew:
name:
- urlview
- reattach-to-user-namespace
- osx-cpu-temp
state: present
- name: tmux install Debian packages
when: ansible_os_family == "Debian"
become: true
apt:
name:
- xclip
- urlview
- sysstat
- jq
- gawk
state: present
- name: tmux install Fedora packages
when: ansible_distribution == "Fedora"
dnf:
name:
- xclip
- urlscan
- sysstat
- jq
state: present
- name: tmux install Arch packages
when: ansible_os_family == "Archlinux"
pacman:
name:
- xclip
- urlscan
state: present
- name: tmux create layouts directory
file:
state: directory
@ -14,11 +59,16 @@
dest: ~/.tmux.conf
- src: ~/.config/tmux/layouts/session-main
dest: ~/.local/share/tmux/layouts/session-main
- src: ~/.config/tmux/layouts/session-local
dest: ~/.local/share/tmux/layouts/session-local
- src: ~/.config/tmux/layouts/window-tall
dest: ~/.local/share/tmux/layouts/window-tall
- src: ~/.config/tmux/layouts/window-wide-left
dest: ~/.local/share/tmux/layouts/window-wide-left
- src: ~/.config/tmux/layouts/window-wide-right
dest: ~/.local/share/tmux/layouts/window-wide-right
# TODO: - name: Enable tmux system-info service
# command: system-info/install.sh
# TODO: WSL2 system-info
# when: '"WSL" in ansible_kernel'
# figure out best way to run daemon...

View File

@ -1,6 +1,3 @@
# Set global hooks to perform actions when events occur
set-hook -g session-created 'run ~/.config/tmux/hooks/session-create.sh'
# Set the tmux version to check for command support
run 'tmux setenv -g TMUX_VERSION $(tmux -V | cut -c 6-8)'