Project

General

Profile

unexist.dev

subtle » subtle-contrib

Assorted tidbits and projects

Merger

Overview

The merger displays the available views in a selection window in the center of the screen in different colors:

  1. Views the client is visible in are shown in occupied color
  2. The current view in the focus color
  3. Other views just in the view color

The 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.

{{lightbox(contrib/merger, Merger)}}

Colors

Color triplet Meaning
Focus Currently selected view
View Other views
Occupied Views client is visible
Urgent Selected views

Keys

Keys Action
Left, Up Move to left
Right, Down Move to right
Escape Hide/exit merger
Space Select view for merge
Return Merge selected views and exit hide/exit merger

Usage

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

{{hide}}begin
  require "#{ENV["HOME"]}/path/to/merger.rb" 
rescue LoadError => error
  puts error
end

grab "W-m" do
  Subtle::Contrib::Merger.run
end

Install

Currently there is no package available and you need either to clone the repository:

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

Or download the latest archive:

http://hg.subforge.org/subtle-contrib/archive/tip.tar.bz2

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

Configuration

Per default, the merger uses fixed as font, this can be changed after requiring the merger.rb and before running it for the first time.

Fonts

{{hide}}begin
  require "#{ENV["HOME"]}/path/to/merger.rb" 

  # Set font
  Subtle::Contrib::Merger.font = "xft:DejaVu Sans Mono:pixelsize=80:antialias=true" 
rescue LoadError => error
  puts error
end