Project

General

Profile

unexist.dev

subtle » subtle-contrib

Assorted tidbits and projects

Positioner » History » Version 3

« Previous - Version 3/5 (diff) - Next » - Current version
Anonymous, 03/14/2011 08:15 PM


Positioner\015\012\015\012{{>toc}}\015\012\015\012h2. Overview\015\012\015\012The positioner displays the available views in a selection window inside of the active window in different colors:\015\012\015\012# Views the client is visible in are shown in occupied color\015\012# The current view in the focus color\015\012# Other views just in the view color\015\012\015\012The cursor keys move the selection through the list, Space marks the current view in the urgent color and Enter tags/untags the current window to be visible on the selected views. The positioner will use the names of the views to create tags for placement if necessary.\015\012\015\012{{lightbox(contrib/positioner, Positioner)}}\015\012\015\012h2. Colors\015\012\015\012|_. Color triplet |_. Meaning |\015\012| Focus | Currently selected view |\015\012| View | Other views |\015\012| Occupied | Views client is visible |\015\012| Urgent | Selected views |\015\012\015\012h2. Keys\015\012\015\012|_. Keys |_. Action |\015\012| Left, Up | Move to left |\015\012| Right, Down | Move to right |\015\012| Escape | Hide/exit |\015\012| Space | Select view |\015\012| Return | Tag/untag selected views and exit hide/exit |\015\012\015\012h2. Usage\015\012\015\012Either call it like ruby merger.rb from commandline or add following loader and grab to your subtle config.\015\012\015\012
{{hide}}\015\012begin\015\012  require "#{ENV["HOME"]}/path/to/positioner.rb"\015\012rescue LoadError => error\015\012  puts error\015\012end\015\012\015\012grab "W-p" do\015\012  Subtle::Contrib::Positioner.run\015\012end\015\012
\015\012\015\012h2. Configuration\015\012\015\012Per default, the positioner uses fixed as font, this can be changed after requiring the positioner.rb and before running it for the first time.\015\012\015\012h3. Fonts\015\012\015\012
{{hide}}\015\012begin\015\012  require "#{ENV["HOME"]}/path/to/positioner.rb"\015\012\015\012  # Set font\015\012  Subtle::Contrib::Positioner.font = "xft:DejaVu Sans Mono:pixelsize=80:antialias=true"\015\012rescue LoadError => error\015\012  puts error\015\012end\015\012