mirror of
https://github.com/jimeh/tmux-themepack.git
synced 2026-02-19 11:16:43 +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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user