• Stars
    star
    106
  • Rank 325,871 (Top 7 %)
  • Language
    Shell
  • License
    MIT License
  • Created over 9 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A theme for nerds, makes fish even more powerful. It's equipped with a hell of a lot of nice functions and key bindings to speed up your workflow.

Budspencer theme

A theme for nerds, makes fish even more powerful. It's equipped with a hell of a lot of nice functions and key bindings to speed up your workflow.

The philosophy behind budspencer theme:

  • Delimit the prompt lines clearly to the output.
  • Produce output only if it contains relevant information.
  • Show useful notifications within the prompt.
  • Equip the prompt with toggle commands in order to change its style interactively.
  • Store sessions in order to make frequently used commands quickly accessible.
  • Make navigation within the directory tree as easy as possible using bookmarks and a directory history without duplicates.
  • Make histories quickly accessible with menus.
  • Don't stress your eyes. Use different colors in dark and bright environments.

Demonstration video

video

Requirements

You need an up-to-date fish shell version from github or a nightly build.

Non standard tools:

Note for OS X users

The theme uses advanced sed and expr features. The OS X tools have restricted functionality.

Try expr from coreutils package if you see expr: syntax error in budspencer prompt.

Install advanced sed and expr versions:

$ brew install coreutils gnu-sed

Add this to your ~/.config/fish/config.fish:

if test (uname -s) = "Darwin"
  set -gx PATH /usr/local/opt/coreutils/libexec/gnubin $PATH
  set -gx PATH /usr/local/opt/gnu-sed/libexec/gnubin $PATH
end

Configuration

General configuration

The theme behaves similar to vim's airline/powerline plugins. Thus, it needs a powerline font. It's also crucial to have vi mode enabled. Thus, execute

set -U fish_key_bindings fish_vi_key_bindings

before enabling the theme.

Colors

Redefine $budspencer_colors with the set command in order to change the colors of the prompt.

Example:

set budspencer_colors 000000 333333 666666 ffffff ffff00 ff6600 ff0000 ff0033 3300ff 0000ff 00ffff
00ff00

will result in a prompt like this: color replace example

Two color schemes for bright and dark environments are predefined. You can enable them with day and night, respectively.

Command history

Commands that shouldn't appear in the command history are defined by a universal list $budspencer_nocmdhist. Default:

set -U budspencer_nocmdhist c d ll ls m s

Disable/reenable greeting

Disable:

set -U budspencer_nogreeting

Reenable:

set -e budspencer_nogreeting

Show Node version

To show your current node version, do following in your Fish configs

set -g budspencer_alt_environment "node -v"

Ring the bell in order to set the urgency hint flag

If you have configured your terminal application to use the visual bell, your window manager will tell you when a job running in your shell has finished. You don't need to check manually whether it's done.

Disable the acoustic bell

If you have still activated the acoustic bell, you probably hate that feature. Switch it off in that case:

set -U budspencer_nobell

Outer prompt segments

  • Vi mode is indicated by color of outer segments, cursor color also changes if terminal supports it:
    • blue: NORMAL mode
    • yellow: INSERT mode
    • magenta: VISUAL mode

Left prompt segments

  • Prompt line number
  • Repository information
  • Status symbols
    • ✻: keep track of this shell session, can be toggled with # to show the number of the session within the sessions list
    • ⌘: present working directory is in bookmark list, can be toggled with # to show the number of the bookmark
    • V: vi is parent process
    • R: ranger is parent process
    • βš™: there are background jobs, can be toggled with # to show the amount of background jobs
    • ξ‚’: no write permissions in present working directory
    • βš”: there are tasks scheduled for this week, can be toggled with # to show the amount of weekly tasks
    • βš‘: there are appointments for today, can be toggled with # to show the amount of appointments
    • βœ”: last command succeeded, can be toggled with # to show the status value
    • ✘: last command failed, can be toggled with # to show the status value
    • ⚑: superuser indicator
  • Present working directory
  • Active Python virtual environment. Requires Virtual Fish

