subtle » subtle-contrib

Assorted tidbits and projects

Launcher » History » Version 2

Anonymous, 04/30/2011 01:14 PM

1 2
h1. Launcher\015\012\015\012{{>toc}}\015\012\015\012h2. Overview\015\012\015\012[[Launcher]] that combines modes/tagging of [[subtle:subtle]] with a browser search bar.\015\012\015\012{{lightbox(contrib/launcher, Launcher)}}\015\012\015\012Make sure that levenshtein.rb is also in the PATH otherwise [[launcher]] will not work\015\012\015\012h2. Features\015\012\015\012* Search for stuff via "Google": (Chrome/Opera/Firefox)\015\012* Point your browser directly to an uri\015\012* Launch programs in path\015\012* Create tags on the fly with *#tag*\015\012* Create views on the fly with *@view*\015\012* Set modes on the fly with *&#43;* = full, *&#94;* = float and *&#42;* = stick\015\012* Tab completion for programs, views and tags\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\015\012\015\012Or download the latest archive:\015\012\015\012bq.\015\012\015\012_These scripts may work, if you encounter any problems please ask in the usual places._\015\012\015\012h2. Usage\015\012\015\012Either call it like @ruby launcher.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/launcher.rb"\015\012rescue LoadError => error\015\012  puts error\015\012end\015\012\015\012grab "W-x" do\015\012\015\012end\015\012</code></pre>\015\012\015\012h2. Configuration\015\012\015\012Per 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.\015\012\015\012h3. Fonts\015\012\015\012<pre>{{hide}}<code class="ruby">\015\012begin\015\012  require "#{ENV["HOME"]}/path/to/launcher.rb"\015\012\015\012  # Set fonts\015\012  Subtle::Contrib::Launcher.fonts = [\015\012    "xft:DejaVu Sans Mono:pixelsize=80:antialias=true",\015\012    "xft:DejaVu Sans Mono:pixelsize=12:antialias=true"\015\012  ]\015\012rescue LoadError => error\015\012  puts error\015\012end\015\012</code></pre>\015\012\015\012h3. Paths\015\012\015\012<pre>{{hide}}<code class="ruby">\015\012begin\015\012  require "#{ENV["HOME"]}/path/to/launcher.rb"\015\012\015\012  # Set paths\015\012  Subtle::Contrib::Launcher.paths = [ "/usr/bin", "~/bin" ]\015\012rescue LoadError => error\015\012  puts error\015\012end\015\012</code></pre>\015\012\015\012h2. Examples\015\012\015\012|_. Insert             |_. Description                                                                    |\015\012| g subtle wm          | Change to browser view and search for _subtle wm_ via "Google": |\015\012| urxvt @editor        | Open urxvt on view @editor with dummy tag                                        |\015\012| urxvt @editor #work  | Open urxvt on view @editor with tag _work_                                       |\015\012| urxvt #work          | Open urxvt and tag with tag _work_                                               |\015\012| urxvt -urgentOnBell  | Open urxvt with the urgentOnBell option                                          |\015\012| +urxvt               | Open urxvt and set full mode                                                     |\015\012| ^urxvt               | Open urxvt and set floating mode                                                 |\015\012| *urxvt               | Open urxvt and set sticky mode                                                   |\015\012| urx<hit tab>         | Open urxvt (tab completion)                                                      |\015\012