Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(theme): Add support for transparent Statusbar #105

Merged
merged 5 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ set -g @plugin "janoamaral/tokyo-night-tmux"

## Configuration

### Themes

Use following option to change theme preference:

```bash
set -g @tokyo-night-tmux_theme storm # storm | day | default to 'night'
set -g @tokyo-night-tmux_transparent 1 # 1 or 0
```

### Number styles

Run these commands in your terminal:
Expand Down
1 change: 0 additions & 1 deletion src/battery-widget.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ battery_exists() {

# Exit if no battery is found
if ! battery_exists; then
echo "#[fg=green,bg=default]░ ${NOT_CHARGING_ICON}${RESET}#[bg=default]"
exit 0
fi

Expand Down
6 changes: 6 additions & 0 deletions src/themes.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

SELECTED_THEME="$(tmux show-option -gv @tokyo-night-tmux_theme)"
TRANSPARENT_THEME="$(tmux show-option -gv @tokyo-night-tmux_transparent)"

case $SELECTED_THEME in
"storm")
Expand Down Expand Up @@ -77,6 +78,11 @@ case $SELECTED_THEME in
;;
esac

# Override background with "default" if transparent theme is enabled
if [ "${TRANSPARENT_THEME}" == 1 ]; then
THEME["background"]="default"
fi

THEME['ghgreen']="#3fb950"
THEME['ghmagenta']="#A371F7"
THEME['ghred']="#d73a4a"
Expand Down
Loading