Code Monkey home page Code Monkey logo

tmux-ticker's Introduction

Tmux-Ticker

Status License

Status

Index

Getting Started

Ticker helps you keep track of various market indexes or a stock you would like to keep an eye out on.

Their percentage changes can be tracked as well.

This plugin also supports some of the top crypto currencies as well.

If you would like to track more cyrpto currencies with various different fiat currency support, use tux-crypto instead.

The data is fetched from Marketwatch. Currently only US Markets are supported.

Crypto Data is fetched from Cryptonator.

Supported Indexes:

  • Dow Jones Industrial Average -> DJI

    • #{ticker_dji}
    • #{ticker_dji_change}
  • NASDAQ Composite Index -> COMP

    • #{ticker_nasdaq}
    • #{ticker_nasdaq_change}
  • S&P 500 Index -> SPX

    • #{ticker_sp100}
    • #{ticker_sp100_change}
  • S&P 100 Index -> OEX

    • #{ticker_sp500}
    • #{ticker_sp500_change}
  • Any stock ticker can also be added.

    • #{ticker_stock}
  • Cryptocurrency ticker can also be added.

    • #{ticker_crypto}

Screenshots

Terminal and Tmux theme shown here is Lighthaus

Tmux Lighthaus theme coming soon

Requirements

  • TPM is the recommended method of installing this plugin
  • curl

Installation

Recommended method:

  • Add plugin to your TPM plugins in your .tmux.conf
    •   set -g @plugin 'Brutuski/tmux-ticker'
  • While inside a tmux session press prefix + I to reload and install the plugin.
  • Add the desired format strings to your status as such
    •   #{ticker_dji} #{ticker_stock}
  • Reload the tmux config and the changes should take effect.

Manual Installation:

  • Clone this repo
    •   git clone https://github.com/Brutuski/tmux-ticker.git  ~/.tmux/tmux-ticker
  • Add the following line to the bottom of your tmux config
    •   run-shell ~/.tmux/tmux-ticker/ticker.tmux
  • Save the file and reload your tmux session.

Usage

  • Change the following format string with the stock ticker
    •   set -g @ticker_stock "AAPL"
        #{ticker_stock}
  • Change the following format string with the crypto ticker
    •   set -g @ticker_crypto "BTC-USD"
        #{ticker_crypto}
  • Reload the tmux config and the changes should take effect.

Options

All available format strings

# Replace the name with the stock you would like to track.
set -g @ticker_stock "AAPL"
# You can also set styles for the ticker_stock based on stock movement direction
set -g @ticker_positive_style  "#[fg=#A7C080, bg=#414550]"
set -g @ticker_negative_style  "#[fg=#FF4858, bg=#414550]"
# Then use it in your status line
set -g status-left "......#[fg=#21252D,bg=#5AD1AA] #{ticker_nasdaq} ~ #{ticker_stock} ~ #{ticker_stock_change} "

Example

Format strings can be edited to what the user needs. fg and bg colors can be defined by the user.

set -g @ticker_stock "AAPL"

set -g status-left "......#[fg=#21252D,bg=#5AD1AA] #{ticker_nasdaq} ~ #{ticker_nasdaq_change} #{ticker_stock} "

Changelog

v 1.1.2

Changes can be tracked in the CHANGELOG

Issues

Please report any bugs or issues here.

License

MIT

Copyright (c) 2021 Adhiraj Sirohi

Logo Credit

Logo was made by Vasundhara Sharma https://www.behance.net/vasundhsharma https://keybase.io/vas_sharma

tmux-ticker's People

Contributors

brutuski avatar rphuber avatar shtirlic avatar tstachl avatar umop3plsdn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tmux-ticker's Issues

More than one stock?

I was elated to come across your tmux plugin, but there's just one problem.
It looks like I can only track ONE stock. But I have stock in more than one company.

Mop is another stock tracker, and you can track more than one stock. The file saves all your symbols to a file where they are separated by space.

What if you applied the same format as mop does, or alternatively what if you can use the same data from the file that mop stores its information from such that your app can source that information?

Get value of ticker_stock_change to use for conditional style

I'd love to have a way to get the value of the change to find out if it's positive or negative so I could use the info to style the ticker price color. Is this possible currently? I have tried using #{?ticker_stock_price>0} but that doesn't seem to actually work. is there a variable that I can use to determine the change direction? Thanks for the great plugin

How to debug?

Hi,

thanks for the plug-in. I installed and configured it following the instructions, but nothing has shown up. I set my status-left to tik#{ticker_dji}~#{ticker_dji_change}tik and it turns out to be tik~tik with no error message.

How can I access more information of the plug-in? such as log, etc.

It's maybe because of the proxy issue. but I'm not sure.

Thx

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.