Giter Club home page Giter Club logo

bashlight's Introduction

bashlight

Build Status codecov Releases Github commits (since latest release)

This bash script enhances your OSX/Linux console. The console or "terminal" on macOS comes in the basic equipment therefore it is very slim. This is good as long as you do not work with it every day. If you often go into the console, you should do something for your eyes and install the Solarized colorscheme theme. If you working a lot with GIT, then bashlight can be you a great help. The Bash extension offers you information for Branch and status of your current GIT repositories. Furthermore it contains many commonly used aliases, which allow for fast working on the console. Let your colleagues be amazed !

 _               _     _ _       _     _
| |__   __ _ ___| |__ | (_) __ _| |__ | |_
| '_ \ / _` / __| '_ \| | |/ _` | '_ \| __|
| |_) | (_| \__ \ | | | | | (_| | | | | |_
|_.__/ \__,_|___/_| |_|_|_|\__, |_| |_|\__|
                           |___/

Features

Git management

The background colour represents the current git status

  • green = no changes
  • yellow = changes detected
  • red = untracked files

The chess figure represents the branch you are on. Git flow is also supported.

  • ♔ = king = master
  • ♙ = pawn = development
  • ♘ = knight = feature
  • ♗ = bishop = hotfix
  • ☂ = umbrella = other

Other symbols

  • "⇡⇣" and number behind them show how many commits you are behind/ahead of the remote
  • "+" symbol when current branch has been changed but uncommited
  • current git branch name, or short SHA1 hash when the head is detached

Prompt

  • Platform-dependent prompt symbol for macOS and Linux
  • No need for patched fonts on remote when using ssh

Github releases

  • This tool written by TheDevMinerTV allows you to create new GitHub releases via the commandline.
  • To use the tool you need to be in the repository of the branch you want to make a release of.
ghr v0.2.1 "New aliases" "We've got a new update where we have changed a lot of aliases"
     /|\         /|\                                 /|\
      |           |                                   |
   version      name                             description

Additional information

You are able to add informations to you prompt by setting following environment variables.

  1. PS_INFO: (string) e.g. dev/stage/prod.
  2. PS_INFO_BRAND: (string) e.g. info/success/warning/danger

Set this variables in your .bashrc (Linux) ord src/profile (macOS) file like so:

export PS_INFO="stage"
export PS_INFO_BRAND="warning"

Notification

On macOS and Linux, you have the option to send notifications from the console. However, the commands are different for this purpose. bashlight provides you a unified interface. You can play sounds, open the message window and use the voice output.

Play sounds

blPlay Submarine

Say words

blSay "OK Computer!"

Notifications

Note: On macOS you can use two arguments.

alert "This is the message"

Notifications

Contains configurations for

  1. Git global config
    • Shortcuts for all commands
    • Enhanced git history with colors with git sl
    • Colous which harmonize with the colors used as background
    • Branch setting
  • Bash aliases (shortcuts)
    • directory
      • ll, la, l
      • cd .. = .. < ... < ....
    • git
      • gad --- "git add"
      • gbr --- "git branch"
      • gst --- "git status"
      • gco --- "git commit"
      • gcs --- "git commit -S"
      • gdi --- "git diff"
      • gch --- "git checkout"
      • gpu --- "git pull"
      • ghr --- "github-release"
    • git-ui
      • gig --- "gitg --all"
      • gik --- "gitk --all"

Git global configuration

It also include a shell script to set common global bash settings. Before you run the file, take a look in the file. The setting included are tailored to bashlight.


Installation & Requirements

1. get the source code

mkdir -p ~/.bin
cd ~/.bin
git clone https://github.com/vergissberlin/bashlight.git

2. Open your home bash file in editor

~/.bashrc on linux or ~/src/profile on macOS

3. Include bashlight/bashlight with the following line at the end of the file

if [ -f ~/.bin/bashlight/bashlight ]; then
    . ~/.bin/bashlight/bashlight
fi

Optional settings

To install common git and tmux settings are tailored with use for bashlight simply run:

bash ~/.bin/bashlight/install.bash

Supported operating systems

  • Linux
  • macOS
  • Windows with bash shell (Windows subsystem for Linux, WSL)

Optional dependencies

  • coreutils for a colourful, easy to handle directory listing

-- apt install coreutils

-- brew install coreutils

Support or Contact

You can contact me (@vergissberlin) or TheDevMinerTV (@TheDevMinerTV) on GitHub. Use the issue tracker to report bugs.

Thank you

  • .. to @riobard, the founder of bash-powrline which this project is based on.
  • .. to the contributers and testers, who help to further improve the project.
  • Further thanks to GitHub for Atom.io and Microsoft for Visual Studio Code.

Made with love and Atom.IO

bashlight's People

Contributors

gitsko avatar thedevminertv avatar tomahi avatar vergissberlin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

sunlinjin tomahi

bashlight's Issues

No correct branch colors in Ubuntu 18

Bug report

Expectation: I want to use Bashlight in Ubuntu 18.04 console and see green color on branches, if der is nothing changed or yellow or red if there are unstaged or not commited changes.
But in my Ubuntu it's always yellow.

Packages for bashlight

Hi @vergissberlin,

I've created a porgball for bashlight 2.1/master on the 16th february 2019.

The command to create a porgball is:

sudo porg -lp bashlight-<VERSION> "mkdir ~/.bin/; mkdir ~/.bin/bashlight; cp -r bashlight config.bash config install* migrate.bash src/ update.bash .git ~/.bin/bashlight; sudo chown -R $USER ~/.bin; echo 'if [ -d ~/.bin/bashlight ]; then . ~/.bin/bashlight/bashlight; fi' >> ~/.bashrc"
porgball -x -9 bashlight

This will create a porgball with the name bashlight-<VERSION>.porg.tar.xz.
Users can install this package with the command:

porgball -e bashlight-<VERSION>.porg.tar.xz

You can download all my bashlight porgballs here...

Please don't close this issue. I'm going to update this issue, once new versions get released

I hate to host these porgballs on G Drive, I'll admit that!

Add last change to command git br

When you type "git br" or "git br -a" you see a list of all local and remote branches with last commit. It would be nice to have the info how long ago this last commit was. Similar to the info you see in "git sl"

No update registered

Bug report

Describe the bug
My bashlight doesn't ask for a update, when new tag was opened on same day as I updated bashlight

To Reproduce
Steps to reproduce the behavior:

  1. Update bashlight to some tag
  2. Ask André to release a new tag
  3. Start a new terminal
  4. Annnnd. Nothing like a update message comes up.

Expected behavior
You start a new terminal / bash and bashlight asks for a update.

Additional context
Ok, so hear me out about this:
So, today bashlight got the tag v0.2.0 and I upgraded bashlight on my laptop to v0.2.0 and then I began with helping develop v0.2.1.
When André released v0.2.1 bashlight didn't pickup that there was a new update.

Workaround
You need to edit ~/.bin/bashlight/DAY_UPDATE
and subtract 1 from the number that is in that file.

So:
BEFORE: FILE: ~/.bin/bashlight/DAY_UPDATE
015

AFTER: FILE: ~/.bin/bashlight/DAY_UPDATE
014

And then relaunch the terminal.

Checklist

  • Description
  • Reproduce
  • Expected behavior

git br -d not working

Bug report

Describe the bug
You cannot delete a branch by using the git alias "git br", because the parameter -a cannot be combined with -d.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new Branch "ISSUE-123"
  2. try to delete the branch "git br -d ISSUE-123"
  3. fatal: cannot use -a with -d

Add -v option

Please add something like bashlight -v to show the current version.

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.