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

feature/ enhancement: custom start and end of tmux status bar options #306

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

druxorey
Copy link

Description

This pull request adds a new boolean option @dracula-show-edge-icons to the Dracula Theme plugin for tmux. This option allows the icons defined in the show_left_sep and show_right_sep variables to also be displayed at the beginning and end of the status bar.

@dracula-show-edge-icons = false
before

@dracula-show-edge-icons = true
after

Changes made:

  • Added the @dracula-show-edge-icons option with a default value of false.
  • Modified the status-left and status-right configurations to include edge icons when @dracula-show-edge-icons is enabled.

Issue resolved

This change resolves issue #217, where the option to display icons at the edges of the status bar was requested.

Usage example

To enable this option, add the following line to your tmux configuration file:

set -g @dracula-show-edge-icons true

@Theoreticallyhugo
Copy link
Collaborator

Heya @druxorey
thank you for your contribution, and please excuse the long silence. i've been trying your fork, and it works for the left icon, and windows, but for some reason the widgets on the right side don't change.
this is tested on fedora41, what did you test on?
also do you think you could implement this as an optional feature, instead of a bug?

@druxorey
Copy link
Author

druxorey commented Jan 4, 2025

Hi there @Theoreticallyhugo,

Thank you for your feedback and for testing the feature. I tried this feature with the plugins network-ping and tmux-ram-usage on Arch Linux. Could you please let me know which widgets you have activated on the right side so I can run the necessary tests?

Regarding the optional feature implementation, I will work on it shortly.

@druxorey druxorey changed the title fixes #217 enhancement: custom start and end of tmux status bar options feature #217 enhancement: custom start and end of tmux status bar options Jan 4, 2025
@druxorey druxorey changed the title feature #217 enhancement: custom start and end of tmux status bar options feature/ enhancement: custom start and end of tmux status bar options Jan 4, 2025
@Theoreticallyhugo
Copy link
Collaborator

Theoreticallyhugo commented Jan 14, 2025

Screenshot 2025-01-14 at 15 35 44 Screenshot 2025-01-14 at 15 44 30 Screenshot 2025-01-14 at 16 06 24

looks like i'm getting the same results on those systems i tested. I don't have arch at hand right now, but i could install and test it somewhere if that'd help you. if i can help you in any other way, let me know :D

@druxorey
Copy link
Author

druxorey commented Jan 15, 2025

@Theoreticallyhugo That's weird, can you check how you have configured your tmux.conf? Here I share how mine is configured so that you have a reference.

code

@Theoreticallyhugo
Copy link
Collaborator

the following is the config i use on my mac with tmux 3.5a

# remap prefix from 'C-b' to 'C-a'
unbind C-b
set -g prefix C-Space
bind C-Space send-prefix

bind r source-file ~/.config/tmux/tmux.conf

# paste with leader P

set -sa terminal-overrides ",xterm-256col*:Tc"
set -g default-terminal "xterm-256color"

# Plugin
# plugin manager
set -g @plugin 'tmux-plugins/tpm'

# Theming
set -g @plugin 'dracula/tmux'

set -g @dracula-show-left-icon "#h | #S"
# the default is 5, it can accept any number
set -g @dracula-refresh-rate 5
set -g @dracula-show-empty-plugins false
set -g @dracula-show-fahrenheit false
set -g @dracula-day-month true
set -g @dracula-military-time true
set -g @dracula-show-timezone false
set -g @dracula-show-powerline true
set -g @dracula-time-colors "light_purple dark_gray"
set -g @dracula-git-no-repo-message "󰊠 "
set -g @dracula-battery-label false
set -g @dracula-show-battery-status true
set -g @dracula-spotify-tui-max-len 30
set -g @dracula-network-vpn-verbose true
set -g @dracula-network-ethernet-label "󰈀 Eth"
set -g @dracula-network-offline-label "󱍢 "
set -g @dracula-network-wifi-label " "
set -g @dracula-network-hosts "1.1.1.1 8.8.8.8"
set -g @dracula-show-ssh-only-when-connected true
set -g @dracula-gpu-vram-percent false
set -g @dracula-gpu-vram-used-accuracy ".2f"
set -g @dracula-gpu-vram-total-accuracy ".1f"
set -g @dracula-gpu-power-percent false
set -g @dracula-gpu-power-label "󰢮 "
set -g @dracula-gpu-usage-label "󰢮 "
set -g @dracula-gpu-vram-label "󰢮 "
set -g @dracula-network-vpn-colors "orange dark_gray"
set -g @dracula-ram-usage-label " "
set -g @dracula-show-edge-icons true
set -g @dracula-colors "
# catppuccin Color Pallette
pink='#cba6f7' # replace pink
orange='#fab387' # replacing orange
yellow='#f9e2af' # replacing yellow
green='#a6e3a1' # replacing green
cyan='#89dceb' # replacing cyan
light_purple='#b4befe' # replacing light_purple
white='#cdd6f4' # replacing white
dark_gray='#313244' # replace dark_gray
red='#f38ba8'
gray='#45475a'
dark_purple='#6c7086'
"

set -g @dracula-plugins "git battery attached-clients time"
# set -g @dracula-plugins "ram-usage git battery spotify-tui network ssh-session network-vpn time"


set-option -g status-position top

# Installs TPM if absent.
if "test ! -d ~/.config/tmux/plugins/tpm" \
   "run 'git clone https://github.com/tmux-plugins/tpm ~/.config/tmux/plugins/tpm && ~/.config/tmux/plugins/tpm/bin/install_plugins'"

# Runs TPM
run '~/.config/tmux/plugins/tpm/tpm'

@Theoreticallyhugo
Copy link
Collaborator

with these settings applied

set -g @dracula-show-right-sep "A"
set -g @dracula-show-left-sep "B"
set -g @dracula-show-onverse-divider "C"
set -g @dracula-show-edge-icons true

i get As and Bs but not Cs. i dont know if this is relevant to you.
Screenshot 2025-01-21 at 22 30 41

@Theoreticallyhugo
Copy link
Collaborator

Theoreticallyhugo commented Jan 21, 2025

i found the culprit. it only works with set -g @dracula-show-empty-plugins true. if its set to false it wont work. and thats why i got the same behaviour on all my machines. i set the show-empty to false everywhere.

Screenshot 2025-01-21 at 23 31 11

looks kinda weird with empty plugins imo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants