Wiki
Version 35 (Christoph Kappel, 2011-02-03 14:04)
| 1 | 2 | Christoph Kappel |
h1. Subtle-contrib |
|---|---|---|---|
| 2 | 2 | Christoph Kappel | |
| 3 | 13 | Christoph Kappel |
{{>toc}}
|
| 4 | 13 | Christoph Kappel | |
| 5 | 34 | Christoph Kappel |
Contrib is just a collection of scripts for [[subtle:subtle]], currently there is no package available and you need to clone the repository to a place you are comfortable with: |
| 6 | 1 | ||
| 7 | 1 |
bq. hg clone http://hg.subforge.org/subtle-contrib |
|
| 8 | 4 | Christoph Kappel | |
| 9 | 23 | Christoph Kappel |
_These scripts may work, if you encounter any problems please ask in the usual places._ |
| 10 | 23 | Christoph Kappel | |
| 11 | 13 | Christoph Kappel |
h2. Graviton |
| 12 | 13 | Christoph Kappel | |
| 13 | 34 | Christoph Kappel |
Graviton is a helper to create custom [[subtle:gravity|gravities]] visually. |
| 14 | 13 | Christoph Kappel | |
| 15 | 13 | Christoph Kappel |
{{lightbox(contrib/graviton, Graviton)}}
|
| 16 | 1 | ||
| 17 | 15 | Christoph Kappel |
h3. Usage |
| 18 | 15 | Christoph Kappel | |
| 19 | 34 | Christoph Kappel |
Start [wiki#Graviton|Graviton]] on the commandline via @ruby graviton.rb@. Then just draw rectangles on the grid like e.g. via the rectangular masking tool from "GIMP":http://www.gimp.org/. Every new rectangle will have a different color to make it easier to distingish between each. To resize a rectangle press the left mouse button on one of the corners and move the mouse. |
| 20 | 1 | ||
| 21 | 35 | Christoph Kappel |
The *print* button will display the created new [subtle:gravity|gravities]] with their color name in a format that can be used in the config of [[subtle:subtle]]. |
| 22 | 17 | Christoph Kappel | |
| 23 | 15 | Christoph Kappel |
h3. Colors |
| 24 | 15 | Christoph Kappel | |
| 25 | 34 | Christoph Kappel |
Following colors are used in [[wiki#Graviton|Graviton]] in given order: |
| 26 | 15 | Christoph Kappel | |
| 27 | 22 | Christoph Kappel |
{{color(#00FFFF, cyan)}}
|
| 28 | 22 | Christoph Kappel |
{{color(#008000, green)}}
|
| 29 | 22 | Christoph Kappel |
{{color(#808000, olive)}}
|
| 30 | 22 | Christoph Kappel |
{{color(#008080, teal)}}
|
| 31 | 22 | Christoph Kappel |
{{color(#0000FF, blue)}}
|
| 32 | 22 | Christoph Kappel |
{{color(#C0C0C0, silver)}}
|
| 33 | 22 | Christoph Kappel |
{{color(#00FF00, lime)}}
|
| 34 | 21 | Christoph Kappel |
{{color(#000080, navy)}}
|
| 35 | 22 | Christoph Kappel |
{{color(#800080, purple)}}
|
| 36 | 22 | Christoph Kappel |
{{color(#FF00FF, magenta)}}
|
| 37 | 22 | Christoph Kappel |
{{color(#800000, maroon)}}
|
| 38 | 22 | Christoph Kappel |
{{color(#FF0000, red)}}
|
| 39 | 22 | Christoph Kappel |
{{color(#FFFF00, yellow)}}
|
| 40 | 22 | Christoph Kappel |
{{color(#808080, gray)}}
|
| 41 | 13 | Christoph Kappel | |
| 42 | 2 | Christoph Kappel |
h2. Launcher |
| 43 | 1 | ||
| 44 | 34 | Christoph Kappel |
Launcher that combines modes/tagging of [[subtle:subtle]] with a browser search bar. |
| 45 | 2 | Christoph Kappel | |
| 46 | 2 | Christoph Kappel |
{{lightbox(contrib/launcher, Launcher)}}
|
| 47 | 2 | Christoph Kappel | |
| 48 | 27 | zed b. |
Make sure that levenshtein.rb is also in the PATH otherwise launcher will not work |
| 49 | 27 | zed b. | |
| 50 | 2 | Christoph Kappel |
h3. Features |
| 51 | 2 | Christoph Kappel | |
| 52 | 2 | Christoph Kappel |
* Search for stuff via "Google":http://www.google.com (Chrome/Opera/Firefox) |
| 53 | 2 | Christoph Kappel |
* Point your browser directly to an uri |
| 54 | 6 | Christoph Kappel |
* Launch programs in path |
| 55 | 2 | Christoph Kappel |
* Create tags on the fly with *#tag* |
| 56 | 2 | Christoph Kappel |
* Create views on the fly with *@view* |
| 57 | 19 | Christoph Kappel |
* Set modes on the fly with *+* = full, *^* = float and *** = stick |
| 58 | 2 | Christoph Kappel |
* Tab completion for programs, views and tags |
| 59 | 2 | Christoph Kappel | |
| 60 | 14 | Christoph Kappel |
h3. Usage |
| 61 | 14 | Christoph Kappel | |
| 62 | 34 | Christoph Kappel |
Either call it like @ruby launcher.rb@ from commandline or add following loader and [[subtle:grabs|grab]] to your [[subtle:subtle]] config. |
| 63 | 14 | Christoph Kappel | |
| 64 | 16 | Christoph Kappel |
<pre>{{hide}}<code class="ruby">
|
| 65 | 18 | Christoph Kappel |
begin |
| 66 | 14 | Christoph Kappel |
require "#{ENV["HOME"]}/path/to/launcher.rb"
|
| 67 | 28 | Christoph Kappel |
rescue LoadError => error |
| 68 | 28 | Christoph Kappel |
puts error |
| 69 | 28 | Christoph Kappel |
end |
| 70 | 28 | Christoph Kappel | |
| 71 | 28 | Christoph Kappel |
grab "W-x" do |
| 72 | 28 | Christoph Kappel |
Subtle::Contrib::Launcher.run |
| 73 | 28 | Christoph Kappel |
end |
| 74 | 28 | Christoph Kappel |
</code></pre> |
| 75 | 28 | Christoph Kappel | |
| 76 | 28 | Christoph Kappel |
h3. Configuration |
| 77 | 28 | Christoph Kappel | |
| 78 | 28 | Christoph Kappel |
Per 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. |
| 79 | 28 | Christoph Kappel | |
| 80 | 28 | Christoph Kappel |
h4. Fonts |
| 81 | 28 | Christoph Kappel | |
| 82 | 28 | Christoph Kappel |
<pre>{{hide}}<code class="ruby">
|
| 83 | 28 | Christoph Kappel |
begin |
| 84 | 28 | Christoph Kappel |
require "#{ENV["HOME"]}/path/to/launcher.rb"
|
| 85 | 28 | Christoph Kappel | |
| 86 | 19 | Christoph Kappel |
# Set fonts |
| 87 | 19 | Christoph Kappel |
Subtle::Contrib::Launcher.fonts = [ |
| 88 | 19 | Christoph Kappel |
"xft:DejaVu Sans Mono:pixelsize=80:antialias=true", |
| 89 | 14 | Christoph Kappel |
"xft:DejaVu Sans Mono:pixelsize=12:antialias=true" |
| 90 | 18 | Christoph Kappel |
] |
| 91 | 14 | Christoph Kappel |
rescue LoadError => error |
| 92 | 16 | Christoph Kappel |
puts error |
| 93 | 1 |
end |
|
| 94 | 28 | Christoph Kappel |
</code></pre> |
| 95 | 1 | ||
| 96 | 28 | Christoph Kappel |
h4. Paths |
| 97 | 28 | Christoph Kappel | |
| 98 | 28 | Christoph Kappel |
<pre>{{hide}}<code class="ruby">
|
| 99 | 28 | Christoph Kappel |
begin |
| 100 | 28 | Christoph Kappel |
require "#{ENV["HOME"]}/path/to/launcher.rb"
|
| 101 | 28 | Christoph Kappel | |
| 102 | 28 | Christoph Kappel |
# Set paths |
| 103 | 28 | Christoph Kappel |
Subtle::Contrib::Launcher.paths = [ "/usr/bin", "~/bin" ] |
| 104 | 28 | Christoph Kappel |
rescue LoadError => error |
| 105 | 28 | Christoph Kappel |
puts error |
| 106 | 14 | Christoph Kappel |
end |
| 107 | 14 | Christoph Kappel |
</code></pre> |
| 108 | 2 | Christoph Kappel | |
| 109 | 3 | Christoph Kappel |
h3. Examples |
| 110 | 12 | Christoph Kappel | |
| 111 | 12 | Christoph Kappel |
|_. Insert |_. Description | |
| 112 | 29 | Christoph Kappel |
| g subtle wm | Change to browser view and search for _subtle wm_ via "Google":http://google.com | |
| 113 | 12 | Christoph Kappel |
| urxvt @editor | Open urxvt on view @editor with dummy tag | |
| 114 | 1 |
| urxvt @editor #work | Open urxvt on view @editor with tag _work_ | |
|
| 115 | 1 |
| urxvt #work | Open urxvt and tag with tag _work_ | |
|
| 116 | 29 | Christoph Kappel |
| urxvt -urgentOnBell | Open urxvt with the urgentOnBell option | |
| 117 | 1 |
| +urxvt | Open urxvt and set full mode | |
|
| 118 | 1 |
| ^urxvt | Open urxvt and set floating mode | |
|
| 119 | 1 |
| *urxvt | Open urxvt and set sticky mode | |
|
| 120 | 1 |
| urx<hit tab> | Open urxvt (tab completion) | |
|
| 121 | 1 | ||
| 122 | 1 |
h2. Selector |
|
| 123 | 1 | ||
| 124 | 34 | Christoph Kappel |
Merge tags of current and selected views temporarily. |
| 125 | 34 | Christoph Kappel | |
| 126 | 34 | Christoph Kappel |
{{lightbox(contrib/merger, Merger)}}
|
| 127 | 34 | Christoph Kappel | |
| 128 | 34 | Christoph Kappel |
h3. Colors |
| 129 | 34 | Christoph Kappel | |
| 130 | 34 | Christoph Kappel |
|_. Color triplet |_. Meaning | |
| 131 | 34 | Christoph Kappel |
| Focus | Currently selected view | |
| 132 | 34 | Christoph Kappel |
| Title | Current view | |
| 133 | 34 | Christoph Kappel |
| View | Unselected views | |
| 134 | 34 | Christoph Kappel |
| Urgent | Selected views for merge | |
| 135 | 34 | Christoph Kappel | |
| 136 | 34 | Christoph Kappel |
h3. Keys |
| 137 | 34 | Christoph Kappel | |
| 138 | 34 | Christoph Kappel |
|_. Keys |_. Action | |
| 139 | 34 | Christoph Kappel |
| Left, Up | Move to left | |
| 140 | 34 | Christoph Kappel |
| Right, Down | Move to right | |
| 141 | 34 | Christoph Kappel |
| Escape | Hide/exit merger | |
| 142 | 34 | Christoph Kappel |
| Space | Select view for merge | |
| 143 | 34 | Christoph Kappel |
| Return | Merge selected views and exit hide/exit merger | |
| 144 | 34 | Christoph Kappel | |
| 145 | 34 | Christoph Kappel |
h3. Usage |
| 146 | 34 | Christoph Kappel | |
| 147 | 34 | Christoph Kappel |
Either call it like @ruby merger.rb@ from commandline or add following loader and [[subtle:grabs|grab]] to your [[subtle:subtle]] config. |
| 148 | 34 | Christoph Kappel | |
| 149 | 34 | Christoph Kappel |
<pre>{{hide}}<code class="ruby">
|
| 150 | 34 | Christoph Kappel |
begin |
| 151 | 34 | Christoph Kappel |
require "#{ENV["HOME"]}/path/to/merger.rb"
|
| 152 | 34 | Christoph Kappel |
rescue LoadError => error |
| 153 | 34 | Christoph Kappel |
puts error |
| 154 | 34 | Christoph Kappel |
end |
| 155 | 34 | Christoph Kappel | |
| 156 | 34 | Christoph Kappel |
grab "W-m" do |
| 157 | 34 | Christoph Kappel |
Subtle::Contrib::Merger.run |
| 158 | 34 | Christoph Kappel |
end |
| 159 | 34 | Christoph Kappel |
</code></pre> |
| 160 | 34 | Christoph Kappel | |
| 161 | 34 | Christoph Kappel |
h3. Configuration |
| 162 | 34 | Christoph Kappel | |
| 163 | 34 | Christoph Kappel |
Per default, the [[Wiki#Merger|merger]] uses *fixed* as font, this can be changed after requiring the @merger.rb@ and +before+ running it for the first time. |
| 164 | 34 | Christoph Kappel | |
| 165 | 34 | Christoph Kappel |
h4. Fonts |
| 166 | 34 | Christoph Kappel | |
| 167 | 34 | Christoph Kappel |
<pre>{{hide}}<code class="ruby">
|
| 168 | 34 | Christoph Kappel |
begin |
| 169 | 34 | Christoph Kappel |
require "#{ENV["HOME"]}/path/to/merger.rb"
|
| 170 | 34 | Christoph Kappel | |
| 171 | 34 | Christoph Kappel |
# Set font |
| 172 | 34 | Christoph Kappel |
Subtle::Contrib::Merger.font = "xft:DejaVu Sans Mono:pixelsize=80:antialias=true" |
| 173 | 34 | Christoph Kappel |
rescue LoadError => error |
| 174 | 34 | Christoph Kappel |
puts error |
| 175 | 34 | Christoph Kappel |
end |
| 176 | 34 | Christoph Kappel |
</code></pre> |
| 177 | 34 | Christoph Kappel | |
| 178 | 34 | Christoph Kappel |
h2. Selector |
| 179 | 34 | Christoph Kappel | |
| 180 | 30 | Christoph Kappel |
Client selector that works like the subscription selector in "Google Reader":http://www.google.com/reader |
| 181 | 30 | Christoph Kappel | |
| 182 | 30 | Christoph Kappel |
{{lightbox(contrib/selector, Selector)}}
|
| 183 | 30 | Christoph Kappel | |
| 184 | 30 | Christoph Kappel |
h3. Colors |
| 185 | 30 | Christoph Kappel | |
| 186 | 34 | Christoph Kappel |
|_. Color triplet |_. Meaning | |
| 187 | 34 | Christoph Kappel |
| Focus | Currently selected client | |
| 188 | 34 | Christoph Kappel |
| Occupied | Visible clients on current view | |
| 189 | 34 | Christoph Kappel |
| View | Currently not visible clients | |
| 190 | 33 | Christoph Kappel | |
| 191 | 33 | Christoph Kappel |
h3. Keys |
| 192 | 1 | ||
| 193 | 33 | Christoph Kappel |
|_. Keys |_. Action | |
| 194 | 33 | Christoph Kappel |
| Left, Up | Move to left | |
| 195 | 33 | Christoph Kappel |
| Right, Down | Move to right | |
| 196 | 33 | Christoph Kappel |
| Tab | Cycle through windows/matches | |
| 197 | 33 | Christoph Kappel |
| Escape | Leave input mode/exit selector | |
| 198 | 33 | Christoph Kappel |
| Return | Focus currently selected and hide/exit selector | |
| 199 | 30 | Christoph Kappel |
| Any capital/digit | Select client prefixed with capital letter/digit | |
| 200 | 30 | Christoph Kappel |
| Any text | Select client with matching instance name | |
| 201 | 30 | Christoph Kappel | |
| 202 | 30 | Christoph Kappel |
h3. Usage |
| 203 | 30 | Christoph Kappel | |
| 204 | 34 | Christoph Kappel |
Either call it like @ruby selector.rb@ from commandline or add following loader and [[subtle:grabs|grab]] to your [[subtle:subtle]] config. |
| 205 | 30 | Christoph Kappel | |
| 206 | 30 | Christoph Kappel |
<pre>{{hide}}<code class="ruby">
|
| 207 | 30 | Christoph Kappel |
begin |
| 208 | 30 | Christoph Kappel |
require "#{ENV["HOME"]}/path/to/selector.rb"
|
| 209 | 30 | Christoph Kappel |
rescue LoadError => error |
| 210 | 30 | Christoph Kappel |
puts error |
| 211 | 30 | Christoph Kappel |
end |
| 212 | 30 | Christoph Kappel | |
| 213 | 30 | Christoph Kappel |
grab "W-x" do |
| 214 | 30 | Christoph Kappel |
Subtle::Contrib::Selector.run |
| 215 | 30 | Christoph Kappel |
end |
| 216 | 30 | Christoph Kappel |
</code></pre> |
| 217 | 30 | Christoph Kappel | |
| 218 | 30 | Christoph Kappel |
h3. Configuration |
| 219 | 30 | Christoph Kappel | |
| 220 | 30 | Christoph Kappel |
Per default, the [[Wiki#Selector|selector]] uses *fixed* as font and loads entries from */usr/bin*. This can be changed after requiring the @selector.rb@ and +before+ running it for the first time. |
| 221 | 30 | Christoph Kappel | |
| 222 | 30 | Christoph Kappel |
h4. Fonts |
| 223 | 30 | Christoph Kappel | |
| 224 | 1 |
<pre>{{hide}}<code class="ruby">
|
|
| 225 | 30 | Christoph Kappel |
begin |
| 226 | 30 | Christoph Kappel |
require "#{ENV["HOME"]}/path/to/selector.rb"
|
| 227 | 30 | Christoph Kappel | |
| 228 | 32 | Alex Christe |
# Set font |
| 229 | 30 | Christoph Kappel |
Subtle::Contrib::Selector.font = "xft:DejaVu Sans Mono:pixelsize=80:antialias=true" |
| 230 | 30 | Christoph Kappel |
rescue LoadError => error |
| 231 | 30 | Christoph Kappel |
puts error |
| 232 | 30 | Christoph Kappel |
end |
| 233 | 2 | Christoph Kappel |
</code></pre> |
| 234 | 2 | Christoph Kappel | |
| 235 | 2 | Christoph Kappel |
h2. Styler |
| 236 | 1 | ||
| 237 | 34 | Christoph Kappel |
Helper to create or change [[subtle:subtle]] color [[subtle:themes]]. |
| 238 | 1 | ||
| 239 | 1 |
{{lightbox(contrib/styler, Styler)}}
|
|
| 240 | 17 | Christoph Kappel | |
| 241 | 17 | Christoph Kappel |
h3. Usage |
| 242 | 25 | Christoph Kappel | |
| 243 | 17 | Christoph Kappel |
Start "Styler":http://subforge.org/projects/subtle-contrib/wiki/Wiki/edit#Styler on the commandline via @ruby styler.rb@. It will display a preview of the current colors of "subtle":http://subtle.subforge.org and various color buttons to change them via a color chooser. |
| 244 | 17 | Christoph Kappel | |
| 245 | 17 | Christoph Kappel |
The *print* button will show the new colors on the commandline. |
| 246 | 8 | Christoph Kappel | |
| 247 | 1 |
h2. Vitag |
|
| 248 | 25 | Christoph Kappel | |
| 249 | 17 | Christoph Kappel |
Vitag is a helper to edit window/view tagging with any editor (*$EDITOR*) |
| 250 | 17 | Christoph Kappel | |
| 251 | 17 | Christoph Kappel |
h3. Usage |
| 252 | 25 | Christoph Kappel | |
| 253 | 34 | Christoph Kappel |
Helper that provides a way to change the tags of all views and windows at once. It basically just opens your favorite editor via editor set in *$EDITOR* and prints every view and running client followed by it's tags. When the tags are changed and the file saved it will send the changes to [[subtle:subtle]] in one single event per view/client and non-existing tags will be created accordingly. |
| 254 | 17 | Christoph Kappel | |
| 255 | 1 |
h3. Examples |
|
| 256 | 11 | Christoph Kappel | |
| 257 | 11 | Christoph Kappel |
<pre><code># Views |
| 258 | 11 | Christoph Kappel |
@terms #default #terms |
| 259 | 11 | Christoph Kappel |
@www #browser |
| 260 | 11 | Christoph Kappel |
@gimp #gimp_image #gimp_toolbox #gimp_dock |
| 261 | 10 | Christoph Kappel |
@dev #editor |
| 262 | 11 | Christoph Kappel | |
| 263 | 11 | Christoph Kappel |
# Clients |
| 264 | 10 | Christoph Kappel |
xterm #terms |
| 265 | 1 |
</code></pre> |