Project

General

Profile

unexist.dev

subtle » subtle-contrib

Assorted tidbits and projects

Merger » History » Version 3

« Previous - Version 3/4 (diff) - Next » - Current version
Anonymous, 04/30/2011 01:14 PM


Merger\015\012\015\012{{>toc}}\015\012\015\012h2. Overview\015\012\015\012The merger displays the available views in a selection window in the center of the screen 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 merges the tags of the selected views and effectively displays all clients that match the new tags. The tags are stored and can be reset on a next run of the merger.\015\012\015\012{{lightbox(contrib/merger, Merger)}}\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 merger |\015\012| Space | Select view for merge |\015\012| Return | Merge selected views and exit hide/exit merger |\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/merger.rb"\015\012rescue LoadError => error\015\012  puts error\015\012end\015\012\015\012grab "W-m" do\015\012  Subtle::Contrib::Merger.run\015\012end\015\012
\015\012\015\012h2. Configuration\015\012\015\012Per default, the merger uses fixed as font, this can be changed after requiring the merger.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/merger.rb"\015\012\015\012  # Set font\015\012  Subtle::Contrib::Merger.font = "xft:DejaVu Sans Mono:pixelsize=80:antialias=true"\015\012rescue LoadError => error\015\012  puts error\015\012end\015\012