Wiki

Version 32 (Alex Christe, 2011-01-24 14:42)

1 2 Christoph Kappel
h1. Subtle-contrib
2 2 Christoph Kappel

                
3 13 Christoph Kappel
{{>toc}}
4 13 Christoph Kappel

                
5 23 Christoph Kappel
Contrib is just a collection of scripts for "subtle":http://subtle.subforge.org, 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 26 Christoph Kappel
Graviton is a helper to create custom "gravities":http://subforge.org/wiki/subtle/Gravity 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 23 Christoph Kappel
Start "Graviton":http://subforge.org/projects/subtle-contrib/wiki/Wiki/edit#Graviton on the commandline via @ruby [email protected] 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 25 Christoph Kappel
The *print* button will display the created new gravities with their color name in a format that can be used in the config of "subtle":http://subtle.subforge.org.
22 17 Christoph Kappel

                
23 15 Christoph Kappel
h3. Colors
24 15 Christoph Kappel

                
25 15 Christoph Kappel
Following colors are used in "Graviton":http://subforge.org/projects/subtle-contrib/wiki/Wiki/edit#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 24 Christoph Kappel
Launcher that combines modes/tagging of "subtle":http://subtle.subforge.org 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 23 Christoph Kappel
Either call it like @ruby [email protected] from commandline or add following loader and "grab":http://subforge.org/wiki/subtle/Grabs to your "subtle":http://subtle.subforge.org 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 19 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

                
77 28 Christoph Kappel
h3. Configuration
78 28 Christoph Kappel

                
79 28 Christoph Kappel
Per default, the [[launcher]] uses *fixed* as font and loads entries from */usr/bin*. This can be changed after requiring the @[email protected] and +before+ running it for the first time.
80 28 Christoph Kappel

                
81 28 Christoph Kappel
h4. Fonts
82 28 Christoph Kappel

                
83 28 Christoph Kappel
<pre>{{hide}}<code class="ruby">
84 28 Christoph Kappel
begin
85 28 Christoph Kappel
  require "#{ENV["HOME"]}/path/to/launcher.rb"
86 28 Christoph Kappel

                
87 19 Christoph Kappel
  # Set fonts
88 19 Christoph Kappel
  Subtle::Contrib::Launcher.fonts = [
89 19 Christoph Kappel
    "xft:DejaVu Sans Mono:pixelsize=80:antialias=true",
90 14 Christoph Kappel
    "xft:DejaVu Sans Mono:pixelsize=12:antialias=true"
91 18 Christoph Kappel
  ]
92 14 Christoph Kappel
rescue LoadError => error
93 16 Christoph Kappel
  puts error
94 1
end
95 28 Christoph Kappel
</code></pre>
96 1

                
97 28 Christoph Kappel
h4. Paths
98 28 Christoph Kappel

                
99 28 Christoph Kappel
<pre>{{hide}}<code class="ruby">
100 28 Christoph Kappel
begin
101 28 Christoph Kappel
  require "#{ENV["HOME"]}/path/to/launcher.rb"
102 28 Christoph Kappel

                
103 28 Christoph Kappel
  # Set paths
104 28 Christoph Kappel
  Subtle::Contrib::Launcher.paths = [ "/usr/bin", "~/bin" ]
105 28 Christoph Kappel
rescue LoadError => error
106 28 Christoph Kappel
  puts error
