mirror of
https://github.com/jimeh/tmux-themepack.git
synced 2026-02-19 03:16:38 +00:00
feat: Add pane sync and prefix key status indicators
The indicators used can be customized: - For the prefix key indicator, set `@themepack-prefix-key-on-format` and `@themepack-prefix-key-off-format` options. The off format must be the same length as the on format to avoid weird behavior. - For the pane sync indicator, set `@themepack-pane-sync-on-format` and `@themepack-pane-sync-off-format` options. The off format must be the same length as the on format to avoid weird behavior.
This commit is contained in:
@@ -25,3 +25,11 @@ set -gqF @themepack-status-right-area-middle-format "#{@themepack-status-right-a
|
||||
set -gqF @themepack-status-right-area-right-format "#{@themepack-status-right-area-right-prefix}#{@themepack-status-right-area-right-format}#{@themepack-status-right-area-right-suffix}"
|
||||
set -gqF @themepack-window-status-current-format "#{@themepack-window-status-current-prefix}#{@themepack-window-status-current-format}#{@themepack-window-status-current-suffix}"
|
||||
set -gqF @themepack-window-status-format "#{@themepack-window-status-prefix}#{@themepack-window-status-format}#{@themepack-window-status-suffix}"
|
||||
|
||||
# Prefix key status
|
||||
set -goq @themepack-prefix-key-status "#{?client_prefix,#{@themepack-prefix-key-on},#{@themepack-prefix-key-off}}"
|
||||
set -gqF @theme-status-left-suffix "#{@theme-status-left-suffix}#{@themepack-prefix-key-status}"
|
||||
|
||||
# Pane Sync status
|
||||
set -goq @themepack-pane-sync-status "#{?pane_synchronized,#{@themepack-pane-sync-on},#{@themepack-pane-sync-off}}"
|
||||
set -gqF @theme-status-right-prefix "#{@themepack-pane-sync-status}#{@theme-status-right-prefix}"
|
||||
@@ -2,7 +2,7 @@
|
||||
# Basic theme
|
||||
#
|
||||
|
||||
# Themepack format options
|
||||
# Themepack options
|
||||
set -goq @themepack-status-left-area-left-format "#S"
|
||||
set -goq @themepack-status-left-area-middle-format "#I"
|
||||
set -goq @themepack-status-left-area-right-format "#P"
|
||||
@@ -12,7 +12,17 @@ set -goq @themepack-status-right-area-right-format "%d-%b-%y"
|
||||
set -goq @themepack-window-status-current-format "#I:#W#F"
|
||||
set -goq @themepack-window-status-format "#I:#W#F"
|
||||
|
||||
#= include "_themepack-options-affixes"
|
||||
set -goqF @themepack-prefix-key-on-format "#{s/C-/\^/:prefix}"
|
||||
set -goq @themepack-prefix-key-off-format " "
|
||||
set -goq @themepack-pane-sync-on-format "SYNC"
|
||||
set -goq @themepack-pane-sync-off-format " "
|
||||
|
||||
set -goqF @themepack-prefix-key-on " #[fg=black]#[bg=cyan] #{@themepack-prefix-key-on-format} #[default] "
|
||||
set -goqF @themepack-prefix-key-off " #{@themepack-prefix-key-off-format} "
|
||||
set -goqF @themepack-pane-sync-on " #[fg=black]#[bg=yellow] #{@themepack-pane-sync-on-format} #[default] "
|
||||
set -goqF @themepack-pane-sync-off " #{@themepack-pane-sync-off-format} "
|
||||
|
||||
#= include "_themepack-setup"
|
||||
|
||||
# Theme options
|
||||
set -goq @theme-clock-mode-colour red
|
||||
|
||||
@@ -17,14 +17,14 @@ set -goqF @theme-status-bg "#{@powerline-status-bg}"
|
||||
set -goqF @theme-status-fg "#{@powerline-status-fg}"
|
||||
set -goq @theme-status-interval 1
|
||||
set -goq @theme-status-justify centre
|
||||
set -goqF @theme-status-left "#[fg=#{@powerline-status-left-area-left-fg},bg=#{@powerline-status-left-area-left-bg},bold] #{@themepack-status-left-area-left-format} #[fg=#{@powerline-status-left-area-left-bg},bg=#{@powerline-status-left-area-middle-bg},nobold]#[fg=#{@powerline-status-left-area-middle-fg},bg=#{@powerline-status-left-area-middle-bg}] #{@themepack-status-left-area-middle-format} #[fg=#{@powerline-status-left-area-middle-bg},bg=#{@powerline-status-left-area-right-bg}]#[fg=#{@powerline-status-left-area-right-fg},bg=#{@powerline-status-left-area-right-bg}] #{@themepack-status-left-area-right-format} #[fg=#{@powerline-status-left-area-right-bg},bg=#{@theme-status-bg},nobold]"
|
||||
set -goqF @theme-status-left "#[fg=#{@powerline-status-left-area-left-fg},bg=#{@powerline-status-left-area-left-bg},bold] #{@themepack-status-left-area-left-format} #[fg=#{@powerline-status-left-area-left-bg},bg=#{@powerline-status-left-area-middle-bg},nobold]#[fg=#{@powerline-status-left-area-middle-fg},bg=#{@powerline-status-left-area-middle-bg}] #{@themepack-status-left-area-middle-format} #[fg=#{@powerline-status-left-area-middle-bg},bg=#{@powerline-status-left-area-right-bg}]#[fg=#{@powerline-status-left-area-right-fg},bg=#{@powerline-status-left-area-right-bg}] #{@themepack-status-left-area-right-format} "
|
||||
set -goqF @theme-status-left-bg "#{@powerline-status-left-bg}"
|
||||
set -goqF @theme-status-left-fg "#{@powerline-status-left-fg}"
|
||||
set -goq @theme-status-left-length 40
|
||||
set -goqF @theme-status-right "#[fg=#{@powerline-status-right-area-left-bg},bg=#{@theme-status-bg}]#[fg=#{@powerline-status-right-area-left-fg},bg=#{@powerline-status-right-area-left-bg}] #{@themepack-status-right-area-left-format} #[fg=#{@powerline-status-right-area-middle-bg},bg=#{@powerline-status-right-area-left-bg}]#[fg=#{@powerline-status-right-area-middle-fg},bg=#{@powerline-status-right-area-middle-bg}] #{@themepack-status-right-area-middle-format} #[fg=#{@powerline-status-right-area-right-bg},bg=#{@powerline-status-right-area-middle-bg}]#[fg=#{@powerline-status-right-area-right-fg},bg=#{@powerline-status-right-area-right-bg},bold] #{@themepack-status-right-area-right-format} "
|
||||
set -goqF @theme-status-right "#[fg=#{@powerline-status-right-area-left-fg},bg=#{@powerline-status-right-area-left-bg}] #{@themepack-status-right-area-left-format} #[fg=#{@powerline-status-right-area-middle-bg},bg=#{@powerline-status-right-area-left-bg}]#[fg=#{@powerline-status-right-area-middle-fg},bg=#{@powerline-status-right-area-middle-bg}] #{@themepack-status-right-area-middle-format} #[fg=#{@powerline-status-right-area-right-bg},bg=#{@powerline-status-right-area-middle-bg}]#[fg=#{@powerline-status-right-area-right-fg},bg=#{@powerline-status-right-area-right-bg},bold] #{@themepack-status-right-area-right-format} "
|
||||
set -goqF @theme-status-right-bg "#{@powerline-status-right-bg}"
|
||||
set -goqF @theme-status-right-fg "#{@powerline-status-right-fg}"
|
||||
set -goq @theme-status-right-length 150
|
||||
set -goqF @theme-window-status-activity-bg "#{@theme-status-bg}"
|
||||
set -goqF @theme-window-status-activity-bg "#{@powerline-status-bg}"
|
||||
set -goqF @theme-window-status-activity-fg "#{@powerline-color-activity-1}"
|
||||
set -goq @theme-window-status-separator ""
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Themepack format options
|
||||
# Themepack options
|
||||
set -goq @themepack-status-left-area-left-format "#S"
|
||||
set -goq @themepack-status-left-area-middle-format "#(whoami)"
|
||||
set -goq @themepack-status-left-area-right-format "#I:#P"
|
||||
@@ -8,4 +8,14 @@ set -goq @themepack-status-right-area-right-format "#H"
|
||||
set -goq @themepack-window-status-current-format "#I:#W#F"
|
||||
set -goq @themepack-window-status-format "#I:#W#F"
|
||||
|
||||
#= include "_themepack-options-affixes"
|
||||
set -goq @themepack-prefix-key-on-format "."
|
||||
set -goq @themepack-prefix-key-off-format " "
|
||||
set -goq @themepack-pane-sync-on-format "SYNC"
|
||||
set -goq @themepack-pane-sync-off-format " "
|
||||
|
||||
set -goqF @themepack-prefix-key-on "#[fg=#{@powerline-status-left-area-right-bg}]#[bg=#{@powerline-color-black-1}]#[fg=#{@powerline-color-main-2}]#[bg=#{@powerline-color-black-1}] #{@themepack-prefix-key-on-format} #[fg=#{@powerline-status-bg}]#[bg=#{@powerline-color-black-1}]"
|
||||
set -goqF @themepack-prefix-key-off "#[fg=#{@powerline-status-left-area-right-bg}]#[bg=#{@powerline-status-bg}] #{@themepack-prefix-key-off-format} "
|
||||
set -goqF @themepack-pane-sync-on " #[fg=#{@powerline-color-main-2}]#[bg=#{@powerline-status-bg}]#[fg=#{@powerline-color-black-1}]#[bg=#{@powerline-color-main-2}] #{@themepack-pane-sync-on-format} #[fg=#{@powerline-status-right-area-left-bg}]#[bg=#{@powerline-color-main-2}]"
|
||||
set -goqF @themepack-pane-sync-off " #{@themepack-pane-sync-off-format} #[fg=#{@powerline-status-right-area-left-bg}]#[bg=#{@powerline-status-bg}]"
|
||||
|
||||
#= include "_themepack-setup"
|
||||
|
||||
@@ -5,6 +5,8 @@ set -goqF @powerline-color-activity-1 "#{@powerline-color-main-3}"
|
||||
|
||||
#= include "powerline/_powerline-options"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
#= include "powerline/_theme-options"
|
||||
#= include "powerline/_theme-options-block"
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Blue Block - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/blue"
|
||||
#= include "powerline/block/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Cyan Block - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/cyan"
|
||||
#= include "powerline/block/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Gray Block - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/gray"
|
||||
#= include "powerline/block/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Green Block - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/green"
|
||||
#= include "powerline/block/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Magenta Block - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/magenta"
|
||||
#= include "powerline/block/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Orange Block - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/orange"
|
||||
#= include "powerline/block/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Purple Block - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/purple"
|
||||
#= include "powerline/block/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Red Block - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/red"
|
||||
#= include "powerline/block/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Yellow Block - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/yellow"
|
||||
#= include "powerline/block/_base"
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
#= include "powerline/_powerline-options"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
#= include "powerline/_theme-options"
|
||||
#= include "powerline/_theme-options-default"
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Blue - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/blue"
|
||||
#= include "powerline/default/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Cyan - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/cyan"
|
||||
#= include "powerline/default/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Gray - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/gray"
|
||||
#= include "powerline/default/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Green - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/green"
|
||||
#= include "powerline/default/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Magenta - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/magenta"
|
||||
#= include "powerline/default/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Orange - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/orange"
|
||||
#= include "powerline/default/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Purple - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/purple"
|
||||
#= include "powerline/default/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Red - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/red"
|
||||
#= include "powerline/default/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Yellow - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/yellow"
|
||||
#= include "powerline/default/_base"
|
||||
|
||||
@@ -5,6 +5,8 @@ set -goqF @powerline-status-right-area-right-bg "#{@powerline-color-main-1}"
|
||||
|
||||
#= include "powerline/_powerline-options"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
#= include "powerline/_theme-options"
|
||||
#= include "powerline/_theme-options-default"
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Double Blue - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/blue"
|
||||
#= include "powerline/double/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Double Cyan - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/cyan"
|
||||
#= include "powerline/double/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Double Green - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/green"
|
||||
#= include "powerline/double/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Double Magenta - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/magenta"
|
||||
#= include "powerline/double/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Double Orange - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/orange"
|
||||
#= include "powerline/double/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Double Purple - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/purple"
|
||||
#= include "powerline/double/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Double Red - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/red"
|
||||
#= include "powerline/double/_base"
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
# Powerline Double Yellow - Tmux Themepack
|
||||
#= include "powerline/_info"
|
||||
|
||||
#= include "powerline/_themepack-options"
|
||||
|
||||
# Powerline color options
|
||||
#= include "powerline/_colors/yellow"
|
||||
#= include "powerline/double/_base"
|
||||
|
||||
@@ -30,16 +30,20 @@ func TestBasicTheme(t *testing.T) {
|
||||
})
|
||||
|
||||
tmuxHasOptions(t, theme, tmux.GlobalSession, tmux.Options{
|
||||
"@themepack-prefix-key-on": " #[fg=black]#[bg=cyan] ^b #[default] ",
|
||||
"@themepack-prefix-key-off": " ",
|
||||
"@themepack-pane-sync-on": " #[fg=black]#[bg=yellow] SYNC #[default] ",
|
||||
"@themepack-pane-sync-off": " ",
|
||||
"display-panes-active-colour": "default",
|
||||
"display-panes-colour": "default",
|
||||
"message-command-style": "default",
|
||||
"message-style": "default",
|
||||
"status-interval": "1",
|
||||
"status-justify": "centre",
|
||||
"status-left": "#S #[fg=white]» #[fg=yellow]#I #[fg=cyan]#P",
|
||||
"status-left": "#S #[fg=white]» #[fg=yellow]#I #[fg=cyan]#P" + powerlinePrefixKeyStatus,
|
||||
"status-left-length": "40",
|
||||
"status-left-style": "fg=green,bg=black",
|
||||
"status-right": "#H #[fg=white]« #[fg=yellow]%H:%M:%S #[fg=green]%d-%b-%y",
|
||||
"status-right": powerlinePaneSyncStatus + "#H #[fg=white]« #[fg=yellow]%H:%M:%S #[fg=green]%d-%b-%y",
|
||||
"status-right-length": "40",
|
||||
"status-right-style": "fg=cyan,bg=black",
|
||||
"status-style": "fg=cyan,bg=black",
|
||||
@@ -91,8 +95,8 @@ func TestBasicThemeOverrides(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
|
||||
assertHasPrefix(t, opts["status-left"], "SLP=")
|
||||
assertHasSuffix(t, opts["status-left"], "=SLS")
|
||||
assertHasPrefix(t, opts["status-right"], "SRP=")
|
||||
assertHasSuffix(t, opts["status-left"], "=SLS"+powerlinePrefixKeyStatus)
|
||||
assertHasPrefix(t, opts["status-right"], powerlinePaneSyncStatus+"SRP=")
|
||||
assertHasSuffix(t, opts["status-right"], "=SRS")
|
||||
|
||||
opts, err = tm.GetOptions(tmux.GlobalWindow)
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package test
|
||||
|
||||
var powerlinePrefixKeyStatus = `#{?client_prefix,#{@themepack-prefix-key-on},#{@themepack-prefix-key-off}}`
|
||||
var powerlinePaneSyncStatus = `#{?pane_synchronized,#{@themepack-pane-sync-on},#{@themepack-pane-sync-off}}`
|
||||
|
||||
var powerlineColors = map[string]struct {
|
||||
filename string
|
||||
color1 string
|
||||
@@ -47,16 +47,20 @@ func TestPowerlineBlockThemes(t *testing.T) {
|
||||
})
|
||||
|
||||
tmuxHasOptions(t, filename, tmux.GlobalSession, tmux.Options{
|
||||
"@themepack-pane-sync-off": " #[fg=colour235]#[bg=colour233]",
|
||||
"@themepack-pane-sync-on": " #[fg=" + c.color2 + "]#[bg=colour233]#[fg=black]#[bg=" + c.color2 + "] SYNC #[fg=colour235]#[bg=" + c.color2 + "]",
|
||||
"@themepack-prefix-key-off": "#[fg=colour235]#[bg=colour233] ",
|
||||
"@themepack-prefix-key-on": "#[fg=colour235]#[bg=black]#[fg=" + c.color2 + "]#[bg=black] . #[fg=colour233]#[bg=black]",
|
||||
"display-panes-active-colour": "colour245",
|
||||
"display-panes-colour": "colour233",
|
||||
"message-command-style": "fg=black,bg=" + c.color1,
|
||||
"message-style": "fg=black,bg=" + c.color1,
|
||||
"status-interval": "1",
|
||||
"status-justify": "centre",
|
||||
"status-left": "#[fg=colour233,bg=" + c.color1 + ",bold] #S #[fg=" + c.color1 + ",bg=colour240,nobold]\ue0b0#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]\ue0b0#[fg=colour240,bg=colour235] #I:#P #[fg=colour235,bg=colour233,nobold]\ue0b0",
|
||||
"status-left": "#[fg=colour233,bg=" + c.color1 + ",bold] #S #[fg=" + c.color1 + ",bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #I:#P " + powerlinePrefixKeyStatus,
|
||||
"status-left-length": "40",
|
||||
"status-left-style": "fg=colour243,bg=colour233",
|
||||
"status-right": "#[fg=colour235,bg=colour233]\ue0b2#[fg=colour240,bg=colour235] %H:%M:%S #[fg=colour240,bg=colour235]\ue0b2#[fg=colour233,bg=colour240] %d-%b-%y #[fg=colour245,bg=colour240]\ue0b2#[fg=colour233,bg=colour245,bold] #H ",
|
||||
"status-right": powerlinePaneSyncStatus + "#[fg=colour240,bg=colour235] %H:%M:%S #[fg=colour240,bg=colour235]#[fg=colour233,bg=colour240] %d-%b-%y #[fg=colour245,bg=colour240]#[fg=colour233,bg=colour245,bold] #H ",
|
||||
"status-right-length": "150",
|
||||
"status-right-style": "fg=colour243,bg=colour233",
|
||||
"status-style": "fg=colour240,bg=colour233",
|
||||
@@ -113,8 +117,8 @@ func TestPowerlineBlockThemeOverrides(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
|
||||
assertHasPrefix(t, opts["status-left"], "SLP=")
|
||||
assertHasSuffix(t, opts["status-left"], "=SLS")
|
||||
assertHasPrefix(t, opts["status-right"], "SRP=")
|
||||
assertHasSuffix(t, opts["status-left"], "=SLS"+powerlinePrefixKeyStatus)
|
||||
assertHasPrefix(t, opts["status-right"], powerlinePaneSyncStatus+"SRP=")
|
||||
assertHasSuffix(t, opts["status-right"], "=SRS")
|
||||
|
||||
opts, err = tm.GetOptions(tmux.GlobalWindow)
|
||||
|
||||
@@ -40,23 +40,27 @@ func TestPowerlineDefaultThemes(t *testing.T) {
|
||||
"pane-active-border-style": "fg=" + c.color1,
|
||||
"pane-border-style": "fg=colour238",
|
||||
"window-status-activity-style": "fg=colour245,bg=colour233",
|
||||
"window-status-current-format": "#[fg=colour233,bg=black]\ue0b0#[fg=" + c.color2 + ",nobold] #I:#W#F #[fg=colour233,bg=black,nobold]\ue0b2",
|
||||
"window-status-current-format": "#[fg=colour233,bg=black]#[fg=" + c.color2 + ",nobold] #I:#W#F #[fg=colour233,bg=black,nobold]",
|
||||
"window-status-current-style": "fg=" + c.color2 + ",bg=black",
|
||||
"window-status-format": " #I:#W#F ",
|
||||
"window-status-separator": "",
|
||||
})
|
||||
|
||||
tmuxHasOptions(t, name, tmux.GlobalSession, tmux.Options{
|
||||
"@themepack-pane-sync-off": " #[fg=colour235]#[bg=colour233]",
|
||||
"@themepack-pane-sync-on": " #[fg=" + c.color2 + "]#[bg=colour233]#[fg=black]#[bg=" + c.color2 + "] SYNC #[fg=colour235]#[bg=" + c.color2 + "]",
|
||||
"@themepack-prefix-key-off": "#[fg=colour235]#[bg=colour233] ",
|
||||
"@themepack-prefix-key-on": "#[fg=colour235]#[bg=black]#[fg=" + c.color2 + "]#[bg=black] . #[fg=colour233]#[bg=black]",
|
||||
"display-panes-active-colour": "colour245",
|
||||
"display-panes-colour": "colour233",
|
||||
"message-command-style": "fg=black,bg=" + c.color1,
|
||||
"message-style": "fg=black,bg=" + c.color1,
|
||||
"status-interval": "1",
|
||||
"status-justify": "centre",
|
||||
"status-left": "#[fg=colour233,bg=" + c.color1 + ",bold] #S #[fg=" + c.color1 + ",bg=colour240,nobold]\ue0b0#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]\ue0b0#[fg=colour240,bg=colour235] #I:#P #[fg=colour235,bg=colour233,nobold]\ue0b0",
|
||||
"status-left": "#[fg=colour233,bg=" + c.color1 + ",bold] #S #[fg=" + c.color1 + ",bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #I:#P " + powerlinePrefixKeyStatus,
|
||||
"status-left-length": "40",
|
||||
"status-left-style": "fg=colour243,bg=colour233",
|
||||
"status-right": "#[fg=colour235,bg=colour233]\ue0b2#[fg=colour240,bg=colour235] %H:%M:%S #[fg=colour240,bg=colour235]\ue0b2#[fg=colour233,bg=colour240] %d-%b-%y #[fg=colour245,bg=colour240]\ue0b2#[fg=colour233,bg=colour245,bold] #H ",
|
||||
"status-right": powerlinePaneSyncStatus + "#[fg=colour240,bg=colour235] %H:%M:%S #[fg=colour240,bg=colour235]#[fg=colour233,bg=colour240] %d-%b-%y #[fg=colour245,bg=colour240]#[fg=colour233,bg=colour245,bold] #H ",
|
||||
"status-right-length": "150",
|
||||
"status-right-style": "fg=colour243,bg=colour233",
|
||||
"status-style": "fg=colour240,bg=colour233",
|
||||
@@ -113,8 +117,8 @@ func TestPowerlineDefaultThemeOverrides(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
|
||||
assertHasPrefix(t, opts["status-left"], "SLP=")
|
||||
assertHasSuffix(t, opts["status-left"], "=SLS")
|
||||
assertHasPrefix(t, opts["status-right"], "SRP=")
|
||||
assertHasSuffix(t, opts["status-left"], "=SLS"+powerlinePrefixKeyStatus)
|
||||
assertHasPrefix(t, opts["status-right"], powerlinePaneSyncStatus+"SRP=")
|
||||
assertHasSuffix(t, opts["status-right"], "=SRS")
|
||||
|
||||
opts, err = tm.GetOptions(tmux.GlobalWindow)
|
||||
|
||||
@@ -39,23 +39,27 @@ func TestPowerlineDoubleThemes(t *testing.T) {
|
||||
"pane-active-border-style": "fg=" + c.color1,
|
||||
"pane-border-style": "fg=colour238",
|
||||
"window-status-activity-style": "fg=colour245,bg=colour233",
|
||||
"window-status-current-format": "#[fg=colour233,bg=black]\ue0b0#[fg=" + c.color2 + ",nobold] #I:#W#F #[fg=colour233,bg=black,nobold]\ue0b2",
|
||||
"window-status-current-format": "#[fg=colour233,bg=black]#[fg=" + c.color2 + ",nobold] #I:#W#F #[fg=colour233,bg=black,nobold]",
|
||||
"window-status-current-style": "fg=" + c.color2 + ",bg=black",
|
||||
"window-status-format": " #I:#W#F ",
|
||||
"window-status-separator": "",
|
||||
})
|
||||
|
||||
tmuxHasOptions(t, filename, tmux.GlobalSession, tmux.Options{
|
||||
"@themepack-pane-sync-off": " #[fg=colour235]#[bg=colour233]",
|
||||
"@themepack-pane-sync-on": " #[fg=" + c.color2 + "]#[bg=colour233]#[fg=black]#[bg=" + c.color2 + "] SYNC #[fg=colour235]#[bg=" + c.color2 + "]",
|
||||
"@themepack-prefix-key-off": "#[fg=colour235]#[bg=colour233] ",
|
||||
"@themepack-prefix-key-on": "#[fg=colour235]#[bg=black]#[fg=" + c.color2 + "]#[bg=black] . #[fg=colour233]#[bg=black]",
|
||||
"display-panes-active-colour": "colour245",
|
||||
"display-panes-colour": "colour233",
|
||||
"message-command-style": "fg=black,bg=" + c.color1,
|
||||
"message-style": "fg=black,bg=" + c.color1,
|
||||
"status-interval": "1",
|
||||
"status-justify": "centre",
|
||||
"status-left": "#[fg=colour233,bg=" + c.color1 + ",bold] #S #[fg=" + c.color1 + ",bg=colour240,nobold]\ue0b0#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]\ue0b0#[fg=colour240,bg=colour235] #I:#P #[fg=colour235,bg=colour233,nobold]\ue0b0",
|
||||
"status-left": "#[fg=colour233,bg=" + c.color1 + ",bold] #S #[fg=" + c.color1 + ",bg=colour240,nobold]#[fg=colour233,bg=colour240] #(whoami) #[fg=colour240,bg=colour235]#[fg=colour240,bg=colour235] #I:#P " + powerlinePrefixKeyStatus,
|
||||
"status-left-length": "40",
|
||||
"status-left-style": "fg=colour243,bg=colour233",
|
||||
"status-right": "#[fg=colour235,bg=colour233]\ue0b2#[fg=colour240,bg=colour235] %H:%M:%S #[fg=colour240,bg=colour235]\ue0b2#[fg=colour233,bg=colour240] %d-%b-%y #[fg=" + c.color1 + ",bg=colour240]\ue0b2#[fg=colour233,bg=" + c.color1 + ",bold] #H ",
|
||||
"status-right": powerlinePaneSyncStatus + "#[fg=colour240,bg=colour235] %H:%M:%S #[fg=colour240,bg=colour235]#[fg=colour233,bg=colour240] %d-%b-%y #[fg=" + c.color1 + ",bg=colour240]#[fg=colour233,bg=" + c.color1 + ",bold] #H ",
|
||||
"status-right-length": "150",
|
||||
"status-right-style": "fg=colour243,bg=colour233",
|
||||
"status-style": "fg=colour240,bg=colour233",
|
||||
@@ -112,8 +116,8 @@ func TestPowerlineDoubleThemeOverrides(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
|
||||
assertHasPrefix(t, opts["status-left"], "SLP=")
|
||||
assertHasSuffix(t, opts["status-left"], "=SLS")
|
||||
assertHasPrefix(t, opts["status-right"], "SRP=")
|
||||
assertHasSuffix(t, opts["status-left"], "=SLS"+powerlinePrefixKeyStatus)
|
||||
assertHasPrefix(t, opts["status-right"], powerlinePaneSyncStatus+"SRP=")
|
||||
assertHasSuffix(t, opts["status-right"], "=SRS")
|
||||
|
||||
opts, err = tm.GetOptions(tmux.GlobalWindow)
|
||||
|
||||
Reference in New Issue
Block a user