• Stars
    star
    169
  • Rank 224,453 (Top 5 %)
  • Language
    Ruby
  • License
    zlib License
  • Created over 12 years ago
  • Updated about 4 years ago

Reviews

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

Repository Details

An easy way to customize Pry colors via theme files

Pry Theme

Pry Theme version badge Build Status

Description

Pry Theme is a plugin for Pry, which helps you to customise your Pry colors via prytheme.rb files.

Railscasts Solarized Tomorrow Zenburn

Installation

All you need is to install the gem. The pry-theme plugin will be detected and used automatically.

gem install pry-theme

Synopsis

Theme files

Theme file is nothing but a Ruby file, which has .prytheme.rb extension (for example, beautiful.prytheme.rb). In order to set up the desired theme, add the following line to your .pryrc:

Pry.config.theme = "theme-name"

The default theme is the one from the pry-classic family. It is dependent on your terminal capabilities. For example, if you're using Windows, your default theme will be pry-classic-16, since the Windows terminal can't support more than 16 colours. If you're using xterm or urxvt, then your default theme will be pry-classic-256 (basically, you shouldn't notice it, because it resembles the default outlook of Pry, as though Pry Theme isn't present). This outlines the rule: the more colours your terminal supports, the more vivid version of pry-classic is used.

Let's change it to something more neoteric:

Pry.config.theme = "pry-modern-256"

That's all! Launch your Pry and you will see the changes.

CLI

Pry Theme has a command-line interface available via Pry. Just launch Pry and start working with it. For example, you can temporary change themes on the fly (only for the current session):

[1] pry(main)> pry-theme try pry-classic-8

This subcommand would switch your current theme to pry-classic-8 theme.

You can find more information about CLI in Pry Theme Wiki.

Managing themes

Creating new themes isn't hard. Check out Pry Theme Wiki article on that.

Theme files must have .prytheme.rb extension. Check out Pry Theme Collection if you want to find some themes other than default ones.

If you already have your theme stored somewhere on disk, just put it in the $HOME/.pry/themes directory.

If you don't want to bother with routine operations, you can install a theme from the Collection with help of pry-theme install <name> subcommand. For example, you can want to install the xoria256 theme. Just execute pry-theme install xoria256 and you're done.

Oh, and don't forget to adjust your .pryrc!

Limitations

No limitations. Pry Theme will run everywhere where you can launch Pry.

Credits

  • Thanks to banister for bringing the plugin in masses and contributing a bunch of themes;
  • Thanks to Karandashev for "Puzzle" font;
  • Thanks to Creatica for "Dited" font;
  • Thanks to noprompt for a HEX to ANSI conversion Ruby implementation, which I borrowed from one of his projects.

License

The project uses Zlib License. See LICENSE file for more information.

More Repositories

1

system_browser_client

Ruby code browser
JavaScript
61
star
2

coursera-mathematical-thinking

TeX
39
star
3

pry-theme-collection

A collection of themes for Pry Theme plugin for Pry
Ruby
24
star
4

rbtree3

A fork of unmaintained https://github.com/skade/rbtree released as rbtree3 (because the name "rbtree2" is already occupied...)
C
13
star
5

fast_method_source

Retrieve methods' and procs' source and comments
C
11
star
6

airbrake-crystal

A Crystal notifier for Airbrake
Crystal
9
star
7

entooru

Translations of random English articles about Ruby to Russian language
Ruby
7
star
8

linenoise-rb

A Ruby wrapper around the small self-contained alternative to Readline and Libedit called Linenoise (https://github.com/antirez/linenoise).
C
7
star
9

system_navigation

A library that provides additional introspection capabilities for Ruby programs
Ruby
6
star
10

dot

My dotfiles.
Shell
6
star
11

multitrap

Allows Signal.trap to execute multiple callbacks
Ruby
5
star
12

airbrake-rust

WIP
Rust
5
star
13

rmarshal

Decodes Ruby's Marshal.dump gibberish into orthodox Erlang
Erlang
4
star
14

system_browser_server

Ruby code browser (server)
Ruby
3
star
15

kyrylo.org

My personal website launched in August 2014
HTML
2
star
16

latest_ruby

Answers the question of what the latest Ruby version is. Knows about MRI, Rubinius, JRuby, MagLev and MacRuby.
Ruby
2
star
17

punchline

ะšะฐะบะพะน-ั‚ะพ ัะฐะนั‚.
Ruby
2
star
18

zsh-completion-subtle

Z Shell completion scripts for Subtle WM and its tools
2
star
19

passenger-airbrake

https://github.com/airbrake/airbrake/pull/472
Ruby
1
star
20

airbrake-dotnet

WIP
C#
1
star
21

introflection-ruby

Ruby
1
star
22

pry-profiler

Not ready. Work in progress
Ruby
1
star
23

colir

Colir means colour in Ukrainan. In Ruby it means HEX colour
Ruby
1
star
24

bash-completion-subtle

Bash completion scripts for Subtle WM and its tools
Shell
1
star
25

ruby-kag

King Arthur's Gold (KAG) API wrapper for Ruby
Ruby
1
star
26

artaius

King Arthur's Gold (KAG) IRC bot
Ruby
1
star
27

already_awake

KDM4 theme with white background and red text.
1
star
28

pixelate

Skin for Yakuake.
1
star
29

kyrylo.org-ansible

Ruby
1
star