Code Monkey home page Code Monkey logo

bashfu's Introduction

BashFu

A set of shell functions for enhancing your Bash prompt with some Unicode goodness.

Why would you do that? Simple: More compact, easy-to-consume secondary information that would otherwise leave your prompt too cluttered.

Requirements

A terminal program and font capable of displaying Unicode 6.1 characters, specifically the Emoji character set.

Installation

Simply clone this repo somewhere handy, then in your .bash_profile, .profile, or .bashrc (as appropriate), source the pieces that you want:

For example:

source /path/to/BashFu/bin/clock.sh

Usage

Modify the PS1 variable to call the relevant shell functions.

For example:

PS1="$(show_clock) \h:\W \u\$ "

Available Widgets

Cross-Platform

clock.sh

  • show_clock: Show a clock-face, rounded to the nearest half-hour. Example: ๐Ÿ•—

rvm.sh

  • rvm_mode: Show a dot depending on the active RVM configuration:
    • White dot (โšช): Using system ruby (no RVM ruby active).
    • Red dot (๐Ÿ”ด): Using an RVM ruby, but NOT using an explicit gemset.
    • Blue dot (๐Ÿ”ต): Using an RVM ruby, AND using an explicit gemset.
  • rvm_ruby_details: Show a string indicating which ruby, which version/patch-level, and which gemset are in use. Shows nothing if an RVM ruby isn't active. Adds one space after the string if an RVM ruby is active. Example: [email protected]

OS X

osx/power.sh

  • power_mode: Show a plug (๐Ÿ”Œ) or battery (๐Ÿ”‹) to indicate whether the machine is drawing power from AC or battery respectively. (NOTE: Works best with a light background color, as the plug symbol is mostly black...)

Coming Soon

  • Various widgets to show information about the current git repo.
  • More widgets to show information about the currently active RVM ruby / gemset.

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.