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

[Idea] Maybe add an example with wtfutil? #8

Closed
GideonWolfe opened this issue May 22, 2020 · 4 comments
Closed

[Idea] Maybe add an example with wtfutil? #8

GideonWolfe opened this issue May 22, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@GideonWolfe
Copy link

wtfutil is an awesome utility that lets you create static terminal dashboards to fit your needs.

You can place different "widgets" in a desired arrangement. You could use the "command runner" agent to display the output of stonks commands in a dashboard format!

I did the same thing here.

@ericm
Copy link
Owner

ericm commented May 22, 2020

Good idea :)

@ericm ericm added enhancement New feature or request help wanted Extra attention is needed labels May 22, 2020
@GideonWolfe
Copy link
Author

Here is a sample config of wtfutil

wtf:
  colors:
    background: black
    border:
      focusable: darkslateblue
      focused: blue
      normal: gray
    checked: yellow
    highlight: 
      fore: black
      back: gray
    rows:
      even: yellow
      odd: white
  grid:
    # How _wide_ the columns are, in terminal characters. In this case we have
    # four columns, each of which are 35 characters wide.
    columns: [33, 33, 33]
    # How _high_ the rows are, in terminal lines. In this case we have four rows
    # that support ten line of text and one of four.
    rows: [20, 20, 20, 20, 20, 20, 20, 20]
  refreshInterval: 1
  
  mods:
    tech:
      type: cmdrunner
      args: ["tsla", "intc", "--theme", "dot"]
      cmd: "stonks"
      enabled: true
      position:
        top: 0
        left: 0
        height: 2
        width: 3
      refreshinterval: 30
      title: "🤖 Tech"
    financial:
      type: cmdrunner
      args: ["jpm", "v", "--theme", "dot"]
      cmd: "stonks"
      enabled: true
      position:
        top: 2
        left: 0
        height: 2
        width: 3
      refreshinterval: 30
      title: "💰 Financial"

It ends up looking like

stonks

While I was setting up stonks, I noticed that setting a "default value" for the line type does not work, hence why I launched with --theme dot.

Additionally, I suggest the config be moved to $HOME/.config/stonks/config.yml or something similar. This would allow multiple configurations to coexist without polluting the base $XDG_CONFIG directory.

@ericm
Copy link
Owner

ericm commented May 22, 2020

Thanks for the sample, I think I'll add something like that to the README. The issue with setting the default theme should have been fixed in the master branch if you want to try reinstall.

@ericm
Copy link
Owner

ericm commented May 23, 2020

https://github.com/ericm/stonks#usage-with-wtfutil

@ericm ericm removed the help wanted Extra attention is needed label May 23, 2020
@ericm ericm closed this as completed May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants