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

Feat: Window specific separator config #198

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mklbravo
Copy link

@mklbravo mklbravo commented Apr 23, 2024

This pull request:

  • Add window_type to build_window_format
  • If window specific separator is configured it will override global configuration
  • Update README.md to reflect new available options

Allowed new configuration options:

# Current type window configuration. If set, it will override the global configuration
set -g @catppuccin_window_current_left_separator "█"
set -g @catppuccin_window_current_middle_separator " 󰿟 "
set -g @catppuccin_window_current_right_separator "█"

# Default type window configuration. If set, it will override the global configuration
set -g @catppuccin_window_default_left_separator "█"
set -g @catppuccin_window_default_middle_separator " 󰿟 "
set -g @catppuccin_window_default_right_separator "█"

Fixes #197

@mklbravo
Copy link
Author

Screenshot 2024-04-23 at 23 37 01

This theme can be configured like this:

# Window global configuration
set -g @catppuccin_window_left_separator "█"
set -g @catppuccin_window_middle_separator "█ "
set -g @catppuccin_window_number_position "left"
set -g @catppuccin_window_right_separator "█"

# Window current configuration
set -g @catppuccin_window_current_middle_separator " 󰿟 "
set -g @catppuccin_window_current_fill "all"

# Window default configuration
set -g @catppuccin_window_default_fill "number"

Without this PR it will look like this:
Screenshot 2024-04-23 at 23 09 10

@mklbravo mklbravo force-pushed the feat/window-specific-separator-config branch from ea68c51 to dac1a87 Compare April 26, 2024 09:26
@mklbravo mklbravo marked this pull request as ready for review April 26, 2024 09:40
@mklbravo mklbravo force-pushed the feat/window-specific-separator-config branch from 2816e38 to 4589db4 Compare May 2, 2024 09:35
@mklbravo
Copy link
Author

mklbravo commented May 6, 2024

Thanks for the approval @vvorobev !

Comment on lines +173 to +179
#### Override the window default separators
```sh
set -g @catppuccin_window_default_left_separator ""
set -g @catppuccin_window_default_middle_separator "█"
set -g @catppuccin_window_default_right_separator ""
```

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just reuse catppuccin_window__left/middle/right_separator and only overwrite for current?

Comment on lines +9 to +11
type="default"

default_window_format=$(build_window_format "$number" "$color" "$background" "$text" "$fill")
default_window_format=$(build_window_format "$number" "$color" "$background" "$text" "$fill" "$middle_seprator" "$type")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type="default"
default_window_format=$(build_window_format "$number" "$color" "$background" "$text" "$fill")
default_window_format=$(build_window_format "$number" "$color" "$background" "$text" "$fill" "$middle_seprator" "$type")
default_window_format=$(build_window_format "$number" "$color" "$background" "$text" "$fill" "default")

Comment on lines +9 to +11
type="current"

current_window_format=$(build_window_format "$number" "$color" "$background" "$text" "$fill")
current_window_format=$(build_window_format "$number" "$color" "$background" "$text" "$fill" "$type")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type="current"
current_window_format=$(build_window_format "$number" "$color" "$background" "$text" "$fill")
current_window_format=$(build_window_format "$number" "$color" "$background" "$text" "$fill" "$type")
current_window_format=$(build_window_format "$number" "$color" "$background" "$text" "$fill" "current")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Specific 'separator' configuration for each window type
3 participants