Right prompt segments

  • Last command's duration time
  • Repo status symbols:
    • ↑: git repository is ahead origin
    • ↓: git repository is behind origin
    • +: changes have been added to git index
    • –: files have been deleted in work tree
    • ✱: files have been modified in work tree
    • β†’: files have been renamed in git index
    • ═: there are unmerged commits
    • ●: there are untracked (new) files
    • ✭: there are stashed commits

Toggle prompt segments

The following shortcuts need vi-mode:

  • Style of "present working directory"-segment can be toggled in NORMAL and in VISUAL mode with space bar
    • styles implemented:
      • short (shows username, short hostname and truncated path; recommended in most cases)
      • long (shows username, full hostname and full path; useful for copy-paste in ssh connections)
      • none (shows nothing except small delimiter; useful for small terminals)
      • If prompt is toggled with #, the IP address is shown instead of the hostname.
    • configurable by universal list $budspencer_pwdstyle (if not set, defaults to short long none); note that changes to $budspencer_pwdstyle keep persistant as it's a universal variable.

pwd style

  • Style of symbols can be toggled in NORMAL and in VISUAL mode with #
    • styles implemented:
      • symbols (shows status symbols)
      • numbers (shows numbers instead of symbols in left prompt as well as amount of changes in right repo prompt)

Note, the format is username@hostname:pathname. Thus, you can cut the whole string with your mouse and paste it into ssh commands.

Quickly navigate in history of working directories

The function d drops down a menu showing the history as enumerated list. Unlike fish's builtin dirh, d does not show any duplicates. Enter a number to jump to a directory within the list.

dir menu

The following shortcuts need vi-mode:

  • Press H in NORMAL mode to change present working directory to previous working directory in history.
  • Press L in NORMAL mode to change present working directory to next working directory in history.

Quickly navigate in command history

The function c drops down a menu showing the command history as enumerated list similarly to the d function. Selections are also pasted into the X clipboard. It's possible to load a command of a former prompt by giving the prompt line number as argument.

Bookmarks

A bookmark can be created with mark. It can be removed with unmark.

unmark can take an argument to remove a specific bookmark in the bookmark list. Simply add the number of the bookmark you would like to remove as the argument.

Bookmarks are universal and thus persistant. A new shell automatically changes working directory on startup to newest bookmark. m is a function that drops down a menu showing the bookmarks as enumerated list equivalently to d.

The following shortcuts need vi mode:

  • Create a bookmark for present working directory with m in NORMAL mode.
  • Remove a bookmark for present working directory with M in NORMAL mode.

By default the shell will change to the directory of the latest bookmark on a new session. This can be disabled by adding the following line:

set -U budspencer_no_cd_bookmark

Edit commandline with your favorite editor

The function edit-commandline let you edit the commandline with your editor. It makes the commandline as powerful as your editor. If $EDITOR is not set, vi is used.

The following shortcut needs vi mode:

  • Type . in NORMAL mode to edit commandline in editor.

Sessions

Shell session can be stored with s <session name>. If a session with session name already exists, the session with this name will be attached. If a session with session name is already active within another terminal, this terminal will be focussed.

A list of available sessions can be shown with s.

A session can be erased with s -e <session name>.

Type s -d to detach current session.

Set window title

Just type wt <title>.

TODO

  • vi REPLACE mode, as soon as REPLACE mode is implemented within fish

Feedback

Give me feedback if you ...

  • ... have ideas how I could improve budspencer.
  • ... have problems with budspencer.
  • ... have questions concerning budspencer.

More Repositories

1

oh-my-fish

The Fish Shell Framework
Shell
10,319
star
2

theme-bobthefish

A Powerline-style, Git-aware fish theme optimized for awesome.
Shell
1,445
star
3

packages-main

Primary Oh My Fish package repository.
235
star
4

plugin-foreign-env

Run foreign bash scripts and capture exported environment variables
Shell
220
star
5

