Giter VIP home page Giter VIP logo

bullettrain-go-core's People

Contributors

devkanro avatar jtyr avatar vadviktor 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

Watchers

 avatar  avatar

bullettrain-go-core's Issues

Theme Support

I think it would be nice to offer support for some default color themes. Where a user can specify a theme and have some good-looking colors. Maybe support for solarized and nord out of the box along with any other popular themes out there.

Setup glide or another vendor system

It would be nice if you had glide or something similar setup for development to pull in dependencies. It would make it a lot easier to get a development environment going.

"can car render" evaluated sequential

Deciding which cars can be rendered is decided sequentially. Maybe it's slow as globbing of files is involved too. Need to investigate if this process needs speeding up.

Can `pwd` be executed only once?

Almost every car needs to know about the pwd value. Can it be moved into core and passed onto the cars so they won't need to run it themselves? Some cars may need it multiple times.

irc channel

How about we create an IRC channel on Freenode so we can talk in real time and work on this? I created #bullettrain if you want to meet me there or just /query gregf and we'll talk.

Support for extra design features

usage1

here we can see a ZSH prompt with

  • left and right prompts
  • custom coloured separators
  • custom coloured car icons
  • two line mode with custom chars used on the left to connect them (awesome!)

Dir car show only last bit of the path

The dir car should have a switch to show only the last bit of the path. For example if the path is /usr/share/apps the dir car should allow to show only apps.

Code of conduct

I have merely copied a Code of Conduct documentation which is widely popular in the open source space. Please feel free to have a look at it and suggest modifications, additions, fixes!

code_of_conduct.md

Background jobs car

If there are any number of background jobs, display the count number.

The hardest part is, that the current jobs are only visible to the current terminal session, that is the parent process of the new background ones.

Custom seperator for directory car

Allow the user to customize the separator for the directory car, so each directory can appear as a segment. Possibly enable this by default, I personally think it looks good from a ux stand point.

Segment separators and colours

Right now, my biggest design problem is: how to automate the separator colours at the end of the segments so they are properly coloured. Also how to be able to configure them through env variables, plain strings, whereas they are now types in Go. We'd need a system there that is not complicated. We can change 3rd party colour library or even write our own colouring system.

Any ideas and PRs are welcome.

Segments are hidden until a triggerring effect

Find out how to show the segment until their built in triggering effect kicks in.

If the design offers multiple trigger options, implement it that way to be able to choose from triggering effects (only one trigger can be active).

Max length in Dir car doesn't work as expected

I would expect that this configuration:

export BULLETTRAIN_CAR_DIRECTORY_MAX_LENGHT='1'
export BULLETTRAIN_CAR_DIRECTORY_DEPTH_INDICATOR=''
export BULLETTRAIN_CAR_DIRECTORY_PATH_SEPARATOR='/'
export BULLETTRAIN_CAR_DIRECTORY_FIRST_DIR_SHOW='false'

when in /usr/share/man/man3 will show only man3.

List of segments

Right now it is not too clear for me what Go construct to use to keep the defined segments in order, that is capable of reading the ordering also from a list of strings. Like in the original ZSH shell script version:

BULLETTRAIN_PROMPT_ORDER=(
        time
        custom
        context
        dir
        # perl
        ruby
        virtualenv
        # nvm
        # aws
        go
        # elixir
        git
        # hg
        status
        cmd_exec_time
)

We can enable segments and define their order. To avoid the need of recompiling the program all the time the user wants to make a slight change I more than likely see this ENV variable approach useful.

Let's elaborate on how we could solve this problem! :)

Licence

Simple question to discuss: under what licence do we create our code?

Give feedback on not found

For cars like python, nodejs, etc which try to execute a command line call and if the command does not exist, only the car's background is visible.
All these need to have a default text, like [_._._] displayed, or something. When debug mode is on (BULLETTRAIN_DEBUG=true), then kindly put the problem in the text, like command not found.

Building on FreeBSD

Hi,

Trying to get version of this built for my freebsd box, using zsh again so want to get back to using this great prompt.

I cloned the repo into my go path and ran dep ensure --update and I get the following error.

Solving failure: No versions of github.com/bullettrain-sh/bullettrain-go-git met constraints:
        v0.7: Could not introduce github.com/bullettrain-sh/[email protected], as it requires package github.com/bullettrain-sh/bullettrain-go-core/pkg/ansi from github.com/bullettrain-sh/bullettrain-go-core, but in version  that package is missing.
        v0.6: Could not introduce github.com/bullettrain-sh/[email protected], as it is not allowed by constraint ^0.7.0 from project github.com/bullettrain-sh/bullettrain-go-core.
        v0.5: Could not introduce github.com/bullettrain-sh/[email protected], as it is not allowed by constraint ^0.7.0 from project github.com/bullettrain-sh/bullettrain-go-core.
        master: Could not introduce github.com/bullettrain-sh/bullettrain-go-git@master, as it is not allowed by constraint ^0.7.0 from project github.com/bullettrain-sh/bullettrain-go-core.

Format of the cars as a variable

The string produced by each car should be defined by some kind of template which would be possible to override via env variable. For example I would like to have each car in the following format:

{space}{icon}{space}{text}{space}

With the current setup, I have to override the icon and the separator env vars to include the spaces.

BASH: single line mode useless

Using Linux, BASH, single line mode.

The prompt gets displayed in a way that it becomes completely useless. Only occurs when background colours are used, disabling them will make the prompt stable.

selection_001

Date car

Implement a calendar date car. Use optional env var to override date format.

Plugin Idea

What if we have a list of cars that are used, then a user can add a car they wrote to that list. The car can be potentially any language really but we would, of course, recommend go. These plugins are just binaries of some sort, that print something to stdout.

So this is how it would work. User exports BULLETTRAIN_CARS="time date context my_car"

at runtime, we see my_car we look for it internally if it doesn't exist we run bullettrain_my_car binary (they would have to name their plugin a certain way for it to get executed). This then appends info to the prompt? Is this doable?

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.