« Previous - Version 32/41 (diff) - Next » - Current version
Alex Christe, 2011-01-24 14:42


Subtle-contrib

Contrib is just a collection of scripts for subtle, currently there is no package available and you need to clone the repository to a place you are comfortable with:

hg clone http://hg.subforge.org/subtle-contrib

These scripts may work, if you encounter any problems please ask in the usual places.

Graviton

Graviton is a helper to create custom gravities visually.

 Graviton

Usage

Start Graviton on the commandline via ruby graviton.rb. Then just draw rectangles on the grid like e.g. via the rectangular masking tool from GIMP. Every new rectangle will have a different color to make it easier to distingish between each. To resize a rectangle press the left mouse button on one of the corners and move the mouse.

The print button will display the created new gravities with their color name in a format that can be used in the config of subtle.

Colors

Following colors are used in Graviton in given order:

cyan green olive teal blue silver lime navy purple magenta maroon red yellow gray

Launcher

Launcher that combines modes/tagging of subtle with a browser search bar.

 Launcher

Make sure that levenshtein.rb is also in the PATH otherwise launcher will not work

Features

  • Search for stuff via Google (Chrome/Opera/Firefox)
  • Point your browser directly to an uri
  • Launch programs in path
  • Create tags on the fly with #tag
  • Create views on the fly with @view
  • Set modes on the fly with + = full, ^ = float and * = stick
  • Tab completion for programs, views and tags

Usage

Either call it like ruby launcher.rb from commandline or add following loader and grab to your subtle config.

Numbers: on /off 1 begin
 2   require "#{ENV["HOME"]}/path/to/launcher.rb" 
 3 rescue LoadError => error
 4   puts error
 5 end
 6 
 7 grab "W-x" do
 8   Subtle::Contrib::Launcher.run
 9 end

Configuration

Per default, the launcher uses fixed as font and loads entries from /usr/bin. This can be changed after requiring the launcher.rb and before running it for the first time.

Fonts

Numbers: on /off 1 begin
 2   require "#{ENV["HOME"]}/path/to/launcher.rb" 
 3 
 4   # Set fonts
 5   Subtle::Contrib::Launcher.fonts = [
 6     "xft:DejaVu Sans Mono:pixelsize=80:antialias=true",
 7     "xft:DejaVu Sans Mono:pixelsize=12:antialias=true" 
 8   ]
 9 rescue LoadError => error
10   puts error
11 end

Paths

Numbers: on /off1 begin
2   require "#{ENV["HOME"]}/path/to/launcher.rb" 
3 
4   # Set paths
5   Subtle::Contrib::Launcher.paths = [ "/usr/bin", "~/bin" ]
6 rescue LoadError => error
7   puts error
8 end

Examples

Insert Description
g subtle wm Change to browser view and search for subtle wm via Google
urxvt @editor Open urxvt on view @editor with dummy tag
urxvt @editor #work Open urxvt on view @editor with tag work
urxvt #work Open urxvt and tag with tag work
urxvt -urgentOnBell Open urxvt with the urgentOnBell option
+urxvt Open urxvt and set full mode
^urxvt Open urxvt and set floating mode
*urxvt Open urxvt and set sticky mode
urx<hit tab> Open urxvt (tab completion)

Selector

Client selector that works like the subscription selector in Google Reader

 Selector

Colors

Color pair Meaning
Focus Currently selected client
Occupied Visible clients on current view
View Currently not visible clients

Keys

Keys Action
Left, Up Move to left
Right, Down Move to right
Tab Select next client or first
Escape Exit selector
Return Focus currently selected and hide/exit selector
Any letter/digit Select client starting with letter/digit

Usage

Either call it like ruby selector.rb from commandline or add following loader and grab to your subtle config.

Numbers: on /off 1 begin
 2   require "#{ENV["HOME"]}/path/to/selector.rb" 
 3 rescue LoadError => error
 4   puts error
 5 end
 6 
 7 grab "W-x" do
 8   Subtle::Contrib::Selector.run
 9 end

Configuration

Per default, the selector uses fixed as font and loads entries from /usr/bin. This can be changed after requiring the selector.rb and before running it for the first time.

Fonts

Numbers: on /off1 begin
2   require "#{ENV["HOME"]}/path/to/selector.rb" 
3 
4   # Set font
5   Subtle::Contrib::Selector.font = "xft:DejaVu Sans Mono:pixelsize=80:antialias=true" 
6 rescue LoadError => error
7   puts error
8 end

Styler

Helper to create or change subtle color themes.

 Styler

Usage

Start Styler on the commandline via ruby styler.rb. It will display a preview of the current colors of subtle and various color buttons to change them via a color chooser.

The print button will show the new colors on the commandline.

Vitag

Vitag is a helper to edit window/view tagging with any editor ($EDITOR)

Usage

Helper that provides a way to change the tags of all views and windows at once. It basically just opens your favorite editor via editor set in $EDITOR and prints every view and running client followed by it's tags. When the tags are changed and the file saved it will send the changes to subtle in one single event per view/client and non-existing tags will be created accordingly.

Examples

# Views
@terms #default #terms
@www #browser
@gimp #gimp_image #gimp_toolbox #gimp_dock
@dev #editor

# Clients
xterm #terms