https://github.com/rachartier/tiny-weather
https://github.com/rachartier/tiny-weather
tmux-plugins
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rachartier/tiny-weather
- Owner: rachartier
- Created: 2024-04-12T20:53:51.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-07T14:33:10.000Z (about 2 years ago)
- Last Synced: 2024-12-29T07:14:40.055Z (over 1 year ago)
- Topics: tmux-plugins
- Language: Shell
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# :cloud: tiny-weather
A tmux plugin to display weather information in your tmux status line.
Example:

With city:

## :rocket: Getting Started
You need to have a nerd font !
### :wrench: Installing Manually
1. Clone the repo to your local machine
```sh
git clone https://github.com/user/tiny-weather.git ~/.tmux/plugins/tiny-weather
```
2. Add the following line to the bottom of your `.tmux.conf`
```sh
run-shell ~/.tmux/plugins/tiny-weather/tinyweather.tmux
```
3. Reload TMUX environment
```sh
tmux source-file ~/.tmux.conf
```
### :package: Installing with TPM (Tmux Plugin Manager)
If you're using [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm), you can install tiny-weather with the following steps:
1. Add the following line to your `.tmux.conf` file:
```sh
set -g @plugin 'user/tiny-weather'
```
2. Press `prefix + I` ' to fetch and install tiny-weather.
### :gear: Configuration
You can customize the behavior of tiny-weather by setting the following options in your `.tmux.conf` file:
- `@tinyweather-language` - Language of the weather forecast. Default is "en".
- `@tinyweather-location` - Location for the weather forecast. Default is empty.
- `@tinyweather-cache-duration` - Duration of the cache in seconds. Default is 0 (cache disabled).
- `@tinyweather-cache-path` - Path to store the cache data. Default is "/tmp/tiny-weather.cache".
- `@tinyweather-include-city` - Includes the city name (true/false). Default is false.
- `@tinyweather-char-limit` - Set a limit to the number of characters displayed. Default is 75.
For example, to set the language to French and the location to Paris, you would add the following lines to your `.tmux.conf`:
```sh
set -g @tinyweather-language "fr"
set -g @tinyweather-location "Paris"
```
You can also customize the colors of the weather display by setting the following options in your `.tmux.conf` file:
- `@tinyweather-color-sunny` - Color for sunny weather. Default is yellow.
- `@tinyweather-color-snowy` - Color for snowy weather. Default is white.
- `@tinyweather-color-cloudy` - Color for cloudy weather. Default is foreground color.
- `@tinyweather-color-stormy` - Color for stormy weather. Default is orange.
- `@tinyweather-color-rainny` - Color for rainy weather. Default is blue.
- `@tinyweather-color-default` - Default color. Default is foreground color.
For example, you would add the following lines to your `.tmux.conf`:
```sh
set -g @tinyweather-color-sunny "#FFFF00"
set -g @tinyweather-color-rainny"#0000FF"
```
Now you can set the status:
```sh
set -g status-right "#{tinyweather}"
```
## :computer: Usage
Once installed and configured, tiny-weather will automatically display weather information in your tmux status line. The weather information is updated according to the cache duration you set.