-
Notifications
You must be signed in to change notification settings - Fork 1
/
flattheme.conf
250 lines (202 loc) · 9.16 KB
/
flattheme.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
#!/bin/bash
#-----------------------------------------------------------------------
# Author: Aamnah
# Link: https://aamnah.com
# Github: https://github.com/aamnah/tmux-flat-theme
# Version: 0.1
# Description: tmux Flat Theme
# System: Armbian OS - Orange Pi Plus2 / Raspberry Pi 3
# Compatibility: macOS, Ubuntu, Debian, Armbian, Raspbian
#-----------------------------------------------------------------------
# There are examples in `/usr/share/doc/tmux/examples/`
# VARIABLES
#-----------------------------------------------------------------------
# Detect the platform we're running on (Linux / Mac (Darwin) / Other)
MACHINE=$(uname -s | tr '[:upper:]' '[:lower:]')
# COLORS
# has to be '#123456'
# NOT 'black' or '#000'
BLACK='#000000'
TURQUOISE='#1abc9c'
PETERRIVER='#3498db'
WETASPHALT='#34495e'
MIDNIGHTBLUE='#2c3e50'
ALIZARIN='#e74c3c'
CLOUDS='#ecf0f1'
SILVER='#bdc3c7'
CONCRETE='#95a5a6'
ASBESTOS='#7f8c8d'
AMETHYST='#9b59b6'
ORANGE='#f39c12'
# CUSTOM STYLES
# Set style and format values here, easier to edit later, saves me scrolling down down down
# FG first, BG second. Be consistent
WINDOW_FG="${CONCRETE}"
WINDOW_BG="${BLACK}"
WINDOW_ACTIVE_FG="${CLOUDS}"
WINDOW_ACTIVE_BG="${BLACK}"
PANE_BORDER_FG="${WETASPHALT}"
PANE_BORDER_BG="${BLACK}"
PANE_ACTIVE_BORDER_FG="${TURQUOISE}"
PANE_ACTIVE_BORDER_BG="${BLACK}"
STATUS_FG="${CLOUDS}"
STATUS_BG="${WETASPHALT}"
STATUS_LEFT_FG="${CLOUDS}"
STATUS_LEFT_BG="${ALIZARIN}"
STATUS_RIGHT_FG="${CLOUDS}"
STATUS_RIGHT_BG="${PETERRIVER}"
WINDOW_STATUS_FG="${CLOUDS}"
WINDOW_STATUS_BG="${MIDNIGHTBLUE}"
WINDOW_STATUS_CURRENT_FG="${CLOUDS}"
WINDOW_STATUS_CURRENT_BG="${TURQUOISE}"
# CUSTOM FORMATS
WINDOW_STATUS_SEPERATOR=" "
WINDOW_STATUS_FORMAT=" #F[#I] (#W) "
WINDOW_STATUS_CURRENT_FORMAT=" #F[#I] (#W) "
STATUS_RIGHT_FORMAT=" \"#H\" %h %e %l:%H %p "
STATUS_LEFT_FORMAT=" ${session_id} #S "
CLOCK_MODE_COLOUR="${TURQUOISE}"
CLOCK_MODE_STYLE="24"
# General Settings
#-----------------------------------------------------------------------
# Allow 256 Colors to be used in terminal
# (needed for many modern Vim colorschemes to work)
# screen-256color OR tmux-256color (works on tmux 2.6+)
# a benefit of using tmux-256color over screen-256color is that
# italics is properly rendered (screen doesn't support italics)
# setting this didn't work for me, ended up aliasing `tmux` to `tmux -2`
# -2 forces tmux to load in 256 color mode
# `tmux` works on Armbian but not on macOS and Ubuntu, setting back to `xterm-256color`
#set -g default-terminal "tmux"
set -g default-terminal "xterm-256color"
# auto-reload .tmux.conf with `<prefix> r`
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
# Turn on mouse support so that we can resize windows and panes, switch between them, and use mouse wheel to scroll
# Default is `off`
set -g mouse on
# Copying text in Mouse mode
#-----------------------------------------------------------------------
# https://unix.stackexchange.com/a/318285
# Needs `xclip` on Linux. sudo apt install -y xclip
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -T copy-mode-vi C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-vi C-WheelDownPane send-keys -X halfpage-down
bind -T copy-mode-emacs C-WheelUpPane send-keys -X halfpage-up
bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel [[ $MACHINE = darwin ]] && "pbcopy" || "xclip -selection c"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel [[ $MACHINE = darwin ]] && "pbcopy" || "xclip -in -selection clipboard"
# Highlight some text with mouse, but don't let go the mouse. Now while the text is still highlighted (in yellow) and mouse pressed, press return key. The highlighted text will disappear and will be copied to your clipboard. Now release the mouse.
# Panes
#-----------------------------------------------------------------------
# set inactive/active window styles
# style = comma-separated list of characteristics to be specified.
# Inactive Pane
set -g window-style "fg=${WINDOW_FG}, bg=${WINDOW_BG}"
# Active Pane
set -g window-active-style "fg=${WINDOW_ACTIVE_FG}, bg=${WINDOW_ACTIVE_BG}"
# Pane border colors
set -g pane-border-style "fg=${PANE_BORDER_FG}, bg=${PANE_BORDER_BG}"
# Active Pane border colors
set -g pane-active-border-style "fg=${PANE_ACTIVE_BORDER_FG}, bg=${PANE_ACTIVE_BORDER_BG}"
# !important - need to use double quotes "" for variable substitution
# Status Bar
#-----------------------------------------------------------------------
# The status bar that shows at the bottom.
# You can style left/right separately
# Status Bar
set -g status-style "fg=${STATUS_FG}, bg=${STATUS_BG}"
# Status Bar (Left)
set -g status-left-style "fg=${STATUS_LEFT_FG}, bg=${STATUS_LEFT_BG}"
# Status Bar (Right)
set -g status-right-style "fg=${STATUS_RIGHT_FG}, bg=${STATUS_RIGHT_BG}"
# Window title in Status bar
set -g window-status-style "fg=${WINDOW_STATUS_FG}, bg=${WINDOW_STATUS_BG}"
## Center align the Window names
#-----------------------------------------------------------------------
# status-justify [left | centre | right]
# Set the position of the window list component of the status line: left, centre or right justified.
set -g status-justify centre
## Current Window in Status Bar
#-----------------------------------------------------------------------
# Set status line style for the currently active window
# Highlights the current window in the status bar
set -g window-status-current-style "fg=${WINDOW_STATUS_CURRENT_FG},bold, bg=${WINDOW_STATUS_CURRENT_BG}"
## Seperator between Window titles in Status Bar
#-----------------------------------------------------------------------
# window-status-separator string
# Sets the separator drawn between windows in the status line. The default is a single space character.
# NOTE: this seperator shows _after_ the window title. It'll still show even if there is only one window. e.g. `[0:bash]* ---` (where --- is the seperator)
set -g window-status-separator ${WINDOW_STATUS_SEPERATOR}
## Listing format for Window names in Status Bar
#-----------------------------------------------------------------------
# window-status-format string
# Set the format in which the window is displayed in the status line window list. See the status-left option for details of special character sequences available. The default is ‘#I:#W#F’.
# All windows
set -g window-status-format ${WINDOW_STATUS_FORMAT}
# Current window
set -g window-status-current-format ${WINDOW_STATUS_CURRENT_FORMAT}
## Status Bar (Right) Format
#-----------------------------------------------------------------------
# status-right string
# Display string to the right of the status line. By default, the current pane title in double quotes, the date and the time are shown. As with status-left, string will be passed to strftime(3) and character pairs are replaced.
# Default is `\"#H\" %R %d-%h-%y`
set -g status-right ${STATUS_RIGHT_FORMAT}
# Default is `#S` (name of current Sesion)
set -g status-left ${STATUS_LEFT_FORMAT}
# Clock
#-----------------------------------------------------------------------
set -g clock-mode-colour ${CLOCK_MODE_COLOUR}
set -g clock-mode-style ${CLOCK_MODE_STYLE}
########################################################################
# NOTES
########################################################################
# FORMAT
#-----------------------------------------------------------------------
#H Hostname of local host
#h Hostname of local host (no domain name)
#D Unique pane ID
#P Index of pane
#T Title of pane
#S Name of session
#F Window flags
#I Index of window
#W Name of window
# STYLES
#-----------------------------------------------------------------------
# Possible color values:
# Hexadecimal ('#ffffff', all 6 digits, no #FFF shorthand, needs to be in commas)
# Terminal colors (black, red, green, yellow, blue, magenta, cyan, white)
# 256 colour set: colour0 till colour256
# Possible Attribute values:
# none, bright, bold, dim, underscore, blink, reverse, hidden, italics, strikethrough
# to disable the attribute, prefix with `no`. e.g. noreverse, noitalics etc.
# These may be ‘bg=colour’ to set the background colour,
# ‘fg=colour’ to set the foreground colour
# Examples are:
# fg=yellow,bold,underscore,blink
# bg=black,fg=default,noreverse
# Possible Styles:
#pane-border-style
#pane-active-border-style
#window-style
#window-active-style
#window-status-style
#window-status-current-style
#window-status-activty-style
#window-satus-last-style
#status-style
#status-left-style
#status-right-style
#message-style
#mode-style
# REFERENCES
#-----------------------------------------------------------------------
# Tmux Manual - http://man7.org/linux/man-pages/man1/tmux.1.html
# Time Variables - https://man.openbsd.org/strftime.3
# Flat UI Colors - https://www.materialui.co/flatuicolors