Project

General

Profile

unexist.dev

Assorted tidbits and projects

Positioner » History » Version 4

Version 3 (Anonymous, 03/14/2011 08:15 PM) → Version 4/5 (Anonymous, 04/30/2011 01:14 PM)

h1. 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* [[subtle:tags|tags/untags]] the current window to be visible on the selected [[subtle:views]]. The [[positioner]] will use the names of the [[subtle:views]] to create [[subtle:tags]] for placement if necessary.\015\012\015\012{{lightbox(contrib/positioner, Positioner)}}\015\012\015\012h2. Install\015\012\015\012Currently there is no package available and you need either to clone the repository:\015\012\015\012bq. hg clone http://hg.subforge.org/subtle-contrib\015\012\015\012Or download the latest archive:\015\012\015\012bq. http://hg.subforge.org/subtle-contrib/archive/tip.tar.bz2\015\012\015\012_These scripts may work, if you encounter any problems please ask in the usual places._\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 [[subtle:grabs|grab]] to your [[subtle:subtle]] config.\015\012\015\012<pre>{{hide}}<code class="ruby">\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</code></pre>\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<pre>{{hide}}<code class="ruby">\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</code></pre>