tmux2k/README.md
2024-03-17 08:42:12 +05:30

196 lines
7 KiB
Markdown

<div align = "center">
<h1><a href="https://2kabhishek.github.io/tmux2k">tmux2k</a></h1>
<a href="https://github.com/2KAbhishek/tmux2k/blob/main/LICENSE">
<img alt="License" src="https://img.shields.io/github/license/2kabhishek/tmux2k?style=flat&color=eee&label="> </a>
<a href="https://github.com/2KAbhishek/tmux2k/graphs/contributors">
<img alt="People" src="https://img.shields.io/github/contributors/2kabhishek/tmux2k?style=flat&color=ffaaf2&label=People"> </a>
<a href="https://github.com/2KAbhishek/tmux2k/stargazers">
<img alt="Stars" src="https://img.shields.io/github/stars/2kabhishek/tmux2k?style=flat&color=98c379&label=Stars"></a>
<a href="https://github.com/2KAbhishek/tmux2k/network/members">
<img alt="Forks" src="https://img.shields.io/github/forks/2kabhishek/tmux2k?style=flat&color=66a8e0&label=Forks"> </a>
<a href="https://github.com/2KAbhishek/tmux2k/watchers">
<img alt="Watches" src="https://img.shields.io/github/watchers/2kabhishek/tmux2k?style=flat&color=f5d08b&label=Watches"> </a>
<a href="https://github.com/2KAbhishek/tmux2k/pulse">
<img alt="Last Updated" src="https://img.shields.io/github/last-commit/2kabhishek/tmux2k?style=flat&color=e06c75&label="> </a>
<h3>Power & Pizzazz for tmux 🥊💅</h3>
<figure>
<img src= "images/screenshot-full.png" alt="tmux2k Demo">
<br/>
<figcaption>tmux2k full screenshot</figcaption>
</figure>
<figure>
<img src= "images/screenshot.png" alt="tmux2k Demo">
<br/>
<figcaption>tmux2k statusbar screenshot</figcaption>
</figure>
</div>
tmux2k is a highly customizable framework designed to enhance your tmux status bar, providing you with a sleek and informative interface for your terminal sessions.
## ✨ Features
- **Enhanced Aesthetics**: Prettify your tmux setup with a stylish and modern status bar.
- **Informative Display**: Gain access to all the essential information you need right on your status bar, including system stats, git branch, weather updates, and more.
- **Plugin Ecosystem**: Comes with a wide array of plugins to tailor your status bar to your specific needs, covering everything from system monitoring to version control integration.
- **Ease of Customization**: Customize and extend tmux2k effortlessly, thanks to its intuitive configuration options and flexible architecture.
- **Dynamic Updates**: Enjoy real-time updates and dynamic content rendering for a seamless and responsive user experience.
### 🧩 Available Plugins
- `battery`: Show battery stats and percentage
- `git`: Show Git branch and status information
- `cpu`: Show CPU usage information
- `gpu`: Show GPU usage information
- `ram`: Show RAM usage information
- `network`: Show network status and statistics
- `bandwidth`: Show network bandwidth usage
- `ping`: Show network ping statistics
- `time`: Show current time and date
- `weather`: Show weather information
### 🪆 Add New Plugins
To add a new plugin, add a script to the [scripts](./scripts) folder that prints something to the console.
> The plugin name and script file name must match e.g: plugin named `foo` should have a file called `scripts/foo.sh`
## ⚡ Setup
### ⚙️ Requirements
Before you begin, ensure you have met the following requirements:
- You have installed the latest version of `tmux`.
- [tpm](https://github.com/tmux-plugins/tpm) for managing `tmux` plugins.
- A [patched nerd font](https://www.nerdfonts.com/) for `powerline` and glyphs support.
### 💻 Installation
If you are a `tpm` user, you can install the theme and keep up to date by adding the following to your `.tmux.conf` file:
```bash
set -g @plugin '2kabhishek/tmux2k'
```
- Run `tmux`
- Use the `tpm` install command: prefix + I (default prefix is `ctrl+b`)
You can also directly clone the repo to your `~/.tmux/plugins/` folder.
## 🚀 Usage
tmux2k to should automatically start after installation. Here's how you can customize it's features
```bash
# Left and right status bar plugins
set -g @tmux2k-left-plugins "git cpu ram"
set -g @tmux2k-right-plugins "battery network time"
#
set -g @tmux2k-show-fahrenheit false
set -g @tmux2k-military-time true
# it can accept `session`, 'window`, or any string
set -g @tmux2k-start-icon ""
# network interface to watch
set -g @tmux2k-network-name "wlo1"
# update powerline symbols
set -g @tmux2k-right-sep  # alternate right status bar sep
set -g @tmux2k-win-right-sep  # alternate window right sep
set -g @tmux2k-show-powerline false # disable powerline
# change refresh rate
set -g @tmux2k-refresh-rate 5
# to customize colors
set -g @tmux2k-text '#cdcdcd' # change text to white
set -g @tmux2k-bg-main '#ffffff' # change bg to white
set -g @tmux2k-yellow '#f8c800' # change yellow color
# to customize plugin colors
set -g @tmux2k-[plugin-name]-colors "[background] [foreground]"
set -g @tmux2k-cpu-colors "blue dark_gray"
```
> You may have to restart `tmux` for some changes to reflect
### 🎨 Colors
### Available Colors:
- `text`: Default text color. Default: `#282a36`
- `bg_main`: Background color for main sections. Default: `#15152a`
- `bg_alt`: Background color for alternate sections. Default: `#45455a`
- `black`: Black color. Default: `#0a0a0f`
- `white`: White color. Default: `#d5d5da`
- `red`: Red color. Default: `#ff001f`
- `light_red`: Light red color. Default: `#ff0055`
- `green`: Green color. Default: `#3dd50a`
- `light_green`: Light green color. Default: `#ccffcc`
- `blue`: Blue color. Default: `#1688f0`
- `light_blue`: Light blue color. Default: `#11dddd`
- `yellow`: Yellow color. Default: `#ffb86c`
- `light_yellow`: Light yellow color. Default: `#ffd21a`
- `purple`: Purple color. Default: `#bf58ff`
- `light_purple`: Light purple color. Default: `#ff65c6`
## 🏗️ What's Next
- [ ] Windows compatibility #8
- [ ] Theming support #9
## 🧑‍💻 Behind The Code
### 🌈 Inspiration
I came across [dracula/tmux](https://github.com/dracula/tmux) sometime back but it didn't have everything I wanted.
### 💡 Challenges/Learnings
- Learned a lot about the `tmux` and `tpm` ecosystem.
- Did some fancy shell scripting.
## What's next
### To-Do
You tell me!
### 🧰 Tooling
- [dots2k](https://github.com/2kabhishek/dots2k) — Dev Environment
- [nvim2k](https://github.com/2kabhishek/nvim2k) — Personalized Editor
- [sway2k](https://github.com/2kabhishek/sway2k) — Desktop Environment
- [qute2k](https://github.com/2kabhishek/qute2k) — Personalized Browser
### 🔍 More Info
- [tmux-tea](https://github.com/2kabhishek/tmux-tea) — Simple and powerful tmux session manager
- [tmux-tilit](https://github.com/2kabhishek/tmux-tilit) — Turns tmux into a terminal window manager
<div align="center">
<strong>⭐ hit the star button if you found this useful ⭐</strong><br>
<a href="https://github.com/2KAbhishek/tmux2k">Source</a>
| <a href="https://2kabhishek.github.io/blog" target="_blank">Blog </a>
| <a href="https://twitter.com/2kabhishek" target="_blank">Twitter </a>
| <a href="https://linkedin.com/in/2kabhishek" target="_blank">LinkedIn </a>
| <a href="https://2kabhishek.github.io/links" target="_blank">More Links </a>
| <a href="https://2kabhishek.github.io/projects" target="_blank">Other Projects </a>
</div>