Delete Catppucin theme for tmux
@@ -1,34 +0,0 @@
|
|||||||
# EditorConfig helps developers define and maintain consistent
|
|
||||||
# coding styles between different editors and IDEs
|
|
||||||
# EditorConfig is awesome: https://EditorConfig.org
|
|
||||||
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
charset = utf-8
|
|
||||||
indent_size = 2
|
|
||||||
indent_style = space
|
|
||||||
end_of_line = lf
|
|
||||||
insert_final_newline = true
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
|
|
||||||
# go
|
|
||||||
[*.go]
|
|
||||||
indent_style = tab
|
|
||||||
indent_size = 4
|
|
||||||
|
|
||||||
# python
|
|
||||||
[*.{ini,py,py.tpl,rst}]
|
|
||||||
indent_size = 4
|
|
||||||
|
|
||||||
# rust
|
|
||||||
[*.rs]
|
|
||||||
indent_size = 4
|
|
||||||
|
|
||||||
# documentation, utils
|
|
||||||
[*.{md,mdx,diff}]
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
|
|
||||||
# windows shell scripts
|
|
||||||
[*.{cmd,bat,ps1}]
|
|
||||||
end_of_line = crlf
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
name: Bug Report
|
|
||||||
description: Report your bugs with the theme here!
|
|
||||||
labels: [bug]
|
|
||||||
body:
|
|
||||||
- type: checkboxes
|
|
||||||
attributes:
|
|
||||||
label: Is there an existing issue outlining your problem?
|
|
||||||
description: Please search to see if an issue already exists for your problem.
|
|
||||||
options:
|
|
||||||
- label: I have searched the existing issues and they do not solve my problem.
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Describe your problem.
|
|
||||||
description: Also tell us, what do you expect to see?
|
|
||||||
placeholder: The battery charging icon is missing...
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Paste your configuration.
|
|
||||||
description: Provide us with the contents of your `.tmux.conf` file.
|
|
||||||
placeholder: |
|
|
||||||
```sh
|
|
||||||
set -g @plugin 'catppuccin/tmux'
|
|
||||||
set -g @plugin 'tmux-plugins/tpm'
|
|
||||||
# ...
|
|
||||||
run ~/.config/tmux/tpm/tpm
|
|
||||||
```
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Attach screenshots.
|
|
||||||
description: If applicable, attach screenshots which clearly highlight the issue.
|
|
||||||
- type: input
|
|
||||||
attributes:
|
|
||||||
label: What tmux version are you seeing the issue on?
|
|
||||||
description: "You can find your version by running `tmux -V`"
|
|
||||||
placeholder: tmux 3.3a
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Any additional comments?
|
|
||||||
description: Add any information that hasn't been covered in the previous sections!
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
blank_issues_enabled: false
|
|
||||||
contact_links:
|
|
||||||
- name: Ask A Question
|
|
||||||
url: https://github.com/catppuccin/tmux/discussions/new?category=q-a
|
|
||||||
about: Need help tweaking your Catppuccin tmux configuration? Ask questions in GitHub Discussions!
|
|
||||||
- name: Show & Tell
|
|
||||||
url: https://github.com/catppuccin/tmux/discussions/new?category=show-tell
|
|
||||||
about: Want to showcase your customised Catppuccin tmux configuration? Show it off in GitHub Discussions!
|
|
||||||
- name: Community Discord
|
|
||||||
url: https://discord.com/servers/catppuccin-907385605422448742
|
|
||||||
about: Chat to other community members!
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
name: Enhancement Issue
|
|
||||||
description: Request improvements to the theme here!
|
|
||||||
labels: [enhancement]
|
|
||||||
body:
|
|
||||||
- type: checkboxes
|
|
||||||
attributes:
|
|
||||||
label: Is there an existing issue outlining your improvement?
|
|
||||||
description: Please search to see if your improvement has already been raised as an issue.
|
|
||||||
options:
|
|
||||||
- label: I have searched the existing issues and my improvement has not been raised yet.
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: What would you like to see added and/or changed?
|
|
||||||
description: Make sure to mention why you think this is an improvement!
|
|
||||||
placeholder: I'd like to have an extra configuration option for...
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
name: Meta Issue
|
|
||||||
description: Raise any issue regarding the repository here!
|
|
||||||
labels: [meta]
|
|
||||||
body:
|
|
||||||
- type: checkboxes
|
|
||||||
attributes:
|
|
||||||
label: Is there an existing issue outlining your problem?
|
|
||||||
description: Please search to see if an issue already exists for your problem.
|
|
||||||
options:
|
|
||||||
- label: I have searched the existing issues and they do not solve my problem.
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Describe your issue.
|
|
||||||
description: Bugs should be raised under a [Bug Report](https://github.com/catppuccin/tmux/issues/new?assignees=&labels=bug&template=bug.yml).
|
|
||||||
placeholder: The README is missing crucial information such as...
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"last-release-sha": "408c02ccf44d0a59a7a63ce2b65c5c29982c5c0e",
|
|
||||||
"packages": {
|
|
||||||
".": {
|
|
||||||
"release-type": "simple",
|
|
||||||
"changelog-path": "CHANGELOG.md",
|
|
||||||
"bump-minor-pre-major": true,
|
|
||||||
"bump-patch-for-minor-pre-major": false,
|
|
||||||
"draft": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
".": "0.1.0"
|
|
||||||
}
|
|
||||||
@@ -1,71 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
#
|
|
||||||
# Usage:
|
|
||||||
# ./test.bash catpuccin-tmux/catpuccin-tmux.tmux
|
|
||||||
# ./test.bash catpuccin-tmux/catpuccin-tmux.tmux ./config-example1
|
|
||||||
#
|
|
||||||
|
|
||||||
SOCKET_NAME="${SOCKET_NAME:-test}"
|
|
||||||
|
|
||||||
tmux() {
|
|
||||||
command tmux -L "$SOCKET_NAME" "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
start_tmux_server() {
|
|
||||||
echo "Starting tmux server" >&2
|
|
||||||
tmux new -s dummy -d
|
|
||||||
}
|
|
||||||
|
|
||||||
kill_tmux_server() {
|
|
||||||
echo "Stopping tmux server" >&2
|
|
||||||
tmux kill-server
|
|
||||||
}
|
|
||||||
|
|
||||||
check() {
|
|
||||||
local out exit_code
|
|
||||||
exit_code="$1"
|
|
||||||
out="$2"
|
|
||||||
|
|
||||||
if [ "$exit_code" -ne 0 ] || [ -n "$out" ]; then
|
|
||||||
echo "Failed with exit code $exit_code and output:"
|
|
||||||
echo "$out"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
local config_file plugin output exit_code
|
|
||||||
|
|
||||||
plugin="$1"
|
|
||||||
config_file="$2"
|
|
||||||
|
|
||||||
echo "Using socket '$SOCKET_NAME'" >&2
|
|
||||||
|
|
||||||
# Make sure its a new/clean server
|
|
||||||
kill_tmux_server 2>/dev/null
|
|
||||||
start_tmux_server
|
|
||||||
|
|
||||||
if [ -z "$config_file" ]; then
|
|
||||||
echo "No config file provided" >&2
|
|
||||||
else
|
|
||||||
echo "sourcing config file '$config_file'" >&2
|
|
||||||
tmux source-file "$config_file"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$plugin" ]; then
|
|
||||||
echo "ERROR: No path to the plugin provided" >&2
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "Running plugin: $plugin" >&2
|
|
||||||
output="$(tmux run-shell "$plugin" 2>&1)"
|
|
||||||
exit_code="$?"
|
|
||||||
|
|
||||||
check "$exit_code" "$output"
|
|
||||||
fi
|
|
||||||
|
|
||||||
kill_tmux_server
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
@@ -1,45 +0,0 @@
|
|||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
name: release-please
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release-please:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: googleapis/release-please-action@v4
|
|
||||||
id: release
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
config-file: .github/release-please-config.json
|
|
||||||
manifest-file: .github/release-please-manifest.json
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: tag major and minor versions
|
|
||||||
if: ${{ steps.release.outputs.release_created }}
|
|
||||||
run: |
|
|
||||||
git config user.name github-actions[bot]
|
|
||||||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
||||||
|
|
||||||
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/googleapis/release-please-action.git"
|
|
||||||
|
|
||||||
git tag -d latest || true
|
|
||||||
git tag -d v${{ steps.release.outputs.major }} || true
|
|
||||||
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
|
|
||||||
|
|
||||||
git push origin :latest || true
|
|
||||||
git push origin :v${{ steps.release.outputs.major }} || true
|
|
||||||
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
|
|
||||||
|
|
||||||
git tag -a latest -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
|
|
||||||
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
|
|
||||||
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
|
|
||||||
|
|
||||||
git push origin latest
|
|
||||||
git push origin v${{ steps.release.outputs.major }}
|
|
||||||
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
---
|
|
||||||
name: Shellcheck
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths-ignore:
|
|
||||||
- "*.md"
|
|
||||||
- "assets/**"
|
|
||||||
push:
|
|
||||||
paths-ignore:
|
|
||||||
- "*.md"
|
|
||||||
- "assets/**"
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
workflow_dispatch:
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
shellcheck:
|
|
||||||
name: Shellcheck
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Run ShellCheck
|
|
||||||
uses: ludeeus/action-shellcheck@master
|
|
||||||
with:
|
|
||||||
additional_files: "catppuccin.tmux"
|
|
||||||
env:
|
|
||||||
SHELLCHECK_OPTS: "-a"
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
---
|
|
||||||
name: Tests
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
paths-ignore:
|
|
||||||
- "*.md"
|
|
||||||
- "assets/**"
|
|
||||||
push:
|
|
||||||
paths-ignore:
|
|
||||||
- "*.md"
|
|
||||||
- "assets/**"
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
workflow_dispatch:
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ubuntu:
|
|
||||||
name: Test
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Install tmux
|
|
||||||
run: sudo apt-get update && sudo apt-get install -y tmux=3.2a-4ubuntu0.2
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Config and Plugin
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
bash --version
|
|
||||||
tmux -V
|
|
||||||
./.github/scripts/test.bash ./catppuccin.tmux
|
|
||||||
|
|
||||||
old-bash:
|
|
||||||
name: "Old Bash"
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: bash:3.2.57-alpine3.19 # Bash version used by macos
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Check Syntax is Valid
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
apk update
|
|
||||||
apk add tmux
|
|
||||||
bash --version
|
|
||||||
tmux -V
|
|
||||||
./.github/scripts/test.bash ./catppuccin.tmux
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
custom
|
|
||||||
!custom/README.md
|
|
||||||
!custom/example.sh
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
shell=bash
|
|
||||||
|
|
||||||
# TODO: Find a way to declare color variables
|
|
||||||
disable=SC2154
|
|
||||||
|
|
||||||
external-sources=true
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
# Changelog
|
|
||||||
|
|
||||||
## [0.1.0](https://github.com/catppuccin/tmux/compare/v0.0.1...v0.1.0) (2024-08-04)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* releases ([#260](https://github.com/catppuccin/tmux/issues/260)) ([5fbacdf](https://github.com/catppuccin/tmux/commit/5fbacdf3559cf4496eef02aead087b3bb715e570))
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
# Contributing
|
|
||||||
|
|
||||||
## Adding a module
|
|
||||||
|
|
||||||
Follow the instructions from [custom](/custom), place the module in the appropriate
|
|
||||||
directory and document the module in `README.md`.
|
|
||||||
|
|
||||||
## Commit messages
|
|
||||||
|
|
||||||
This repository uses [Conventional Commits](https://conventionalcommits.org).
|
|
||||||
Commit headers should be lowercase. Most commits should include a body that briefly
|
|
||||||
describes the motivation and content of the commit.
|
|
||||||
|
|
||||||
### Commit types
|
|
||||||
|
|
||||||
- `fix`: A bug fix that doesn't modify the public API
|
|
||||||
- `feat`: A code change that modifies the public API
|
|
||||||
- `refactor`: A code change that doesn't change behavior
|
|
||||||
- `style`: A style fix or change
|
|
||||||
- `docs`: Any change to documentation
|
|
||||||
- `ci`: Any change to CI files
|
|
||||||
- `revert`: A revert commit. The message should describe the reasoning and the
|
|
||||||
commit should include the `Refs:` footer with the short hashes of the commits
|
|
||||||
being reverted.
|
|
||||||
- `chore`: catch-all type
|
|
||||||
|
|
||||||
### Commit scopes
|
|
||||||
|
|
||||||
Available commit scopes are module names, `status`, `pane`, and
|
|
||||||
`window`. If none of these apply, omit the scope.
|
|
||||||
|
|
||||||
### Breaking changes
|
|
||||||
|
|
||||||
All breaking changes should be documented in the commit footer in the format
|
|
||||||
described by Conventional Commits. Use the `<type>!` syntax in order to distinguish
|
|
||||||
breaking commits in the log, but include the footer to provide a better description
|
|
||||||
for the changelog generator.
|
|
||||||
|
|
||||||
```
|
|
||||||
feat(bar)!: foo the bars
|
|
||||||
|
|
||||||
BREAKING CHANGE: bars are now foo'ed
|
|
||||||
```
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2021 Catppuccin
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
@@ -1,625 +0,0 @@
|
|||||||
<h3 align="center">
|
|
||||||
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/logos/exports/1544x1544_circle.png" width="100" alt="Logo"/><br/>
|
|
||||||
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png" height="30" width="0px"/>
|
|
||||||
Catppuccin for <a href="https://github.com/tmux/tmux">Tmux</a>
|
|
||||||
<img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/misc/transparent.png" height="30" width="0px"/>
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://github.com/catppuccin/tmux/stargazers"><img src="https://img.shields.io/github/stars/catppuccin/tmux?colorA=363a4f&colorB=b7bdf8&style=for-the-badge"></a>
|
|
||||||
<a href="https://github.com/catppuccin/tmux/issues"><img src="https://img.shields.io/github/issues/catppuccin/tmux?colorA=363a4f&colorB=f5a97f&style=for-the-badge"></a>
|
|
||||||
<a href="https://github.com/catppuccin/tmux/contributors"><img src="https://img.shields.io/github/contributors/catppuccin/tmux?colorA=363a4f&colorB=a6da95&style=for-the-badge"></a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<img src="./assets/preview.webp"/>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
## Content
|
|
||||||
|
|
||||||
1. [Themes](#themes)
|
|
||||||
1. [Installation](#installation)
|
|
||||||
1. [Overview](#overview)
|
|
||||||
1. [Configuration options](#configuration-options)
|
|
||||||
1. [Window](#window)
|
|
||||||
1. [Window default](#window-default)
|
|
||||||
1. [Window current](#window-current)
|
|
||||||
1. [Status](#status)
|
|
||||||
1. [Pane](#pane)
|
|
||||||
1. [Customizing modules](#customizing-modules)
|
|
||||||
1. [Battery module](#battery-module)
|
|
||||||
1. [CPU module](#CPU-module)
|
|
||||||
1. [Weather modules](#weather-modules)
|
|
||||||
1. [Load module](#load-module)
|
|
||||||
1. [Create a custom module](#create-a-custom-module)
|
|
||||||
1. [Configuration Examples](#configuration-examples)
|
|
||||||
1. [Config 1](#config-1)
|
|
||||||
1. [Config 2](#config-2)
|
|
||||||
1. [Config 3](#config-3)
|
|
||||||
|
|
||||||
## Themes
|
|
||||||
|
|
||||||
- 🌻 [Latte](./themes/catppuccin_latte.tmuxtheme)
|
|
||||||
- 🪴 [Frappé](./themes/catppuccin_frappe.tmuxtheme)
|
|
||||||
- 🌺 [Macchiato](./themes/catppuccin_macchiato.tmuxtheme)
|
|
||||||
- 🌿 [Mocha](./themes/catppuccin_mocha.tmuxtheme)
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
In order to have the icons displayed correctly please use/update your favorite [patched font](https://www.nerdfonts.com/font-downloads).
|
|
||||||
If you do not have a patched font installed, you can override or remove any icon. Check the documentation below on the options available.
|
|
||||||
|
|
||||||
### TPM
|
|
||||||
|
|
||||||
1. Install [TPM](https://github.com/tmux-plugins/tpm)
|
|
||||||
2. Add the Catppuccin plugin:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
set -g @plugin 'catppuccin/tmux#latest' # See https://github.com/catppuccin/tmux/tags for additional tags
|
|
||||||
# set -g @plugin 'catppuccin/tmux' # main branch
|
|
||||||
# ...alongside
|
|
||||||
set -g @plugin 'tmux-plugins/tpm'
|
|
||||||
```
|
|
||||||
|
|
||||||
3. (Optional) Set your preferred flavor, it defaults to `"mocha"`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
set -g @catppuccin_flavour 'mocha' # latte,frappe, macchiato or mocha
|
|
||||||
```
|
|
||||||
|
|
||||||
### Manual
|
|
||||||
|
|
||||||
1. Clone this repository to your desired location (e.g.
|
|
||||||
`~/.config/tmux/plugins/catppuccin`)
|
|
||||||
2. Add the following line to your `tmux.conf` file:
|
|
||||||
`run ~/.config/tmux/plugins/catppuccin/catppuccin.tmux`
|
|
||||||
3. (Optional) Set your preferred flavor and/or add configuration options as
|
|
||||||
listed in [Configuration Options](#configuration-options).
|
|
||||||
4. Reload Tmux by either restarting the session or reloading it with `tmux source-file ~/.tmux.conf`
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||

|
|
||||||
This is a diagram of how the theme is split between its components.
|
|
||||||
|
|
||||||
## Configuration options
|
|
||||||
|
|
||||||
All flavors support certain levels of customization that match our [Catppuccin
|
|
||||||
Style Guide][style-guide]. To add these customizations, add any of the following
|
|
||||||
options to your Tmux configuration.
|
|
||||||
|
|
||||||
### Window
|
|
||||||
|
|
||||||
### Set the window separator
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_window_separator ""
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Set the window left separator:
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_window_left_separator "█"
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Set the window middle separator:
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_window_middle_separator "█"
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Set the window right separator:
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_window_right_separator "█"
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Position the number:
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_window_number_position "left"
|
|
||||||
```
|
|
||||||
Values:
|
|
||||||
- left - the number will be on the left part of the window
|
|
||||||
- right - the number will be on the right part of the window
|
|
||||||
|
|
||||||
#### Enable window status:
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_window_status_enable "no"
|
|
||||||
```
|
|
||||||
Values:
|
|
||||||
- yes - this will enable the window status part
|
|
||||||
- no - this will disable the window status part
|
|
||||||
|
|
||||||
#### Enable window status icons instead of text:
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_window_status_icon_enable "yes"
|
|
||||||
```
|
|
||||||
Values:
|
|
||||||
- yes - this will replace the windows status text with icons
|
|
||||||
- no - this will keep the windows status in text format
|
|
||||||
|
|
||||||
#### Override windows status icons
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_icon_window_last ""
|
|
||||||
set -g @catppuccin_icon_window_current ""
|
|
||||||
set -g @catppuccin_icon_window_zoom ""
|
|
||||||
set -g @catppuccin_icon_window_mark ""
|
|
||||||
set -g @catppuccin_icon_window_silent ""
|
|
||||||
set -g @catppuccin_icon_window_activity ""
|
|
||||||
set -g @catppuccin_icon_window_bell ""
|
|
||||||
```
|
|
||||||
|
|
||||||
### Window default
|
|
||||||
|
|
||||||
#### Set the window default color fill:
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_window_default_fill "number"
|
|
||||||
```
|
|
||||||
Values:
|
|
||||||
- number - only the number of the window part will have color
|
|
||||||
- all - the entire window part will have the same color
|
|
||||||
- none - the entire window part will have no color
|
|
||||||
|
|
||||||
#### Override the window default colors:
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_window_default_color "#{thm_blue}" # text color
|
|
||||||
set -g @catppuccin_window_default_background "#{thm_gray}"
|
|
||||||
```
|
|
||||||
|
|
||||||
Values:
|
|
||||||
- color - a theme color (`#{thm_<color>}`) or hexadecimal color value
|
|
||||||
|
|
||||||
#### Override the window default text:
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_window_default_text "#{b:pane_current_path}" # use "#W" for application instead of directory
|
|
||||||
```
|
|
||||||
|
|
||||||
### Window current
|
|
||||||
|
|
||||||
#### Set the window current color fill:
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_window_current_fill "number"
|
|
||||||
```
|
|
||||||
Values:
|
|
||||||
- number - only the number of the window part will have color
|
|
||||||
- all - the entire window part will have the same color
|
|
||||||
- none - the entire window part will have no color
|
|
||||||
|
|
||||||
#### Override the window current colors:
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_window_current_color "#{thm_orange}" # text color
|
|
||||||
set -g @catppuccin_window_current_background "#{thm_bg}"
|
|
||||||
```
|
|
||||||
Note that color and background fields are swapped when `@catppuccin_window_current_fill` is set to "all".
|
|
||||||
|
|
||||||
Values:
|
|
||||||
- color - a theme color (`#{thm_<color>}`) or a hexadecimal color value
|
|
||||||
|
|
||||||
#### Override the window current text:
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_window_current_text "#{b:pane_current_path}" # use "#W" for application instead of directory
|
|
||||||
```
|
|
||||||
|
|
||||||
### Pane
|
|
||||||
|
|
||||||
#### Set the pane border style:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_pane_border_style "fg=#{thm_gray}" # Use a value compatible with the standard tmux 'pane-border-style'
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Set the pane active border style:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_pane_active_border_style "fg=#{thm_orange}" # Use a value compatible with the standard tmux 'pane-border-active-style'
|
|
||||||
```
|
|
||||||
|
|
||||||
### Menu
|
|
||||||
|
|
||||||
#### Set the menu style:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_menu_style "default" # Use a value compatible with the standard tmux `menu-style`
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Set the menu selected style:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_menu_selected_style "fg=#{thm_gray},bg=#{thm_yellow}" # Use a value compatible with the standard tmux `menu-selected-style`
|
|
||||||
```
|
|
||||||
|
|
||||||
### Set the menu border style:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_menu_border_style "default" # Use a value compatible with the standard tmux `menu-border-style`
|
|
||||||
```
|
|
||||||
|
|
||||||
### Status
|
|
||||||
#### Set the default status bar visibility
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_status_default "on"
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Override the default status background color
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_status_background "theme"
|
|
||||||
```
|
|
||||||
This will overwrite the status bar background:
|
|
||||||
- "theme" will use the color from the selected theme
|
|
||||||
- "default" will make the status bar transparent
|
|
||||||
- use hex color codes for other colors or a theme color (`#{thm_<color>}`)
|
|
||||||
|
|
||||||
Note: you need to restart tmux for this to take effect:
|
|
||||||
```sh
|
|
||||||
tmux kill-server & tmux
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Set the status module left separator:
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_status_left_separator ""
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Set the status module right separator:
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_status_right_separator "█"
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Set the status connect separator:
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_status_connect_separator "yes"
|
|
||||||
```
|
|
||||||
Values:
|
|
||||||
- yes - the background color of the separator will not blend in with the background color of tmux
|
|
||||||
- no - the background color of the separator will blend in with the background color of tmux
|
|
||||||
|
|
||||||
|
|
||||||
#### Set the status module color fill:
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_status_fill "icon"
|
|
||||||
```
|
|
||||||
Values:
|
|
||||||
- icon - only the icon of the module will have color
|
|
||||||
- all - the entire module will have the same color
|
|
||||||
|
|
||||||
#### Set the status module justify value:
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_status_justify "left"
|
|
||||||
```
|
|
||||||
Values:
|
|
||||||
- left
|
|
||||||
- centre - puts the window list in the relative centre of the available free space
|
|
||||||
- right
|
|
||||||
- absolute-centre - uses the centre of the entire horizontal space
|
|
||||||
|
|
||||||
### Pane
|
|
||||||
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_pane_status_enabled "no"
|
|
||||||
set -g @catppuccin_pane_border_status "off" # See `pane-border-status`
|
|
||||||
set -g @catppuccin_pane_left_separator "█"
|
|
||||||
set -g @catppuccin_pane_right_separator "█"
|
|
||||||
set -g @catppuccin_pane_middle_separator "█"
|
|
||||||
set -g @catppuccin_pane_number_position "left"
|
|
||||||
set -g @catppuccin_pane_default_fill "number"
|
|
||||||
set -g @catppuccin_pane_default_text "#{b:pane_current_path}"
|
|
||||||
set -g @catppuccin_pane_border_style "fg=#{thm_orange}"
|
|
||||||
set -g @catppuccin_pane_active_border_style "fg=#{thm_orange}"
|
|
||||||
set -g @catppuccin_pane_color "#{thm_orange}"
|
|
||||||
set -g @catppuccin_pane_background_color "#{thm_orange}"
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Set the module list
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_status_modules_right "application session"
|
|
||||||
set -g @catppuccin_status_modules_left "null"
|
|
||||||
```
|
|
||||||
Provide a list of modules and the order in which you want them to appear in the status.
|
|
||||||
|
|
||||||
Available modules:
|
|
||||||
- application - display the current window running application
|
|
||||||
- directory - display the basename of the current window path
|
|
||||||
- session - display the number of tmux sessions running
|
|
||||||
- user - display the username
|
|
||||||
- host - display the hostname
|
|
||||||
- date_time - display the date and time
|
|
||||||
- uptime - display the uptime
|
|
||||||
- [battery](#battery-module) - display the battery
|
|
||||||
|
|
||||||
### Customizing modules
|
|
||||||
|
|
||||||
Every module (except the module "session") supports the following overrides:
|
|
||||||
|
|
||||||
#### Override the specific module icon
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_[module_name]_icon "icon"
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Override the specific module color
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_[module_name]_color "color"
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Override the specific module text
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_[module_name]_text "text"
|
|
||||||
```
|
|
||||||
|
|
||||||
#### Removing a specific module option
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_[module_name]_[option] "null"
|
|
||||||
```
|
|
||||||
This is for the situation where you want to remove the icon from a module.
|
|
||||||
Ex:
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_date_time_icon "null"
|
|
||||||
```
|
|
||||||
|
|
||||||
### Battery module
|
|
||||||
|
|
||||||
#### Requirements
|
|
||||||
This module depends on [tmux-battery](https://github.com/tmux-plugins/tmux-battery/tree/master).
|
|
||||||
|
|
||||||
#### Install
|
|
||||||
The preferred way to install tmux-battery is using [TPM](https://github.com/tmux-plugins/tpm).
|
|
||||||
|
|
||||||
#### Configure
|
|
||||||
Load tmux-battery after you load catppuccin.
|
|
||||||
```sh
|
|
||||||
set -g @plugin 'catppuccin/tmux'
|
|
||||||
...
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-battery'
|
|
||||||
```
|
|
||||||
|
|
||||||
Add the battery module to the status modules list.
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_status_modules_right "... battery ..."
|
|
||||||
```
|
|
||||||
|
|
||||||
### CPU module
|
|
||||||
|
|
||||||
#### Requirements
|
|
||||||
This module depends on [tmux-cpu](https://github.com/tmux-plugins/tmux-cpu/tree/master).
|
|
||||||
|
|
||||||
#### Install
|
|
||||||
The preferred way to install tmux-cpu is using [TPM](https://github.com/tmux-plugins/tpm).
|
|
||||||
|
|
||||||
#### Configure
|
|
||||||
Load tmux-cpu after you load catppuccin.
|
|
||||||
```sh
|
|
||||||
set -g @plugin 'catppuccin/tmux'
|
|
||||||
...
|
|
||||||
set -g @plugin 'tmux-plugins/tmux-cpu'
|
|
||||||
```
|
|
||||||
|
|
||||||
Add the cpu module to the status modules list.
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_status_modules_right "... cpu ..."
|
|
||||||
```
|
|
||||||
|
|
||||||
### Weather modules
|
|
||||||
|
|
||||||
#### tmux-weather
|
|
||||||
|
|
||||||
##### Requirements
|
|
||||||
This module depends on [tmux-weather](https://github.com/xamut/tmux-weather).
|
|
||||||
|
|
||||||
##### Install
|
|
||||||
The preferred way to install tmux-weather is using [TPM](https://github.com/tmux-plugins/tpm).
|
|
||||||
|
|
||||||
##### Configure
|
|
||||||
Load tmux-weather after you load catppuccin.
|
|
||||||
```sh
|
|
||||||
set -g @plugin 'catppuccin/tmux'
|
|
||||||
...
|
|
||||||
set -g @plugin 'xamut/tmux-weather'
|
|
||||||
```
|
|
||||||
|
|
||||||
Add the weather module to the status modules list.
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_status_modules_right "... weather ..."
|
|
||||||
```
|
|
||||||
|
|
||||||
#### tmux-clima
|
|
||||||
|
|
||||||
##### Requirements
|
|
||||||
This module depends on [tmux-clima](https://github.com/vascomfnunes/tmux-clima).
|
|
||||||
|
|
||||||
##### Install
|
|
||||||
The preferred way to install tmux-clima is using [TPM](https://github.com/tmux-plugins/tpm).
|
|
||||||
|
|
||||||
##### Configure
|
|
||||||
Load tmux-clima after you load catppuccin.
|
|
||||||
```sh
|
|
||||||
set -g @plugin 'catppuccin/tmux'
|
|
||||||
...
|
|
||||||
set -g @plugin 'vascomfnunes/tmux-clima'
|
|
||||||
```
|
|
||||||
|
|
||||||
Add the weather module to the status modules list.
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_status_modules_right "... clima ..."
|
|
||||||
```
|
|
||||||
|
|
||||||
### Load module
|
|
||||||
|
|
||||||
#### Requirements
|
|
||||||
This module depends on [tmux-loadavg](https://github.com/jamesoff/tmux-loadavg).
|
|
||||||
|
|
||||||
#### Install
|
|
||||||
The preferred way to install tmux-loadavg is using [TPM](https://github.com/tmux-plugins/tpm).
|
|
||||||
|
|
||||||
#### Configure
|
|
||||||
Load tmux-loadavg after you load catppuccin.
|
|
||||||
```sh
|
|
||||||
set -g @plugin 'catppuccin/tmux'
|
|
||||||
...
|
|
||||||
set -g @plugin 'jamesoff/tmux-loadavg'
|
|
||||||
```
|
|
||||||
|
|
||||||
Add the load module to the status modules list.
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_status_modules_right "... load ..."
|
|
||||||
```
|
|
||||||
|
|
||||||
### Gitmux module
|
|
||||||
|
|
||||||
#### Requirements
|
|
||||||
This module depends on [gitmux](https://github.com/arl/gitmux).
|
|
||||||
|
|
||||||
#### Install
|
|
||||||
To install gitmux, follow the instructions in the [gitmux documentation](https://github.com/arl/gitmux/blob/main/README.md#installing).
|
|
||||||
|
|
||||||
#### Configure
|
|
||||||
Add the gitmux module to the status modules list.
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_status_modules_right "... gitmux ..."
|
|
||||||
```
|
|
||||||
|
|
||||||
To customize the gitmux module, you can follow the instrucctions in the [gitmux documentation](https://github.com/arl/gitmux/blob/main/README.md#customizing) and add this line in your tmux configuration:
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_gitmux_text "#(gitmux -cfg $HOME/.gitmux.conf \"#{pane_current_path}\")"
|
|
||||||
```
|
|
||||||
|
|
||||||
### Pomodoro module
|
|
||||||
|
|
||||||
#### Requirements
|
|
||||||
This module depends on [tmux-pomodoro-plus](https://github.com/olimorris/tmux-pomodoro-plus/tree/main).
|
|
||||||
|
|
||||||
#### Install
|
|
||||||
The preferred way to install tmux-pomodoro-plus is using [TPM](https://github.com/tmux-plugins/tpm).
|
|
||||||
|
|
||||||
#### Configure
|
|
||||||
Load tmux-pomodoro-plus after you load catppuccin.
|
|
||||||
```sh
|
|
||||||
set -g @plugin 'catppuccin/tmux'
|
|
||||||
...
|
|
||||||
set -g @plugin 'olimorris/tmux-pomodoro-plus'
|
|
||||||
```
|
|
||||||
|
|
||||||
Add the pomodoro module to the status modules list.
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_status_modules_right "... pomodoro_plus ..."
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
### Kube module
|
|
||||||
|
|
||||||
#### Requirements
|
|
||||||
This module depends on [kube-tmux](https://github.com/jonmosco/kube-tmux).
|
|
||||||
|
|
||||||
#### Install
|
|
||||||
The preferred way to install kube-tmux is using [TPM](https://github.com/tmux-plugins/tpm).
|
|
||||||
|
|
||||||
#### Configure
|
|
||||||
```sh
|
|
||||||
set -g @plugin 'catppuccin/tmux'
|
|
||||||
...
|
|
||||||
set -g @plugin 'jonmosco/kube-tmux'
|
|
||||||
```
|
|
||||||
|
|
||||||
Add the tmux module to the status modules list.
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_status_modules_right "... kube ..."
|
|
||||||
```
|
|
||||||
|
|
||||||
Optionally override the kube-tmux colors
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_kube_context_color "#{thm_red}"
|
|
||||||
set -g @catppuccin_kube_namespace_color "#{thm_cyan}"
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
## Create a custom module
|
|
||||||
|
|
||||||
It is possible to add a new custom module or overwrite any of the existing modules.
|
|
||||||
|
|
||||||
For further details, see the documentation in [custom/README.md](custom/README.md)
|
|
||||||
|
|
||||||
Any file added to the custom folder will be preserved when updating catppuccin.
|
|
||||||
|
|
||||||
## Configuration Examples
|
|
||||||
Below are provided a few configurations as examples or starting points.
|
|
||||||
|
|
||||||
Note:
|
|
||||||
When switching between configurations run:
|
|
||||||
```sh
|
|
||||||
tmux kill-server
|
|
||||||
```
|
|
||||||
To kill the tmux server and clear all global variables.
|
|
||||||
|
|
||||||
|
|
||||||
### Config 1
|
|
||||||

|
|
||||||
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_window_right_separator "█ "
|
|
||||||
set -g @catppuccin_window_number_position "right"
|
|
||||||
set -g @catppuccin_window_middle_separator " | "
|
|
||||||
|
|
||||||
set -g @catppuccin_window_default_fill "none"
|
|
||||||
|
|
||||||
set -g @catppuccin_window_current_fill "all"
|
|
||||||
|
|
||||||
set -g @catppuccin_status_modules_right "application session user host date_time"
|
|
||||||
set -g @catppuccin_status_left_separator "█"
|
|
||||||
set -g @catppuccin_status_right_separator "█"
|
|
||||||
|
|
||||||
set -g @catppuccin_date_time_text "%Y-%m-%d %H:%M:%S"
|
|
||||||
```
|
|
||||||
|
|
||||||
### Config 2
|
|
||||||

|
|
||||||
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_window_left_separator "█"
|
|
||||||
set -g @catppuccin_window_right_separator "█ "
|
|
||||||
set -g @catppuccin_window_number_position "right"
|
|
||||||
set -g @catppuccin_window_middle_separator " █"
|
|
||||||
|
|
||||||
set -g @catppuccin_window_default_fill "number"
|
|
||||||
|
|
||||||
set -g @catppuccin_window_current_fill "number"
|
|
||||||
set -g @catppuccin_window_current_text "#{pane_current_path}"
|
|
||||||
|
|
||||||
set -g @catppuccin_status_modules_right "application session date_time"
|
|
||||||
set -g @catppuccin_status_left_separator ""
|
|
||||||
set -g @catppuccin_status_right_separator " "
|
|
||||||
set -g @catppuccin_status_fill "all"
|
|
||||||
set -g @catppuccin_status_connect_separator "yes"
|
|
||||||
```
|
|
||||||
|
|
||||||
### Config 3
|
|
||||||

|
|
||||||
|
|
||||||
```sh
|
|
||||||
set -g @catppuccin_window_left_separator ""
|
|
||||||
set -g @catppuccin_window_right_separator " "
|
|
||||||
set -g @catppuccin_window_middle_separator " █"
|
|
||||||
set -g @catppuccin_window_number_position "right"
|
|
||||||
|
|
||||||
set -g @catppuccin_window_default_fill "number"
|
|
||||||
set -g @catppuccin_window_default_text "#W"
|
|
||||||
|
|
||||||
set -g @catppuccin_window_current_fill "number"
|
|
||||||
set -g @catppuccin_window_current_text "#W"
|
|
||||||
|
|
||||||
set -g @catppuccin_status_modules_right "directory user host session"
|
|
||||||
set -g @catppuccin_status_left_separator " "
|
|
||||||
set -g @catppuccin_status_right_separator ""
|
|
||||||
set -g @catppuccin_status_fill "icon"
|
|
||||||
set -g @catppuccin_status_connect_separator "no"
|
|
||||||
|
|
||||||
set -g @catppuccin_directory_text "#{pane_current_path}"
|
|
||||||
```
|
|
||||||
|
|
||||||
[style-guide]: https://github.com/catppuccin/catppuccin/blob/main/docs/style-guide.md
|
|
||||||
|
|
||||||
## 💝 Thanks to
|
|
||||||
|
|
||||||
- [Pocco81](https://github.com/catppuccin)
|
|
||||||
- [vinnyA3](https://github.com/vinnyA3)
|
|
||||||
- [rogeruiz](https://github.com/rogeruiz)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p align="center"><img src="https://raw.githubusercontent.com/catppuccin/catppuccin/main/assets/footers/gray0_ctp_on_line.svg?sanitize=true" /></p>
|
|
||||||
<p align="center">Copyright © 2021-present <a href="https://github.com/catppuccin" target="_blank">Catppuccin Org</a>
|
|
||||||
<p align="center"><a href="https://github.com/catppuccin/catppuccin/blob/main/LICENSE"><img src="https://img.shields.io/static/v1.svg?style=for-the-badge&label=License&message=MIT&logoColor=d9e0ee&colorA=363a4f&colorB=b7bdf8"/></a></p>
|
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 222 KiB |
|
Before Width: | Height: | Size: 159 KiB |
@@ -1,48 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
build_status_module() {
|
|
||||||
local index="$1"
|
|
||||||
local icon="$2"
|
|
||||||
local color="$3"
|
|
||||||
local text="$4"
|
|
||||||
|
|
||||||
if [ "$status_fill" = "icon" ]; then
|
|
||||||
local bg
|
|
||||||
local show_icon="#[fg=$thm_bg,bg=$color,nobold,nounderscore,noitalics]$icon "
|
|
||||||
local show_text="#[fg=$thm_fg,bg=$thm_gray] $text"
|
|
||||||
|
|
||||||
if [ "$status_connect_separator" = "yes" ]; then
|
|
||||||
bg="$thm_gray"
|
|
||||||
else
|
|
||||||
bg="default"
|
|
||||||
fi
|
|
||||||
|
|
||||||
local show_left_separator="#[fg=$color,bg=$bg,nobold,nounderscore,noitalics]$status_left_separator"
|
|
||||||
local show_right_separator="#[fg=$thm_gray,bg=$bg,nobold,nounderscore,noitalics]$status_right_separator"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$status_fill" = "all" ]; then
|
|
||||||
local show_icon="#[fg=$thm_bg,bg=$color,nobold,nounderscore,noitalics]$icon "
|
|
||||||
local show_text="#[fg=$thm_bg,bg=$color]$text"
|
|
||||||
|
|
||||||
if [ "$status_connect_separator" = "yes" ]; then
|
|
||||||
local show_left_separator="#[fg=$color,nobold,nounderscore,noitalics]$status_left_separator"
|
|
||||||
local show_right_separator="#[fg=$color,bg=$color,nobold,nounderscore,noitalics]$status_right_separator"
|
|
||||||
|
|
||||||
else
|
|
||||||
local show_left_separator="#[fg=$color,bg=default,nobold,nounderscore,noitalics]$status_left_separator"
|
|
||||||
local show_right_separator="#[fg=$color,bg=default,nobold,nounderscore,noitalics]$status_right_separator"
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $((index)) -eq 0 ]; then
|
|
||||||
local show_left_separator="#[fg=$color,bg=default,nobold,nounderscore,noitalics]$status_left_separator"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$icon" ] ; then
|
|
||||||
show_icon=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$show_left_separator$show_icon$show_text$show_right_separator"
|
|
||||||
}
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
build_pane_format() {
|
|
||||||
local number=$1
|
|
||||||
local color=$2
|
|
||||||
local background=$3
|
|
||||||
local text=$4
|
|
||||||
local fill=$5
|
|
||||||
|
|
||||||
if [ "$pane_status_enable" = "yes" ]
|
|
||||||
then
|
|
||||||
if [ "$fill" = "none" ]
|
|
||||||
then
|
|
||||||
local show_left_separator="#[fg=$thm_gray,bg=default,nobold,nounderscore,noitalics]$pane_left_separator"
|
|
||||||
local show_number="#[fg=$thm_fg,bg=$thm_gray]$number"
|
|
||||||
local show_middle_separator="#[fg=$thm_fg,bg=$thm_gray,nobold,nounderscore,noitalics]$pane_middle_separator"
|
|
||||||
local show_text="#[fg=$thm_fg,bg=$thm_gray]$text"
|
|
||||||
local show_right_separator="#[fg=$thm_gray,bg=default]$pane_right_separator"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$fill" = "all" ]
|
|
||||||
then
|
|
||||||
local show_left_separator="#[fg=$color,bg=default,nobold,nounderscore,noitalics]$pane_left_separator"
|
|
||||||
local show_number="#[fg=$background,bg=$color]$number"
|
|
||||||
local show_middle_separator="#[fg=$background,bg=$color,nobold,nounderscore,noitalics]$pane_middle_separator"
|
|
||||||
local show_text="#[fg=$background,bg=$color]$text"
|
|
||||||
local show_right_separator="#[fg=$color,bg=default]$pane_right_separator"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$fill" = "number" ]
|
|
||||||
then
|
|
||||||
local show_number="#[fg=$background,bg=$color]$number"
|
|
||||||
local show_middle_separator="#[fg=$color,bg=$background,nobold,nounderscore,noitalics]$pane_middle_separator"
|
|
||||||
local show_text="#[fg=$thm_fg,bg=$background]$text"
|
|
||||||
|
|
||||||
if [ "$pane_number_position" = "right" ]
|
|
||||||
then
|
|
||||||
local show_left_separator="#[fg=$background,bg=default,nobold,nounderscore,noitalics]$pane_left_separator"
|
|
||||||
local show_right_separator="#[fg=$color,bg=default]$pane_right_separator"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$pane_number_position" = "left" ]
|
|
||||||
then
|
|
||||||
local show_right_separator="#[fg=$background,bg=default,nobold,nounderscore,noitalics]$pane_right_separator"
|
|
||||||
local show_left_separator="#[fg=$color,bg=default]$pane_left_separator"
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
local final_pane_format
|
|
||||||
|
|
||||||
if [ "$pane_number_position" = "right" ]
|
|
||||||
then
|
|
||||||
final_pane_format="$show_left_separator$show_text$show_middle_separator$show_number$show_right_separator"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$pane_number_position" = "left" ]
|
|
||||||
then
|
|
||||||
final_pane_format="$show_left_separator$show_number$show_middle_separator$show_text$show_right_separator"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$final_pane_format"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
@@ -1,127 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
build_window_format() {
|
|
||||||
local number="$1"
|
|
||||||
local color="$2"
|
|
||||||
local background="$3"
|
|
||||||
local text="$4"
|
|
||||||
local fill="$5"
|
|
||||||
|
|
||||||
if [ "$window_status_enable" = "yes" ]; then
|
|
||||||
local icon
|
|
||||||
icon="$(build_window_icon)"
|
|
||||||
text="$text$icon"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$fill" = "none" ]; then
|
|
||||||
local show_number="#[fg=$thm_fg,bg=$thm_gray]$number"
|
|
||||||
local show_middle_separator="#[fg=$thm_fg,bg=$thm_gray,nobold,nounderscore,noitalics]$window_middle_separator"
|
|
||||||
local show_text="#[fg=$thm_fg,bg=$thm_gray]$text"
|
|
||||||
|
|
||||||
if [ "$status_connect_separator" = "yes" ]; then
|
|
||||||
local show_left_separator="#[fg=$thm_gray,bg=$thm_bg,nobold,nounderscore,noitalics]$window_left_separator"
|
|
||||||
local show_right_separator="#[fg=$thm_gray,bg=$thm_bg]$window_right_separator"
|
|
||||||
|
|
||||||
else
|
|
||||||
local show_left_separator="#[fg=$thm_gray,bg=default,nobold,nounderscore,noitalics]$window_left_separator"
|
|
||||||
local show_right_separator="#[fg=$thm_gray,bg=default]$window_right_separator"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$fill" = "all" ]; then
|
|
||||||
local show_number="#[fg=$background,bg=$color]$number"
|
|
||||||
local show_middle_separator="#[fg=$background,bg=$color,nobold,nounderscore,noitalics]$window_middle_separator"
|
|
||||||
local show_text="#[fg=$background,bg=$color]$text"
|
|
||||||
|
|
||||||
if [ "$status_connect_separator" = "yes" ]; then
|
|
||||||
local show_left_separator="#[fg=$color,bg=$thm_bg,nobold,nounderscore,noitalics]$window_left_separator"
|
|
||||||
local show_right_separator="#[fg=$color,bg=$thm_bg]$window_right_separator"
|
|
||||||
|
|
||||||
else
|
|
||||||
local show_left_separator="#[fg=$color,bg=default,nobold,nounderscore,noitalics]$window_left_separator"
|
|
||||||
local show_right_separator="#[fg=$color,bg=default]$window_right_separator"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$fill" = "number" ]; then
|
|
||||||
local show_number="#[fg=$background,bg=$color]$number"
|
|
||||||
local show_middle_separator="#[fg=$color,bg=$background,nobold,nounderscore,noitalics]$window_middle_separator"
|
|
||||||
local show_text="#[fg=$thm_fg,bg=$background]$text"
|
|
||||||
|
|
||||||
if [ "$window_number_position" = "right" ]; then
|
|
||||||
if [ "$status_connect_separator" = "yes" ]; then
|
|
||||||
local show_left_separator="#[fg=$background,bg=$thm_bg,nobold,nounderscore,noitalics]$window_left_separator"
|
|
||||||
local show_right_separator="#[fg=$color,bg=$thm_bg]$window_right_separator"
|
|
||||||
|
|
||||||
else
|
|
||||||
local show_left_separator="#[fg=$background,bg=default,nobold,nounderscore,noitalics]$window_left_separator"
|
|
||||||
local show_right_separator="#[fg=$color,bg=default]$window_right_separator"
|
|
||||||
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$window_number_position" = "left" ]; then
|
|
||||||
if [ "$status_connect_separator" = "yes" ]; then
|
|
||||||
local show_right_separator="#[fg=$background,bg=$thm_bg,nobold,nounderscore,noitalics]$window_right_separator"
|
|
||||||
local show_left_separator="#[fg=$color,bg=$thm_bg]$window_left_separator"
|
|
||||||
|
|
||||||
else
|
|
||||||
local show_right_separator="#[fg=$background,bg=default,nobold,nounderscore,noitalics]$window_right_separator"
|
|
||||||
local show_left_separator="#[fg=$color,bg=default]$window_left_separator"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
local final_window_format
|
|
||||||
|
|
||||||
if [ "$window_number_position" = "right" ]; then
|
|
||||||
final_window_format="$show_left_separator$show_text$show_middle_separator$show_number$show_right_separator"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$window_number_position" = "left" ]; then
|
|
||||||
final_window_format="$show_left_separator$show_number$show_middle_separator$show_text$show_right_separator"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$final_window_format"
|
|
||||||
}
|
|
||||||
|
|
||||||
build_window_icon() {
|
|
||||||
local window_status_icon_enable custom_icon_window_last \
|
|
||||||
custom_icon_window_zoom custom_icon_window_mark custom_icon_window_mark \
|
|
||||||
custom_icon_window_silent custom_icon_window_activity custom_icon_window_bell
|
|
||||||
|
|
||||||
window_status_icon_enable=$(get_tmux_option "@catppuccin_window_status_icon_enable" "yes")
|
|
||||||
custom_icon_window_last=$(get_tmux_option "@catppuccin_icon_window_last" "")
|
|
||||||
custom_icon_window_current=$(get_tmux_option "@catppuccin_icon_window_current" "")
|
|
||||||
custom_icon_window_zoom=$(get_tmux_option "@catppuccin_icon_window_zoom" "")
|
|
||||||
custom_icon_window_mark=$(get_tmux_option "@catppuccin_icon_window_mark" "")
|
|
||||||
custom_icon_window_silent=$(get_tmux_option "@catppuccin_icon_window_silent" "")
|
|
||||||
custom_icon_window_activity=$(get_tmux_option "@catppuccin_icon_window_activity" "")
|
|
||||||
custom_icon_window_bell=$(get_tmux_option "@catppuccin_icon_window_bell" "")
|
|
||||||
|
|
||||||
if [ "$window_status_icon_enable" = "yes" ]; then
|
|
||||||
# #!~[*-]MZ
|
|
||||||
local show_window_status=""
|
|
||||||
show_window_status+="#{?window_activity_flag, ${custom_icon_window_activity},}"
|
|
||||||
show_window_status+="#{?window_bell_flag, ${custom_icon_window_bell},}"
|
|
||||||
show_window_status+="#{?window_silence_flag, ${custom_icon_window_silent},}"
|
|
||||||
show_window_status+="#{?window_active, ${custom_icon_window_current},}"
|
|
||||||
show_window_status+="#{?window_last_flag, ${custom_icon_window_last},}"
|
|
||||||
show_window_status+="#{?window_marked_flag, ${custom_icon_window_mark},}"
|
|
||||||
show_window_status+="#{?window_zoomed_flag, ${custom_icon_window_zoom},}"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$window_status_icon_enable" = "no" ]; then
|
|
||||||
local show_window_status=" #F"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "$show_window_status"
|
|
||||||
}
|
|
||||||
@@ -1,164 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Set path of script
|
|
||||||
PLUGIN_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
||||||
|
|
||||||
# import
|
|
||||||
# shellcheck source=./builder/module_builder.sh
|
|
||||||
source "${PLUGIN_DIR}/builder/module_builder.sh"
|
|
||||||
# shellcheck source=./builder/window_builder.sh
|
|
||||||
source "${PLUGIN_DIR}/builder/window_builder.sh"
|
|
||||||
# shellcheck source=./builder/pane_builder.sh
|
|
||||||
source "${PLUGIN_DIR}/builder/pane_builder.sh"
|
|
||||||
# shellcheck source=./utils/tmux_utils.sh
|
|
||||||
source "${PLUGIN_DIR}/utils/tmux_utils.sh"
|
|
||||||
# shellcheck source=./utils/interpolate_utils.sh
|
|
||||||
source "${PLUGIN_DIR}/utils/interpolate_utils.sh"
|
|
||||||
# shellcheck source=./utils/module_utils.sh
|
|
||||||
source "${PLUGIN_DIR}/utils/module_utils.sh"
|
|
||||||
|
|
||||||
main() {
|
|
||||||
# Aggregate all commands in one array
|
|
||||||
local tmux_commands=()
|
|
||||||
|
|
||||||
# module directories
|
|
||||||
local custom_path modules_custom_path modules_status_path modules_window_path modules_pane_path
|
|
||||||
custom_path="$(get_tmux_option "@catppuccin_custom_plugin_dir" "${PLUGIN_DIR}/custom")"
|
|
||||||
modules_custom_path=$custom_path
|
|
||||||
modules_status_path=$PLUGIN_DIR/status
|
|
||||||
modules_window_path=$PLUGIN_DIR/window
|
|
||||||
modules_pane_path=$PLUGIN_DIR/pane
|
|
||||||
|
|
||||||
# load local theme
|
|
||||||
local theme
|
|
||||||
local color_interpolation=()
|
|
||||||
local color_values=()
|
|
||||||
local temp
|
|
||||||
theme="$(get_tmux_option "@catppuccin_flavour" "mocha")"
|
|
||||||
# NOTE: Pulling in the selected theme by the theme that's being set as local
|
|
||||||
# variables.
|
|
||||||
# https://github.com/dylanaraps/pure-sh-bible#parsing-a-keyval-file
|
|
||||||
# shellcheck source=./catppuccin-frappe.tmuxtheme
|
|
||||||
while IFS='=' read -r key val; do
|
|
||||||
# Skip over lines containing comments.
|
|
||||||
# (Lines starting with '#').
|
|
||||||
[ "${key##\#*}" ] || continue
|
|
||||||
|
|
||||||
# '$key' stores the key.
|
|
||||||
# '$val' stores the value.
|
|
||||||
eval "local $key"="$val"
|
|
||||||
|
|
||||||
# TODO: Find a better way to strip the quotes from `$val`
|
|
||||||
temp="${val%\"}"
|
|
||||||
temp="${temp#\"}"
|
|
||||||
color_interpolation+=("\#{$key}")
|
|
||||||
color_values+=("${temp}")
|
|
||||||
done <"${PLUGIN_DIR}/themes/catppuccin_${theme}.tmuxtheme"
|
|
||||||
|
|
||||||
# status general
|
|
||||||
local status_default status_justify status_background message_background
|
|
||||||
status_default=$(get_tmux_option "@catppuccin_status_default" "on")
|
|
||||||
# shellcheck disable=SC2121
|
|
||||||
set status "$status_default"
|
|
||||||
|
|
||||||
status_justify=$(get_tmux_option "@catppuccin_status_justify" "left")
|
|
||||||
set status-justify "$status_justify"
|
|
||||||
|
|
||||||
status_background=$(get_tmux_option "@catppuccin_status_background" "theme")
|
|
||||||
if [ "${status_background}" = "theme" ]; then
|
|
||||||
set status-bg "${thm_bg}"
|
|
||||||
message_background="${thm_gray}"
|
|
||||||
else
|
|
||||||
if [ "${status_background}" = "default" ]; then
|
|
||||||
set status-style bg=default
|
|
||||||
message_background="default"
|
|
||||||
else
|
|
||||||
message_background="$(do_color_interpolation "$status_background")"
|
|
||||||
set status-bg "${message_background}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
set status-left-length "100"
|
|
||||||
set status-right-length "100"
|
|
||||||
|
|
||||||
# messages
|
|
||||||
set message-style "fg=${thm_cyan},bg=${message_background},align=centre"
|
|
||||||
set message-command-style "fg=${thm_cyan},bg=${message_background},align=centre"
|
|
||||||
|
|
||||||
# menu
|
|
||||||
local menu_style menu_selected_style menu_border_style
|
|
||||||
menu_style=$(get_interpolated_tmux_option "@catppuccin_menu_style" "default")
|
|
||||||
menu_selected_style=$(get_interpolated_tmux_option "@catppuccin_menu_selected_style" "fg=${thm_gray},bg=${thm_yellow}")
|
|
||||||
menu_border_style=$(get_interpolated_tmux_option "@catppuccin_menu_border_style" "default")
|
|
||||||
set menu-style "$menu_style"
|
|
||||||
set menu-selected-style "$menu_selected_style"
|
|
||||||
set menu-border-style "$menu_border_style"
|
|
||||||
|
|
||||||
# panes
|
|
||||||
local pane_border_status pane_border_style \
|
|
||||||
pane_active_border_style pane_left_separator pane_middle_separator \
|
|
||||||
pane_right_separator pane_number_position pane_format
|
|
||||||
pane_status_enable=$(get_tmux_option "@catppuccin_pane_status_enabled" "no") # yes
|
|
||||||
pane_border_status=$(get_tmux_option "@catppuccin_pane_border_status" "off") # bottom
|
|
||||||
pane_border_style=$(
|
|
||||||
get_interpolated_tmux_option "@catppuccin_pane_border_style" "fg=${thm_gray}"
|
|
||||||
)
|
|
||||||
pane_active_border_style=$(
|
|
||||||
get_interpolated_tmux_option "@catppuccin_pane_active_border_style" \
|
|
||||||
"#{?pane_in_mode,fg=${thm_yellow},#{?pane_synchronized,fg=${thm_magenta},fg=${thm_orange}}}"
|
|
||||||
)
|
|
||||||
pane_left_separator=$(get_tmux_option "@catppuccin_pane_left_separator" "█")
|
|
||||||
pane_middle_separator=$(get_tmux_option "@catppuccin_pane_middle_separator" "█")
|
|
||||||
pane_right_separator=$(get_tmux_option "@catppuccin_pane_right_separator" "█")
|
|
||||||
pane_number_position=$(get_tmux_option "@catppuccin_pane_number_position" "left") # right, left
|
|
||||||
pane_format=$(load_modules "pane_default_format" "$modules_custom_path" "$modules_pane_path")
|
|
||||||
|
|
||||||
setw pane-border-status "$pane_border_status"
|
|
||||||
setw pane-active-border-style "$pane_active_border_style"
|
|
||||||
setw pane-border-style "$pane_border_style"
|
|
||||||
setw pane-border-format "$(do_color_interpolation "$pane_format")"
|
|
||||||
|
|
||||||
# window
|
|
||||||
local window_status_separator window_left_separator window_right_separator \
|
|
||||||
window_middle_separator window_number_position window_status_enable \
|
|
||||||
window_format window_current_format
|
|
||||||
|
|
||||||
window_status_separator=$(get_interpolated_tmux_option "@catppuccin_window_separator" "")
|
|
||||||
setw window-status-separator "$window_status_separator"
|
|
||||||
|
|
||||||
window_left_separator=$(get_tmux_option "@catppuccin_window_left_separator" "█")
|
|
||||||
window_right_separator=$(get_tmux_option "@catppuccin_window_right_separator" "█")
|
|
||||||
window_middle_separator=$(get_tmux_option "@catppuccin_window_middle_separator" "█ ")
|
|
||||||
window_number_position=$(get_tmux_option "@catppuccin_window_number_position" "left") # right, left
|
|
||||||
window_status_enable=$(get_tmux_option "@catppuccin_window_status_enable" "no") # right, left
|
|
||||||
|
|
||||||
window_format=$(load_modules "window_default_format" "$modules_custom_path" "$modules_window_path")
|
|
||||||
setw window-status-format "$(do_color_interpolation "$window_format")"
|
|
||||||
|
|
||||||
window_current_format=$(load_modules "window_current_format" "$modules_custom_path" "$modules_window_path")
|
|
||||||
setw window-status-current-format "$(do_color_interpolation "$window_current_format")"
|
|
||||||
|
|
||||||
# status module
|
|
||||||
local status_left_separator status_right_separator status_connect_separator \
|
|
||||||
status_fill status_modules_left status_modules_right
|
|
||||||
status_left_separator=$(get_tmux_option "@catppuccin_status_left_separator" "")
|
|
||||||
status_right_separator=$(get_tmux_option "@catppuccin_status_right_separator" "█")
|
|
||||||
status_connect_separator=$(get_tmux_option "@catppuccin_status_connect_separator" "yes")
|
|
||||||
status_fill=$(get_tmux_option "@catppuccin_status_fill" "icon")
|
|
||||||
|
|
||||||
status_modules_left=$(get_tmux_option "@catppuccin_status_modules_left" "")
|
|
||||||
loaded_modules_left=$(load_modules "$status_modules_left" "$modules_custom_path" "$modules_status_path")
|
|
||||||
set status-left "$(do_color_interpolation "$loaded_modules_left")"
|
|
||||||
|
|
||||||
status_modules_right=$(get_tmux_option "@catppuccin_status_modules_right" "application session")
|
|
||||||
loaded_modules_right=$(load_modules "$status_modules_right" "$modules_custom_path" "$modules_status_path")
|
|
||||||
set status-right "$(do_color_interpolation "$loaded_modules_right")"
|
|
||||||
|
|
||||||
# modes
|
|
||||||
setw clock-mode-colour "${thm_blue}"
|
|
||||||
setw mode-style "fg=${thm_pink} bg=${thm_black4} bold"
|
|
||||||
|
|
||||||
tmux "${tmux_commands[@]}"
|
|
||||||
}
|
|
||||||
|
|
||||||
main "$@"
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
show_pane_default_format() {
|
|
||||||
local number color background text fill
|
|
||||||
|
|
||||||
number="#{pane_index}"
|
|
||||||
color="$(get_tmux_option "@catppuccin_pane_color" "$thm_green")"
|
|
||||||
background="$(get_tmux_option "@catppuccin_pane_background_color" "$thm_gray")"
|
|
||||||
text="$(get_tmux_option "@catppuccin_pane_default_text" "#{b:pane_current_path}")"
|
|
||||||
fill="$(get_tmux_option "@catppuccin_pane_default_fill" "number")" # number, all, none
|
|
||||||
|
|
||||||
default_pane_format=$(build_pane_format "$number" "$color" "$background" "$text" "$fill")
|
|
||||||
|
|
||||||
echo "$default_pane_format"
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
||||||
"extends": [
|
|
||||||
"local>catppuccin/renovate-config"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
show_application() {
|
|
||||||
local index icon color text module
|
|
||||||
|
|
||||||
index=$1
|
|
||||||
icon=$(get_tmux_option "@catppuccin_application_icon" "")
|
|
||||||
color=$(get_tmux_option "@catppuccin_application_color" "$thm_pink")
|
|
||||||
text=$(get_tmux_option "@catppuccin_application_text" "#{pane_current_command}")
|
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
|
||||||
|
|
||||||
echo "$module"
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
show_battery() {
|
|
||||||
local index icon color text module
|
|
||||||
|
|
||||||
index=$1
|
|
||||||
icon=$(get_tmux_option "@catppuccin_battery_icon" "#{battery_icon}")
|
|
||||||
color=$(get_tmux_option "@catppuccin_battery_color" "$thm_yellow")
|
|
||||||
text=$(get_tmux_option "@catppuccin_battery_text" "#{battery_percentage}")
|
|
||||||
|
|
||||||
tmux set-option -g @batt_icon_charge_tier8 ''
|
|
||||||
tmux set-option -g @batt_icon_charge_tier7 ''
|
|
||||||
tmux set-option -g @batt_icon_charge_tier6 ''
|
|
||||||
tmux set-option -g @batt_icon_charge_tier5 ''
|
|
||||||
tmux set-option -g @batt_icon_charge_tier4 ''
|
|
||||||
tmux set-option -g @batt_icon_charge_tier3 ''
|
|
||||||
tmux set-option -g @batt_icon_charge_tier2 ''
|
|
||||||
tmux set-option -g @batt_icon_charge_tier1 ''
|
|
||||||
tmux set-option -g @batt_icon_status_charged ''
|
|
||||||
tmux set-option -g @batt_icon_status_charging ''
|
|
||||||
tmux set-option -g @batt_icon_status_discharging ''
|
|
||||||
tmux set-option -g @batt_icon_status_unknown ''
|
|
||||||
tmux set-option -g @batt_icon_status_attached ""
|
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
|
||||||
|
|
||||||
echo "$module"
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
# Requires https://github.com/vascomfnunes/tmux-clima
|
|
||||||
show_clima() {
|
|
||||||
local index icon color text module
|
|
||||||
|
|
||||||
index=$1
|
|
||||||
icon="$(get_tmux_option "@catppuccin_clima_icon" "")"
|
|
||||||
color="$(get_tmux_option "@catppuccin_clima_color" "$thm_yellow")"
|
|
||||||
text="$(get_tmux_option "@catppuccin_clima_text" "#{clima}")"
|
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
|
||||||
|
|
||||||
echo "$module"
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
show_cpu() {
|
|
||||||
local index icon color text module
|
|
||||||
|
|
||||||
index=$1
|
|
||||||
icon=$(get_tmux_option "@catppuccin_cpu_icon" "")
|
|
||||||
color="$(get_tmux_option "@catppuccin_cpu_color" "#{cpu_bg_color}")"
|
|
||||||
text="$(get_tmux_option "@catppuccin_cpu_text" "#{cpu_percentage}")"
|
|
||||||
|
|
||||||
tmux set-option -g @cpu_low_bg_color "$thm_yellow" # background color when cpu is low
|
|
||||||
tmux set-option -g @cpu_medium_bg_color "$thm_orange" # background color when cpu is medium
|
|
||||||
tmux set-option -g @cpu_high_bg_color "$thm_red" # background color when cpu is high
|
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
|
||||||
|
|
||||||
echo "$module"
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
show_date_time() {
|
|
||||||
local index icon color text module
|
|
||||||
|
|
||||||
index=$1
|
|
||||||
icon="$(get_tmux_option "@catppuccin_date_time_icon" "")"
|
|
||||||
color="$(get_tmux_option "@catppuccin_date_time_color" "$thm_blue")"
|
|
||||||
text="$(get_tmux_option "@catppuccin_date_time_text" "%Y-%m-%d %H:%M")"
|
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
|
||||||
|
|
||||||
echo "$module"
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
show_directory() {
|
|
||||||
local index icon color text module
|
|
||||||
|
|
||||||
index=$1
|
|
||||||
icon=$(get_tmux_option "@catppuccin_directory_icon" "")
|
|
||||||
color=$(get_tmux_option "@catppuccin_directory_color" "$thm_pink")
|
|
||||||
text=$(get_tmux_option "@catppuccin_directory_text" "#{b:pane_current_path}")
|
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
|
||||||
|
|
||||||
echo "$module"
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# Requires https://github.com/arl/gitmux
|
|
||||||
|
|
||||||
show_gitmux() {
|
|
||||||
local index icon color text module
|
|
||||||
|
|
||||||
index=$1
|
|
||||||
icon="$(get_tmux_option "@catppuccin_gitmux_icon" "")"
|
|
||||||
color="$(get_tmux_option "@catppuccin_gitmux_color" "$thm_green")"
|
|
||||||
text="$(get_tmux_option "@catppuccin_gitmux_text" "#(gitmux \"#{pane_current_path}\")")"
|
|
||||||
|
|
||||||
module=$( build_status_module "$index" "$icon" "$color" "$text" )
|
|
||||||
|
|
||||||
echo "$module"
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
show_host() {
|
|
||||||
local index icon color text module
|
|
||||||
|
|
||||||
index=$1
|
|
||||||
icon=$(get_tmux_option "@catppuccin_host_icon" "")
|
|
||||||
color=$(get_tmux_option "@catppuccin_host_color" "$thm_magenta")
|
|
||||||
text=$(get_tmux_option "@catppuccin_host_text" "#H")
|
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
|
||||||
|
|
||||||
echo "$module"
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
# Requires https://github.com/jonmosco/kube-tmux
|
|
||||||
|
|
||||||
show_kube() {
|
|
||||||
local index icon color text context_color namespace_color symbol_enabled module
|
|
||||||
|
|
||||||
index=$1
|
|
||||||
icon=$(get_tmux_option "@catppuccin_kube_icon" "")
|
|
||||||
color=$(get_tmux_option "@catppuccin_kube_color" "$thm_blue")
|
|
||||||
context_color=$(get_tmux_option "@catppuccin_kube_context_color" "#{thm_red}")
|
|
||||||
namespace_color=$(get_tmux_option "@catppuccin_kube_namespace_color" "#{thm_cyan}")
|
|
||||||
symbol_enabled=${KUBE_TMUX_SYMBOL_ENABLE:-false}
|
|
||||||
text=$(get_tmux_option "@catppuccin_kube_text" "#(KUBE_TMUX_SYMBOL_ENABLE=$symbol_enabled ${TMUX_PLUGIN_MANAGER_PATH}kube-tmux/kube.tmux 250 '$context_color' '$namespace_color')")
|
|
||||||
|
|
||||||
module=$( build_status_module "$index" "$icon" "$color" "$text" )
|
|
||||||
|
|
||||||
echo "$module"
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
show_load() {
|
|
||||||
local index icon color text module
|
|
||||||
|
|
||||||
index=$1
|
|
||||||
icon="$(get_tmux_option "@catppuccin_load_icon" "")"
|
|
||||||
color="$(get_tmux_option "@catppuccin_load_color" "$thm_blue")"
|
|
||||||
text="$(get_tmux_option "@catppuccin_load_text" "#{load_full}")"
|
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
|
||||||
|
|
||||||
echo "$module"
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# Requires https://github.com/olimorris/tmux-pomodoro-plus
|
|
||||||
|
|
||||||
show_pomodoro_plus() {
|
|
||||||
local index icon color text module
|
|
||||||
|
|
||||||
index=$1
|
|
||||||
icon="$( get_tmux_option "@catppuccin_pomodoro_plus_icon" "" )"
|
|
||||||
color="$( get_tmux_option "@catppuccin_pomodoro_plus_color" "$thm_orange" )"
|
|
||||||
text="$( get_tmux_option "@catppuccin_pomodoro_plus_text" "#{pomodoro_status}" )"
|
|
||||||
|
|
||||||
module=$( build_status_module "$index" "$icon" "$color" "$text" )
|
|
||||||
|
|
||||||
echo "$module"
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
show_session() {
|
|
||||||
local index icon color text module
|
|
||||||
|
|
||||||
index=$1
|
|
||||||
icon=$(get_tmux_option "@catppuccin_session_icon" "")
|
|
||||||
color=$(get_tmux_option "@catppuccin_session_color" "#{?client_prefix,$thm_red,$thm_green}")
|
|
||||||
text=$(get_tmux_option "@catppuccin_session_text" "#S")
|
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
|
||||||
|
|
||||||
echo "$module"
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
show_uptime() {
|
|
||||||
local index icon color text module
|
|
||||||
|
|
||||||
index=$1
|
|
||||||
icon="$(get_tmux_option "@catppuccin_uptime_icon" "")"
|
|
||||||
color="$(get_tmux_option "@catppuccin_uptime_color" "$thm_green")"
|
|
||||||
text="$(get_tmux_option "@catppuccin_uptime_text" "#(uptime | sed 's/^[^,]*up *//; s/, *[[:digit:]]* user.*//; s/ day.*, */d /; s/:/h /; s/ min//; s/$/m/')")"
|
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
|
||||||
|
|
||||||
echo "$module"
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
show_user() {
|
|
||||||
local index icon color text module
|
|
||||||
|
|
||||||
index=$1
|
|
||||||
icon=$(get_tmux_option "@catppuccin_user_icon" "")
|
|
||||||
color=$(get_tmux_option "@catppuccin_user_color" "$thm_cyan")
|
|
||||||
text=$(get_tmux_option "@catppuccin_user_text" "#(whoami)")
|
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
|
||||||
|
|
||||||
echo "$module"
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
# Requires https://github.com/xamut/tmux-weather.
|
|
||||||
|
|
||||||
show_weather() {
|
|
||||||
local index icon color text module
|
|
||||||
|
|
||||||
index=$1
|
|
||||||
icon="$(get_tmux_option "@catppuccin_weather_icon" "")"
|
|
||||||
color="$(get_tmux_option "@catppuccin_weather_color" "$thm_yellow")"
|
|
||||||
text="$(get_tmux_option "@catppuccin_weather_text" "#{weather}")"
|
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
|
||||||
|
|
||||||
echo "$module"
|
|
||||||
}
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
# NOTE: you can use vars with $<var> and ${<var>} as long as the str is double quoted: ""
|
|
||||||
# WARNING: hex colors can't contain capital letters
|
|
||||||
|
|
||||||
# --> Catppuccin (Frappe)
|
|
||||||
thm_bg="#303446"
|
|
||||||
thm_fg="#c6d0f5"
|
|
||||||
thm_cyan="#99d1db"
|
|
||||||
thm_black="#292c3c"
|
|
||||||
thm_gray="#414559"
|
|
||||||
thm_magenta="#ca9ee6"
|
|
||||||
thm_pink="#f4b8e4"
|
|
||||||
thm_red="#e78284"
|
|
||||||
thm_green="#a6d189"
|
|
||||||
thm_yellow="#e5c890"
|
|
||||||
thm_blue="#8caaee"
|
|
||||||
thm_orange="#ef9f76"
|
|
||||||
thm_black4="#626880"
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
# NOTE: you can use vars with $<var> and ${<var>} as long as the str is double quoted: ""
|
|
||||||
# WARNING: hex colors can't contain capital letters
|
|
||||||
|
|
||||||
# --> Catppuccin (Latte)
|
|
||||||
thm_bg="#eff1f5"
|
|
||||||
thm_fg="#4c4f69"
|
|
||||||
thm_cyan="#04a5e5"
|
|
||||||
thm_black="#e6e9ef"
|
|
||||||
thm_gray="#ccd0da"
|
|
||||||
thm_magenta="#8839ef"
|
|
||||||
thm_pink="#ea76cb"
|
|
||||||
thm_red="#d20f39"
|
|
||||||
thm_green="#40a02b"
|
|
||||||
thm_yellow="#df8e1d"
|
|
||||||
thm_blue="#1e66f5"
|
|
||||||
thm_orange="#fe640b"
|
|
||||||
thm_black4="#acb0be"
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
# NOTE: you can use vars with $<var> and ${<var>} as long as the str is double quoted: ""
|
|
||||||
# WARNING: hex colors can't contain capital letters
|
|
||||||
|
|
||||||
# --> Catppuccin (Macchiato)
|
|
||||||
thm_bg="#24273a"
|
|
||||||
thm_fg="#cad3f5"
|
|
||||||
thm_cyan="#91d7e3"
|
|
||||||
thm_black="#1e2030"
|
|
||||||
thm_gray="#363a4f"
|
|
||||||
thm_magenta="#c6a0f6"
|
|
||||||
thm_pink="#f5bde6"
|
|
||||||
thm_red="#ed8796"
|
|
||||||
thm_green="#a6da95"
|
|
||||||
thm_yellow="#eed49f"
|
|
||||||
thm_blue="#8aadf4"
|
|
||||||
thm_orange="#f5a97f"
|
|
||||||
thm_black4="#5b6078"
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
# NOTE: you can use vars with $<var> and ${<var>} as long as the str is double quoted: ""
|
|
||||||
# WARNING: hex colors can't contain capital letters
|
|
||||||
|
|
||||||
# --> Catppuccin (Mocha)
|
|
||||||
thm_bg="#1e1e2e"
|
|
||||||
thm_fg="#cdd6f4"
|
|
||||||
thm_cyan="#89dceb"
|
|
||||||
thm_black="#181825"
|
|
||||||
thm_gray="#313244"
|
|
||||||
thm_magenta="#cba6f7"
|
|
||||||
thm_pink="#f5c2e7"
|
|
||||||
thm_red="#f38ba8"
|
|
||||||
thm_green="#a6e3a1"
|
|
||||||
thm_yellow="#f9e2af"
|
|
||||||
thm_blue="#89b4fa"
|
|
||||||
thm_orange="#fab387"
|
|
||||||
thm_black4="#585b70"
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
---
|
|
||||||
whiskers:
|
|
||||||
version: "2.1.1"
|
|
||||||
matrix:
|
|
||||||
- flavor
|
|
||||||
filename: "themes/catppuccin_{{flavor.identifier}}.tmuxtheme"
|
|
||||||
---
|
|
||||||
{%- set palette = flavor.colors -%}
|
|
||||||
# NOTE: you can use vars with $<var> and ${<var>} as long as the str is double quoted: ""
|
|
||||||
# WARNING: hex colors can't contain capital letters
|
|
||||||
|
|
||||||
# --> Catppuccin ({{ flavor.identifier | capitalize }})
|
|
||||||
thm_bg="#{{ palette.base.hex | lower }}"
|
|
||||||
thm_fg="#{{ palette.text.hex | lower }}"
|
|
||||||
thm_cyan="#{{ palette.sky.hex| lower }}"
|
|
||||||
thm_black="#{{ palette.mantle.hex | lower }}"
|
|
||||||
thm_gray="#{{ palette.surface0.hex | lower }}"
|
|
||||||
thm_magenta="#{{ palette.mauve.hex | lower }}"
|
|
||||||
thm_pink="#{{ palette.pink.hex | lower }}"
|
|
||||||
thm_red="#{{ palette.red.hex | lower }}"
|
|
||||||
thm_green="#{{ palette.green.hex | lower }}"
|
|
||||||
thm_yellow="#{{ palette.yellow.hex | lower }}"
|
|
||||||
thm_blue="#{{ palette.blue.hex | lower }}"
|
|
||||||
thm_orange="#{{ palette.peach.hex | lower }}"
|
|
||||||
thm_black4="#{{ palette.surface2.hex | lower }}"
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
do_color_interpolation() {
|
|
||||||
local all_interpolated="$1"
|
|
||||||
|
|
||||||
for ((i=0; i<${#color_interpolation[@]}; i++)); do
|
|
||||||
all_interpolated=${all_interpolated//${color_interpolation[$i]}/${color_values[$i]}}
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "$all_interpolated"
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
load_modules() {
|
|
||||||
local modules_list=$1
|
|
||||||
shift
|
|
||||||
local module_directories=("$@")
|
|
||||||
|
|
||||||
local -i module_index=0;
|
|
||||||
local module_name
|
|
||||||
local module_path
|
|
||||||
local loaded_modules
|
|
||||||
local IN=$modules_list
|
|
||||||
|
|
||||||
# https://stackoverflow.com/questions/918886/how-do-i-split-a-string-on-a-delimiter-in-bash#15988793
|
|
||||||
while [ "$IN" != "$iter" ] ;do
|
|
||||||
# extract the substring from start of string up to delimiter.
|
|
||||||
iter=${IN%% *}
|
|
||||||
# delete this first "element" AND next separator, from $IN.
|
|
||||||
IN="${IN#"$iter "}"
|
|
||||||
# Print (or doing anything with) the first "element".
|
|
||||||
|
|
||||||
module_name=$iter
|
|
||||||
|
|
||||||
for module_dir in "${module_directories[@]}" ; do
|
|
||||||
module_path="$module_dir/$module_name.sh"
|
|
||||||
|
|
||||||
if [ -r "$module_path" ]; then
|
|
||||||
# shellcheck source=/dev/null
|
|
||||||
source "$module_path"
|
|
||||||
loaded_modules="$loaded_modules$( "show_$module_name" "$module_index" )"
|
|
||||||
module_index+=1
|
|
||||||
continue 2
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ -z "${module_name/ }" ]]; then
|
|
||||||
if [[ -z "${modules_list/ }" ]]; then
|
|
||||||
tmux_echo "catppuccin warning: a module list has only white space, to remove all modules set it to \"null\"" 100
|
|
||||||
else
|
|
||||||
tmux_echo "catppuccin warning: a module list with value \"$modules_list\" has leading/trailing whitespace" 101
|
|
||||||
fi
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
tmux_echo "catppuccin warning: module $module_name not found" 102
|
|
||||||
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "$loaded_modules"
|
|
||||||
}
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
tmux_echo() {
|
|
||||||
local hook
|
|
||||||
hook="after-new-session[$2]"
|
|
||||||
|
|
||||||
tmux set-hook -g "$hook" "run-shell 'echo \"$1\"'; set-hook -gu \"$hook\""
|
|
||||||
}
|
|
||||||
|
|
||||||
get_tmux_option() {
|
|
||||||
local option value default
|
|
||||||
option="$1"
|
|
||||||
default="$2"
|
|
||||||
value=$(tmux show-option -gqv "$option")
|
|
||||||
|
|
||||||
if [ -n "$value" ]
|
|
||||||
then
|
|
||||||
if [ "$value" = "null" ]
|
|
||||||
then
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
else
|
|
||||||
echo "$value"
|
|
||||||
fi
|
|
||||||
|
|
||||||
else
|
|
||||||
echo "$default"
|
|
||||||
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
get_interpolated_tmux_option() {
|
|
||||||
local option value default
|
|
||||||
option="$1"
|
|
||||||
default="$2"
|
|
||||||
value=$(tmux show-option -gqv "$option")
|
|
||||||
|
|
||||||
if [ -n "$value" ]
|
|
||||||
then
|
|
||||||
if [ "$value" = "null" ]
|
|
||||||
then
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
else
|
|
||||||
do_color_interpolation "$value"
|
|
||||||
fi
|
|
||||||
|
|
||||||
else
|
|
||||||
echo "$default"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
set() {
|
|
||||||
local option=$1
|
|
||||||
local value=$2
|
|
||||||
tmux_commands+=(set-option -gq "$option" "$value" ";")
|
|
||||||
}
|
|
||||||
|
|
||||||
setw() {
|
|
||||||
local option=$1
|
|
||||||
local value=$2
|
|
||||||
tmux_commands+=(set-window-option -gq "$option" "$value" ";")
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
show_window_current_format() {
|
|
||||||
local number color background text fill current_window_format
|
|
||||||
|
|
||||||
number="#I"
|
|
||||||
color=$(get_tmux_option "@catppuccin_window_current_color" "$thm_orange")
|
|
||||||
background=$(get_tmux_option "@catppuccin_window_current_background" "$thm_bg")
|
|
||||||
text="$(get_tmux_option "@catppuccin_window_current_text" "#{b:pane_current_path}")" # use #W for application instead of directory
|
|
||||||
fill="$(get_tmux_option "@catppuccin_window_current_fill" "number")" # number, all, none
|
|
||||||
|
|
||||||
current_window_format=$(build_window_format "$number" "$color" "$background" "$text" "$fill")
|
|
||||||
|
|
||||||
echo "$current_window_format"
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
show_window_default_format() {
|
|
||||||
local number color background text fill default_window_format
|
|
||||||
|
|
||||||
number="#I"
|
|
||||||
color=$(get_tmux_option "@catppuccin_window_default_color" "$thm_blue")
|
|
||||||
background=$(get_tmux_option "@catppuccin_window_default_background" "$thm_gray")
|
|
||||||
text="$(get_tmux_option "@catppuccin_window_default_text" "#{b:pane_current_path}")" # use #W for application instead of directory
|
|
||||||
fill="$(get_tmux_option "@catppuccin_window_default_fill" "number")" # number, all, none
|
|
||||||
|
|
||||||
default_window_format=$(build_window_format "$number" "$color" "$background" "$text" "$fill")
|
|
||||||
|
|
||||||
echo "$default_window_format"
|
|
||||||
}
|
|
||||||