107 14 Christoph Kappel
end
108 14 Christoph Kappel
</code></pre>
109 2 Christoph Kappel

                
110 3 Christoph Kappel
h3. Examples
111 12 Christoph Kappel

                
112 12 Christoph Kappel
|_. Insert             |_. Description                                                                    |
113 29 Christoph Kappel
| g subtle wm          | Change to browser view and search for _subtle wm_ via "Google":http://google.com |
114 12 Christoph Kappel
| urxvt @editor        | Open urxvt on view @editor with dummy tag                                        |
115 1
| urxvt @editor #work  | Open urxvt on view @editor with tag _work_                                       |
116 1
| urxvt #work          | Open urxvt and tag with tag _work_                                               |
117 29 Christoph Kappel
| urxvt -urgentOnBell  | Open urxvt with the urgentOnBell option                                          |
118 19 Christoph Kappel
| +urxvt               | Open urxvt and set full mode                                                     |
119 19 Christoph Kappel
| ^urxvt               | Open urxvt and set floating mode                                                 |
120 12 Christoph Kappel
| *urxvt               | Open urxvt and set sticky mode                                                   |
121 2 Christoph Kappel
| urx<hit tab>         | Open urxvt (tab completion)                                                      |
122 2 Christoph Kappel

                
123 30 Christoph Kappel
h2. Selector
124 30 Christoph Kappel

                
125 30 Christoph Kappel
Client selector that works like the subscription selector in "Google Reader":http://www.google.com/reader
126 30 Christoph Kappel

                
127 30 Christoph Kappel
{{lightbox(contrib/selector, Selector)}}
128 30 Christoph Kappel

                
129 30 Christoph Kappel
h3. Colors
130 30 Christoph Kappel

                
131 30 Christoph Kappel
|_. Color pair     |_. Meaning                       |
132 30 Christoph Kappel
| Focus            | Currently selected client       |
133 30 Christoph Kappel
| Occupied         | Visible clients on current view |
134 30 Christoph Kappel
| View             | Currently not visible clients   |
135 30 Christoph Kappel

                
136 30 Christoph Kappel
h3. Keys
137 30 Christoph Kappel

                
138 30 Christoph Kappel
|_. Keys           |_. Action                                        |
139 30 Christoph Kappel
| Left, Up         | Move to left                                    |
140 30 Christoph Kappel
| Right, Down      | Move to right                                   |
141 30 Christoph Kappel
| Tab              | Select next client or first                     |
142 30 Christoph Kappel
| Escape           | Exit selector                                   |
143 30 Christoph Kappel
| Return           | Focus currently selected and hide/exit selector |
144 30 Christoph Kappel
| Any letter/digit | Select client starting with letter/digit        |
145 30 Christoph Kappel

                
146 30 Christoph Kappel
h3. Usage
147 30 Christoph Kappel

                
148 30 Christoph Kappel
Either call it like @ruby [email protected] from commandline or add following loader and "grab":http://subforge.org/wiki/subtle/Grabs to your "subtle":http://subtle.subforge.org config.
149 30 Christoph Kappel

                
150 30 Christoph Kappel
<pre>{{hide}}<code class="ruby">
151 30 Christoph Kappel
begin
152 30 Christoph Kappel
  require "#{ENV["HOME"]}/path/to/selector.rb"
153 30 Christoph Kappel
rescue LoadError => error
154 30 Christoph Kappel
  puts error
155 30 Christoph Kappel
end
156 30 Christoph Kappel

                
157 30 Christoph Kappel
grab "W-x" do
158 30 Christoph Kappel
  Subtle::Contrib::Selector.run
159 30 Christoph Kappel
end
160 30 Christoph Kappel
</code></pre>
161 30 Christoph Kappel

                
162 30 Christoph Kappel
h3. Configuration
163 30 Christoph Kappel

                
164 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 @[email protected] and +before+ running it for the first time.
165 30 Christoph Kappel

                
166 30 Christoph Kappel
h4. Fonts
167 30 Christoph Kappel

                
168 30 Christoph Kappel
<pre>{{hide}}<code class="ruby">
169 30 Christoph Kappel
begin
170 30 Christoph Kappel
  require "#{ENV["HOME"]}/path/to/selector.rb"
171 30 Christoph Kappel

                
172 30 Christoph Kappel
  # Set font
173 32 Alex Christe
  Subtle::Contrib::Selector.font = "xft:DejaVu Sans Mono:pixelsize=80:antialias=true"
174 30 Christoph Kappel
rescue LoadError => error
175 30 Christoph Kappel
  puts error
176 30 Christoph Kappel
end
177 30 Christoph Kappel
</code></pre>
178 2 Christoph Kappel

                
179 2 Christoph Kappel
h2. Styler
180 2 Christoph Kappel

                
181 1
Helper to create or change "subtle":http://subtle.subforge.org color themes.
182 1

                
183 1
{{lightbox(contrib/styler, Styler)}}
184 17 Christoph Kappel

                
185 17 Christoph Kappel
h3. Usage
186 25 Christoph Kappel

                
187 17 Christoph Kappel
Start "Styler":http://subforge.org/projects/subtle-contrib/wiki/Wiki/edit#Styler on the commandline via @ruby [email protected] 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.
188 17 Christoph Kappel

                
189 17 Christoph Kappel
The *print* button will show the new colors on the commandline.
190 8 Christoph Kappel

                
191 1
h2. Vitag
192 25 Christoph Kappel

                
193 17 Christoph Kappel
Vitag is a helper to edit window/view tagging with any editor (*$EDITOR*)
194 17 Christoph Kappel

                
195 17 Christoph Kappel
h3. Usage
196 25 Christoph Kappel

                
197 9 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":http://subtle.subforge.org in one single event per view/client and non-existing tags will be created accordingly.
198 17 Christoph Kappel

                
199 1
h3. Examples
200 11 Christoph Kappel

                
201 11 Christoph Kappel
<pre><code># Views
202 11 Christoph Kappel
@terms #default #terms
203 11 Christoph Kappel
@www #browser
204 11 Christoph Kappel
@gimp #gimp_image #gimp_toolbox #gimp_dock
205 10 Christoph Kappel
@dev #editor
206 11 Christoph Kappel

                
207 11 Christoph Kappel
# Clients
208 10 Christoph Kappel
xterm #terms
209 1
</code></pre>