-
Notifications
You must be signed in to change notification settings - Fork 0
/
morphx.tmux
120 lines (99 loc) · 3.61 KB
/
morphx.tmux
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
#!/usr/bin/env bash
#===============================================================================
# Author: Strex
# Email: [email protected]
# Created: 12/18/21
#===============================================================================
# $1: option
# $2: default value
tmux_get() {
local value="$(tmux show -gqv "$1")"
[ -n "$value" ] && echo "$value" || echo "$2"
}
# $1: option
# $2: value
tmux_set() {
tmux set-option -gq "$1" "$2"
}
# Options
right_arrow_icon=$(tmux_get '@tmux_power_right_arrow_icon' '')
left_arrow_icon=$(tmux_get '@tmux_power_left_arrow_icon' '')
upload_speed_icon=$(tmux_get '@tmux_power_upload_speed_icon' '')
download_speed_icon=$(tmux_get '@tmux_power_download_speed_icon' '')
session_icon="$(tmux_get '@tmux_power_session_icon' '')"
user_icon="$(tmux_get '@tmux_power_user_icon' '')"
time_icon="$(tmux_get '@tmux_power_time_icon' '')"
date_icon="$(tmux_get '@tmux_power_date_icon' '')"
show_upload_speed="$(tmux_get @tmux_power_show_upload_speed false)"
show_download_speed="$(tmux_get @tmux_power_show_download_speed false)"
show_web_reachable="$(tmux_get @tmux_power_show_web_reachable false)"
prefix_highlight_pos=$(tmux_get @tmux_power_prefix_highlight_pos)
time_format=$(tmux_get @tmux_power_time_format '%T')
date_format=$(tmux_get @tmux_power_date_format '%F')
TC='#E25140'
G00=#ffffff
G01=#080808 #232
G02=#121212 #233
G03=#1c1c1c
G04=#262626 #235
G05=#303030 #236
G06=#3a3a3a #237
G07=#444444 #238
G08=#4e4e4e #239
G09=#585858 #240
G10=#94ADCB #241
G11=#6c6c6c #242
G12=#767676 #243
FG="$G12"
BG="$G02"
# Status options
tmux_set status-interval 1
tmux_set status on
# Basic status bar colors
tmux_set status-fg "$FG"
tmux_set status-bg "$BG"
tmux_set status-attr none
# tmux-prefix-highlight
tmux_set @prefix_highlight_fg "$BG"
tmux_set @prefix_highlight_bg "$FG"
tmux_set @prefix_highlight_show_copy_mode 'on'
tmux_set @prefix_highlight_copy_mode_attr "fg=$G00,bg=$BG"
tmux_set @prefix_highlight_output_prefix "#[fg=$TC]#[bg=$BG]$left_arrow_icon#[bg=$TC]#[fg=$BG]"
tmux_set @prefix_highlight_output_suffix "#[fg=$TC]#[bg=$BG]$right_arrow_icon"
#
# Left side of status bar
#tmux_set status-left-bg "$G02"
#tmux_set status-left-fg "$G12"
tmux_set status-left-length 150
tmux_set status-left "#[fg=$G00,bg=$TC] $user_icon #U@#{hostname_short} #[fg=$TC,bg=$G06,nobold]$right_arrow_icon#[fg=$G00,bg=$G06] $session_icon #I #[fg=$G06,bg=$BG]$right_arrow_icon #{prefix_highlight}"
# Right side of status bar
#tmux_set status-right-bg "$G02"
#tmux_set status-right-fg "$G12"
tmux_set status-right-length 150
tmux_set status-right "#[fg=$G06,bg=$BG]$left_arrow_icon#[fg=$G00,bg=$G06] $time_icon $time_format #[fg=$TC,bg=$G06]$left_arrow_icon#[fg=$G00,bg=$TC] $date_icon $date_format "
# Window status
tmux_set window-status-format " #I: #W "
tmux_set window-status-current-format "#[fg=$TC,bg=$BG]$left_arrow_icon#[fg=$TC,bold] #W #[fg=$TC,bg=$BG,nobold]$right_arrow_icon"
# Window separator
tmux_set window-status-separator ""
# Window status alignment
tmux_set status-justify centre
tmux_set status-position top
# Current window status
tmux_set window-status-current-statys "fg=$TC,bg=$BG"
# Pane border
tmux_set pane-border-style "fg=$G04,bg=default"
# Active pane border
tmux_set pane-active-border-style "fg=$TC,bg=$BG"
# Pane number indicator
tmux_set display-panes-colour "$G04"
tmux_set display-panes-active-colour "$TC"
# Clock mode
tmux_set clock-mode-colour "$TC"
tmux_set clock-mode-style 24
# Message
tmux_set message-style "fg=$TC,bg=$BG"
# Command message
tmux_set message-command-style "fg=$TC,bg=$BG"
# Copy mode highlight
tmux_set mode-style "bg=$TC,fg=$FG"