Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adriankarlen/bar.wezterm
A wezterm tab bar with batteries included
https://github.com/adriankarlen/bar.wezterm
multiplexing rice ricing shell terminal unix wezterm windows
Last synced: about 2 hours ago
JSON representation
A wezterm tab bar with batteries included
- Host: GitHub
- URL: https://github.com/adriankarlen/bar.wezterm
- Owner: adriankarlen
- License: mit
- Created: 2024-05-08T07:25:20.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-01-09T21:48:06.000Z (8 days ago)
- Last Synced: 2025-01-09T22:44:43.566Z (8 days ago)
- Topics: multiplexing, rice, ricing, shell, terminal, unix, wezterm, windows
- Language: Lua
- Homepage:
- Size: 1.98 MB
- Stars: 93
- Watchers: 3
- Forks: 17
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# πΊ bar.wezterm
A tab bar configuration for wezterm, this configuration is heavily inspired by [rose-pine/tmux](https://github.com/rose-pine/tmux).
## π·
![image](https://raw.githubusercontent.com/adriankarlen/bar.wezterm/main/misc/preview.png)
### π· RosΓ© Pine
![image](https://raw.githubusercontent.com/adriankarlen/bar.wezterm/main/misc/rose-pine.png)
### πΈ Catppuccin Mocha
![image](https://raw.githubusercontent.com/adriankarlen/bar.wezterm/main/misc/catppuccin-mocha.png)
Β## π Prerequisites
### π΅Spotify
In order for the spotify integration to work you need to have [spotify-tui](https://github.com/Rigellute/spotify-tui) installed on you system. Follow their installation instructions on how to set it up.
> [!NOTE]
> bar.wezterm ships with this module disabled, please check example in
> [Configuration](#%EF%B8%8F-configuration) on how to enable it.Β
## π Installation
This is a wezterm [plugin](https://github.com/wez/wezterm/commit/e4ae8a844d8feaa43e1de34c5cc8b4f07ce525dd). It can be installed by importing the repo and calling the apply_to_config-function. It is important that the `apply_to_config`-function is called after `color_scheme` has been set.
```lua
local bar = wezterm.plugin.require("https://github.com/adriankarlen/bar.wezterm")
bar.apply_to_config(config)
```> [!NOTE]
> This assumes that you have imported the wezterm module and initialized the config-object.Β
## π οΈ Configuration
The `apply_to_config`-function takes a second param `opts`. To override any options simply pass a table of the desired changes.
```lua
-- example enable spotify module
bar.apply_to_config(
config,
{
modules = {
spotify = {
enabled = true,
},
},
}
)
```### π Default configuration
> [!IMPORTANT]
> The default config requires that you are using a Nerd Font or has "Symbols Nerd Font" installed on your system so wezterm can default to it.```lua
local config = {
position = "bottom",
max_width = 32,
padding = {
left = 1,
right = 1,
},
separator = {
space = 1,
left_icon = wez.nerdfonts.fa_long_arrow_right,
right_icon = wez.nerdfonts.fa_long_arrow_left,
field_icon = wez.nerdfonts.indent_line,
},
modules = {
tabs = {
active_tab_fg = 4,
inactive_tab_fg = 6,
},
workspace = {
enabled = true,
icon = wez.nerdfonts.cod_window,
color = 8,
},
leader = {
enabled = true,
icon = wez.nerdfonts.oct_rocket,
color = 2,
},
pane = {
enabled = true,
icon = wez.nerdfonts.cod_multiple_windows,
color = 7,
},
username = {
enabled = true,
icon = wez.nerdfonts.fa_user,
color = 6,
},
hostname = {
enabled = true,
icon = wez.nerdfonts.cod_server,
color = 8,
},
clock = {
enabled = true,
icon = wez.nerdfonts.md_calendar_clock,
color = 5,
},
cwd = {
enabled = true,
icon = wez.nerdfonts.oct_file_directory,
color = 7,
},
spotify = {
enabled = false,
icon = wez.nerdfonts.fa_spotify,
color = 3,
max_width = 64,
throttle = 15,
},
},
}
```### π¨ Colors
Every ansi color used is configurable, to change a color, pass in the desired
ansi code to use for a specific setting.If you want to change any other color used, since the plugin uses your themes colors you can configure the theme to get a different result. For instance, if I want to change the active tab background color I can do so like this:
```lua
return {
-- ... your existing config
colors = {
tab_bar = {
active_tab = {
bg_color = "#26233a"
}
}
}
}
```#### ποΈ Color table
| Color option | Default |
| ------------------------------- | ------------- |
| `tab_bar.background` | `transparent` |
| `tab_bar.active_tab.bg_color` | `transparent` |
| `tab_bar.inactive_tab.bg_color` | `transparent` |## π License
This project is licensed under the MIT License - see the
[LICENSE](https://github.com/adriankarlen/bar.wezterm/blob/main/LICENSE) file