Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PoC: add support for all known pane modes #39

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion prefix_highlight.tmux
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,18 @@ main() {
local -r prefix_highlight="$(format_style "fg=$fg_color,bg=$bg_color")"
local -r prefix_mode="$prefix_highlight$output_prefix$prefix_prompt$output_suffix"

# add support for all (known) pane modes
local -r pane_mode="#{s/-mode//:#{pane_mode}}"
local -r clock_mode_sub="#{#{?#{==:$pane_mode,clock},clck,#{pane_mode} is not yet supported; please report}}"
local -r options_mode_sub="#{#{?#{==:$pane_mode,options},Opts,$clock_mode_sub}}"
local -r client_mode_sub="#{#{?#{==:$pane_mode,client},Clnt,$options_mode_sub}}"
local -r buffer_mode_sub="#{#{?#{==:$pane_mode,buffer},Bufr,$client_mode_sub}}"
local -r tree_mode_sub="#{#{?#{==:$pane_mode,tree},Tree,$buffer_mode_sub}}"
local -r view_mode_sub="#{#{?#{==:$pane_mode,view},View,$tree_mode_sub}}"
local -r copy_mode_sub="#{#{?#{==:$pane_mode,copy},$copy_prompt,$view_mode_sub}}"

local -r copy_highlight="$(format_style "${copy_attr:+default,$copy_attr}")"
local -r copy_mode="$copy_highlight$output_prefix$copy_prompt$output_suffix"
local -r copy_mode="$copy_highlight$output_prefix$copy_mode_sub$output_suffix"

local -r sync_highlight="$(format_style "${sync_attr:+default,$sync_attr}")"
local -r sync_mode="$sync_highlight$output_prefix$sync_prompt$output_suffix"
Expand Down