plugin-bang-bang

Bash style history substitution for Oh My Fish
Shell
125
star
6

theme-agnoster

Shell
95
star
7

plugin-thefuck

⚑️ Provide fast and painless support to TheFuck
Shell
68
star
8

plugin-z

Integration with z (autojump alternative).
Shell
64
star
9

plugin-osx

Integration with Finder and iTunes.
Shell
62
star
10

plugin-grc

grc Colourizer for some commands.
Shell
61
star
11

plugin-pj

The Project Jump plugin for the fish shell
Shell
53
star
12

plugin-expand

Provides interactive word expansions in real-time
Shell
53
star
13

plugin-aws

Completions and integrations with the AWS CLI
Shell
43
star
14

plugin-peco

πŸ” browse your fish history with peco
Shell
42
star
15

theme-clearance

A minimalist fish shell theme for people who use git
Shell
42
star
16

theme-scorphish

Compact. Sufficient. PWD, Ruby+RVM, Python+VENV, Git status, Rust, NodeJS.
Shell
40
star
17

theme-default

Shell
40
star
18

plugin-pyenv

Simple Python Version Management integration.
Shell
38
star
19

plugin-proxy

Proxy settings plugin for Oh My Fish
Shell
38
star
20

theme-fishbone

A clean theme for fish shell managed by Oh my fish
Shell
34
star
21

theme-cmorrell.com

Theme with minimal base prompt, compact git status, and useful visual indicators for common scenarios.
Shell
33
star
22

theme-dangerous

A feature-rich theme derived from budspencer without powerline font.
Shell
33
star
23

plugin-sudope

sudope plugin for Oh-My-Fish. Quickly put 'sudo' in your command
Shell
32
star
24

plugin-weather

A simple, location-aware weather command for Fish
Shell
31
star
25

plugin-tab

Open the current directory (or any other directory) in a new tab.
Shell
31
star
26

plugin-jump

A port of Jeroen Janssens’ β€œjump” utility.
Shell
31
star
27

plugin-fasd

fasd plugin for Oh My Fish
Shell
28
star
28

theme-chain

A thin, classy theme composed of a chain of information
Shell
28
star
29

theme-robbyrussell

Shell
22
star
30

plugin-argu

Sane and easy to use argument parser for Oh My Fish!
Shell
21
star
31

plugin-vi-mode

Basic vi key bindings emulation for fish.
Shell
21
star
32

plugin-technicolor

Easy colorisation for Fish shell
Shell
20
star
33

plugin-extract

Plugin to expand or extract bundled & compressed files.
Shell
19
star
34

plugin-emacs

Wrapper for daemon functionality of Emacs.
Shell
19
star
35

plugin-cd

A featured cd can make your fish journey much more pleasant.
Shell
19
star
36

marlin

A silvery, fast learning and interactive directory navigator
Shell
18
star
37

plugin-balias

Provide alias with auto completion.
Shell
18
star
38

plugin-theme

Quick theme switcher.
Shell
17
star
39

plugin-brew

Oh My Fish plugin to integrate Homebrew paths into shell.
Shell
17
star
40

theme-cbjohnson

Shell
17
star
41

plugin-rvm

RVM Ruby version manager.
Shell
15
star
42

plugin-git-flow

git-flow Completion support for git-flow.
Shell
15
star
43

plugin-archlinux

Provides a number of plugins to make using Arch Linux easier.
Shell
15
star
44

plugin-title

Change your terminal title!
Shell
15
star
45

theme-qing

A theme for Oh My Fish.
Shell
14
star
46

plugin-direnv

Unclutter your .profile http://direnv.net
Shell
14
star
47

theme-eclm

Shell
14
star
48

plugin-functional

Shell
14
star
49

plugin-pbcopy

OSX's pbcopy and pbpaste for Linux.
Shell
13
star
50

plugin-rbenv

rbenv Ruby environment/version manager.
Shell
13
star
51

oh-my-fish-legacy

