Giter VIP home page Giter VIP logo

Comments (4)

augustfengd avatar augustfengd commented on September 15, 2024 5

I've been using a really dirty workaround for the last few months to get some custom status-right configuration. I haven't had any issues so far so I'm going to share it here for anyone to see.

Just some background information to understand the hack: the very bottom line run "~/.tmux/plugins/tpm/tpm" in the tmux.conf file is used to initiate the tmux plugins.

As such, I am emptying dracula's status-right with set -g @dracula-plugins " ", and I write my own personalized status-right configuration after the tmux plugin initializations.

image

For my status-right, I'm using the plugin kube-tmux to show my kubernetes configuration, and also some very hacky code to appropriately display either the local or remote hostname:

run '~/.tmux/plugins/tpm/tpm'
set-option -ga status-right "#[fg=#44475a,bg=#ffb86c] #(~/.tmux/plugins/kube-tmux/kube.tmux 250 black black) #[bg=#44475a,fg=#ffb86c] #{?#{!=:#{pane_current_command},ssh},#h,#(ps -t #{pane_tty} -oargs | awk -F@ '/ssh/ { print $2 #}')} "
# explanation for the what the f. is going on.
# #{?                                   // ? is an introduction to tmux's conditionals.
#   #{!=:#{pane_current_command},ssh},  // if #{pane_current_command} is ssh, returns 1, else 0. 
#   #h,                                 // #h is the hostname of the local host
#   #(ps \                              // use ps find the ssh process
#     --tty #{pane_tty}                 // list all processes attached to the pane's tty
#     -oargs \                          // show full cmdline in output
#       | awk \                         // get some awk in here.
#           -F@ \                       // split the cmdline by the '@' of the uri.
#           '/ssh/ { print $2 #}')}     // filter for commands with ssh, and print the hostname

from tmux.

danerwilliams avatar danerwilliams commented on September 15, 2024

Are you getting at the same idea as #43 ? Ideally we would like to make it so that each block in the status bar could be customized to whatever you like, in any order you like, with your own selection of dracula themed colors.

As for your specific desire to change the date format, you can always fork and edit scripts/dracula.sh to make it that format while we do not have further customization abilities built in to the project.

from tmux.

fernandoflorez avatar fernandoflorez commented on September 15, 2024

That would be great but in the meantime a workaround would be to have a property to disable the status override or to have every module do a -ga instead of starting clean. That way users could add their desired data on the left part and dracula could add it's on the right.

from tmux.

ethancedwards8 avatar ethancedwards8 commented on September 15, 2024

a property to disable the status override or to have every module do a -ga instead of starting clean. That way users could add their desired data on the left part and dracula could add it's on the right.

I think that's a good idea, to fix the date format a PR to add UK date format is pending.

If you have some idea on how to implement it and would like to submit a PR that'd be great!

from tmux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.