Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tardunge/tmux-gh
Tmux plugin to fetch the github helper profile. Displays, the currently actively authenticated git username.
https://github.com/tardunge/tmux-gh
Last synced: 2 months ago
JSON representation
Tmux plugin to fetch the github helper profile. Displays, the currently actively authenticated git username.
- Host: GitHub
- URL: https://github.com/tardunge/tmux-gh
- Owner: tardunge
- License: mit
- Created: 2024-08-07T06:24:16.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-08-07T09:45:21.000Z (6 months ago)
- Last Synced: 2024-08-13T13:33:23.643Z (6 months ago)
- Language: Shell
- Size: 13.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tmux - tmux-gh - Tmux plugin to fetch the github helper profile. Displays, the currently actively authenticated git username. (Plugins)
README
# tmux-gh
Tmux plugin to fetch the github profile. Displays, the currently authenticated git username.![demo](assets/tmux-gh-demo.png)
# Features
- Adds github username to the status line.# Installation
If you are using `gh` cli to manage your github.com or affliated github accounts and switch between them, then this plugin shows the currently active account in the tmux status line.
## Requirements
- [`gh`](https://cli.github.com/)
**Note:** Please use this command to check whether tmux is able to find `gh`: `tmux run-shell -b 'command -v gh && echo "gh is available" || echo "gh is not available"'`
## Install via [TPM](https://github.com/tmux-plugins/tpm/)
Add this line to your `~/.tmux.conf`
```tmux
set -g @plugin 'tardunge/tmux-gh'
```Reload configuration, then press `prefix` + `I` to install plugin.
# Usage
For rendering the current active gh account:
```tmux
# in .tmux.conf
set-option -g status-right '#{tmux_gh_uname}'# incase you are using powerlevel10k theme.
# set your desired area with the place-holder #{tmux_gh_uname}set-option -g @themepack-status-right-area-right-format "#{tmux_gh_uname}"
```You can switch your github profile as usual using
```zsh
gh auth switch
```
Now, the username should be automatically changed in the status-line.# Customization
Here are available options with their default values:
```tmux
# in .tmux.conf
set-option -g @tmux_gh_icon "" # defaults to "Github:"
set-option -g @tmux_gh_default_uname "tardunge" # defaults to "tmux-gh-uname"
```# License
[MIT](https://github.com/tardunge/tmux-gh/blob/main/LICENSE)