Oh My Fish!
Shell
13
star
52

theme-es

Fish shell theme
Shell
13
star
53

plugin-rustup

Shell
13
star
54

theme-toaster

Shell
12
star
55

plugin-local-config

Support per-user, per-host and per-platform custom config files.
Shell
12
star
56

plugin-await

Wait last background job with a nice progress spinner
Shell
12
star
57

plugin-docker-machine

Plugin to integrate Docker Machine
Shell
12
star
58

plugin-ta

Shell
11
star
59

theme-gnuykeaj

Shell
11
star
60

dockerfiles

Dockerfiles for Fish and Oh My Fish
Dockerfile
11
star
61

plugin-vcs

A version control system abstraction layer for Fishshell
Shell
11
star
62

plugin-node-binpath

Automatically add node_modules binaries to PATH
Shell
11
star
63

plugin-gi

gitignore.io CLI for fish.
Shell
11
star
64

plugin-ssh-config.d

Load OpenSSH config from ~/.ssh/config.d/*.config files
Shell
10
star
65

theme-godfather

Shell
9
star
66

plugin-linuxbrew

Oh My Fish plugin to integrate Linuxbrew paths into shell.
Shell
9
star
67

plugin-virtualfish

A simple wrapper for virtualfish
Shell
9
star
68

theme-ocean

Shell
9
star
69

plugin-apt

Short and friendly command wrapper for APT
Shell
9
star
70

theme-bira

Shell
9
star
71

plugin-python

Set of shortcuts to Python based utilities (pybeatifyjson – clean JSON files, pyclean – remove old .pyc, pyhttp & pysmtp – simple HTTP & SMTP servers)
Shell
9
star
72

plugin-license

Summon LICENSE file in a flash
8
star
73

plugin-sublime

Creates `subl` command line shortcut to launch Sublime Text editor.
Shell
8
star
74

plugin-spark

▁▂▃▅▂▇ in your shell
Shell
8
star
75

plugin-composer

Composer PHP Dependency manager plugin for Oh My Fish
Shell
8
star
76

theme-fishface

Prompt for Fish Shell shaped like a fish, coloured green when in a git repo.
Shell
7
star
77

plugin-bundler

Use Ruby's Bundler automatically for some commands.
Shell
7
star
78

theme-red-snapper

Red Snapper Theme
Shell
7
star
79

theme-edan

A functional, uncluttered fish theme with usability perks for git users and python developers
Shell
7
star
80

plugin-ssh

ssh conservative $TERM value helper.
Shell
6
star
81

plugin-errno

A Oh My Fish plugin to deal with POSIX error codes
Shell
6
star
82

plugin-wifi-password

Shell
6
star
83

plugin-dpaste

Shell
6
star
84

theme-mars

Shell
6
star
85

plugin-hash

Computes string digests using various hashing algorithms
Shell
6
star
86

plugin-node

Adds locally installed NodeJS npm binary executable modules to the path.
Shell
6
star
87

theme-coffeeandcode

Shell
5
star
88

plugin-getopts

A Unix compliant implementation of getopts for fish.
Shell
5
star
89

plugin-bak

Helps you instantly backup and restore files
Shell
5
star
90

theme-yimmy

A simple two-line omf theme with support for terminals configured with Solarized Dark colors.
Shell
5
star
91

plugin-wttr

Shell
5
star
92

plugin-localhost

Opens http://localhost:3000 (and other ports) in the default browser.
Shell
5
star
93

theme-krisleech

A Theme for Fish Shell
Shell
5
star
94

theme-trout

Shell
5
star
95

theme-gitstatus

Shell
5
star
96

theme-zish

Shell
4
star
97

theme-fishy-drupal

Shell
4
star
98

plugin-gityaw

Replace Git HTTPS remote by SSH one
Shell
4
star
99

theme-mtahmed

Shell
4
star
100

plugin-vscode

Visual Studio Code plugin for Oh My Fish.
Shell
4
star