Project

General

Profile

unexist.dev

subtle

Assorted tidbits and projects

subtle.rb

david unric, 08/08/2011 05:45 PM

 
1
#
2
# Author::  Christoph Kappel <unexist@dorfelite.net>
3
# Version:: $Id$
4
# License:: GNU GPLv2
5
#
6
# = Subtle default configuration
7
#
8
# This file will be installed as default and can also be used as a starter for
9
# an own custom configuration file. The system wide config usually resides in
10
# +/etc/xdg/subtle+ and the user config in +HOME/.config/subtle+, both locations
11
# are dependent on the locations specified by +XDG_CONFIG_DIRS+ and
12
# +XDG_CONFIG_HOME+.
13
#
14

    
15
#
16
# == Options
17
#
18
# Following options change behaviour and sizes of the window manager:
19
#
20

    
21
# Window move/resize steps in pixel per keypress
22
set :step, 5
23

    
24
# Window screen border snapping
25
set :snap, 10
26

    
27
# Default starting gravity for windows. Comment out to use gravity of
28
# currently active client
29
set :gravity, :center
30

    
31
# Make transient windows urgent
32
set :urgent, false
33

    
34
# Honor resize size hints globally
35
set :resize, false
36

    
37
# Enable gravity tiling
38
set :tiling, false
39

    
40
# Font string either take from e.g. xfontsel or use xft
41
set :font, "-*-*-medium-*-*-*-14-*-*-*-*-*-*-*"
42
#set :font, "xft:sans-8"
43

    
44
# Separator between sublets
45
set :separator, "|"
46

    
47
# Set the WM_NAME of subtle (Java quirk)
48
# set :wmname, "LG3D"
49

    
50
#
51
# == Screen
52
#
53
# Generally subtle comes with two panels per screen, one on the top and one at
54
# the bottom. Each panel can be configured with different panel items and
55
# sublets screen wise. The default config uses top panel on the first screen
56
# only, it's up to the user to enable the bottom panel or disable either one
57
# or both.
58

    
59
# === Properties
60
#
61
# [*stipple*]    This property adds a stipple pattern to both screen panels.
62
#
63
#                Example: stipple "~/stipple.xbm"
64
#                         stipple Subtlext::Icon.new("~/stipple.xbm")
65
#
66
# [*top*]        This property adds a top panel to the screen.
67
#
68
#                Example: top [ :views, :title ]
69
#
70
# [*bottom*]     This property adds a bottom panel to the screen.
71
#
72
#                Example: bottom [ :views, :title ]
73

    
74
#
75
# Following items are available for the panels:
76
#
77
# [*:views*]     List of views with buttons
78
# [*:title*]     Title of the current active window
79
# [*:tray*]      Systray icons (Can be used only once)
80
# [*:keychain*]  Display current chain (Can be used only once)
81
# [*:sublets*]   Catch-all for installed sublets
82
# [*:sublet*]    Name of a sublet for direct placement
83
# [*:spacer*]    Variable spacer (free width / count of spacers)
84
# [*:center*]    Enclose items with :center to center them on the panel
85
# [*:separator*] Insert separator
86
#
87
# Empty panels are hidden.
88
#
89
# === Links
90
#
91
# http://subforge.org/projects/subtle/wiki/Multihead
92
# http://subforge.org/projects/subtle/wiki/Panel
93
#
94

    
95
screen 1 do
96
  top    [ :views, :title, :spacer, :keychain, :spacer, :tray, :sublets ]
97
  bottom [ ]
98
end
99

    
100
# Example for a second screen:
101
#screen 2 do
102
#  top    [ :views, :title, :spacer ]
103
#  bottom [ ]
104
#end
105

    
106
#
107
# == Styles
108
#
109
# Styles define various properties of styleable items in a CSS-like syntax.
110
#
111
# If no background color is given no color will be set. This will ensure a
112
# custom background pixmap won't be overwritten.
113
#
114
# === Link
115
#
116
# http://subforge.org/projects/subtle/wiki/Styles
117

    
118
# Style for all style elements
119
style :all do
120
  background  "#202020"
121
  border      "#303030", 0
122
  padding     0, 3
123
end
124

    
125
# Style for the views
126
style :views do
127

    
128
  # Style for the active views
129
  style :focus do
130
    foreground  "#fecf35"
131
  end
132

    
133
  # Style for urgent window titles and views
134
  style :urgent do
135
    foreground  "#ff9800"
136
  end
137

    
138
  # Style for occupied views (views with clients)
139
  style :occupied do
140
    foreground  "#b8b8b8"
141
  end
142

    
143
  # Style for unoccupied views (views without clients)
144
  style :unoccupied do
145
    foreground  "#757575"
146
  end
147
end
148

    
149
# Style for sublets
150
style :sublets do
151
  foreground  "#757575"
152
end
153

    
154
# Style for separator
155
style :separator do
156
  foreground  "#757575"
157
end
158

    
159
# Style for focus window title
160
style :title do
161
  foreground  "#fecf35"
162
end
163

    
164
# Style for active/inactive windows
165
style :clients do
166
  active      "#303030", 2
167
  inactive    "#202020", 2
168
  margin      0
169
  width       50
170
end
171

    
172
# Style for subtle
173
style :subtle do
174
  margin      0, 0, 0, 0
175
  panel       "#202020"
176
  background  "#3d3d3d"
177
  stipple     "#757575"
178
end
179

    
180
#
181
# == Gravities
182
#
183
# Gravities are predefined sizes a window can be set to. There are several ways
184
# to set a certain gravity, most convenient is to define a gravity via a tag or
185
# change them during runtime via grab. Subtler and subtlext can also modify
186
# gravities.
187
#
188
# A gravity consists of four values which are a percentage value of the screen
189
# size. The first two values are x and y starting at the center of the screen
190
# and he last two values are the width and height.
191
#
192
# === Example
193
#
194
# Following defines a gravity for a window with 100% width and height:
195
#
196
#   gravity :example, [ 0, 0, 100, 100 ]
197
#
198
# === Link
199
#
200
# http://subforge.org/projects/subtle/wiki/Gravity
201
#
202

    
203
# Top left
204
gravity :top_left,       [   0,   0,  50,  50 ]
205
gravity :top_left66,     [   0,   0,  50,  66 ]
206
gravity :top_left33,     [   0,   0,  50,  34 ]
207

    
208
# Top
209
gravity :top,            [   0,   0, 100,  50 ]
210
gravity :top66,          [   0,   0, 100,  66 ]
211
gravity :top33,          [   0,   0, 100,  34 ]
212

    
213
# Top right
214
gravity :top_right,      [  50,   0,  50,  50 ]
215
gravity :top_right66,    [  50,   0,  50,  66 ]
216
gravity :top_right33,    [  50,   0,  50,  33 ]
217

    
218
# Left
219
gravity :left,           [   0,   0,  50, 100 ]
220
gravity :left66,         [   0,   0,  66, 100 ]
221
gravity :left33,         [   0,   0,  33, 100 ]
222

    
223
# Center
224
gravity :center,         [   0,   0, 100, 100 ]
225
gravity :center66,       [  17,  17,  66,  66 ]
226
gravity :center33,       [  33,  33,  33,  33 ]
227

    
228
# Right
229
gravity :right,          [  50,   0,  50, 100 ]
230
gravity :right66,        [  34,   0,  66, 100 ]
231
gravity :right33,        [  67,  50,  33, 100 ]
232

    
233
# Bottom left
234
gravity :bottom_left,    [   0,  50,  50,  50 ]
235
gravity :bottom_left66,  [   0,  34,  50,  66 ]
236
gravity :bottom_left33,  [   0,  67,  50,  33 ]
237

    
238
# Bottom
239
gravity :bottom,         [   0,  50, 100,  50 ]
240
gravity :bottom66,       [   0,  34, 100,  66 ]
241
gravity :bottom33,       [   0,  67, 100,  33 ]
242

    
243
# Bottom right
244
gravity :bottom_right,   [  50,  50,  50,  50 ]
245
gravity :bottom_right66, [  50,  34,  50,  66 ]
246
gravity :bottom_right33, [  50,  67,  50,  33 ]
247

    
248
# Gimp
249
gravity :gimp_image,     [  10,   0,  80, 100 ]
250
gravity :gimp_toolbox,   [   0,   0,  10, 100 ]
251
gravity :gimp_dock,      [  90,   0,  10, 100 ]
252

    
253
#
254
# == Grabs
255
#
256
# Grabs are keyboard and mouse actions within subtle, every grab can be
257
# assigned either to a key and/or to a mouse button combination. A grab
258
# consists of a chain and an action.
259
#
260
# === Finding keys
261
#
262
# The best resource for getting the correct key names is
263
# */usr/include/X11/keysymdef.h*, but to make life easier here are some hints
264
# about it:
265
#
266
# * Numbers and letters keep their names, so *a* is *a* and *0* is *0*
267
# * Keypad keys need *KP_* as prefix, so *KP_1* is *1* on the keypad
268
# * Strip the *XK_* from the key names if looked up in
269
#   /usr/include/X11/keysymdef.h
270
# * Keys usually have meaningful english names
271
# * Modifier keys have special meaning (Alt (A), Control (C), Meta (M),
272
#   Shift (S), Super (W))
273
#
274
# === Chaining
275
#
276
# Chains are a combination of keys and modifiers to one or a list of keys
277
# and can be used in various ways to trigger an action. In subtle, there are
278
# two ways to define chains for grabs:
279
#
280
#   1. *Default*: Add modifiers to a key and use it for a grab
281
#
282
#      *Example*: grab "W-Return", "urxvt"
283
#
284
#   2. *Chain*: Define a list of grabs that need to be pressed in order
285
#
286
#      *Example*: grab "C-y Return", "urxvt"
287
#
288
# ==== Mouse buttons
289
#
290
# [*B1*] = Button1 (Left mouse button)
291
# [*B2*] = Button2 (Middle mouse button)
292
# [*B3*] = Button3 (Right mouse button)
293
# [*B4*] = Button4 (Mouse wheel up)
294
# [*B5*] = Button5 (Mouse wheel down)
295
#
296
# ==== Modifiers
297
#
298
# [*A*] = Alt key
299
# [*C*] = Control key
300
# [*M*] = Meta key
301
# [*S*] = Shift key
302
# [*W*] = Super (Windows) key
303
#
304
# === Action
305
#
306
# An action is something that happens when a grab is activated, this can be one
307
# of the following:
308
#
309
# [*symbol*] Run a subtle action
310
# [*string*] Start a certain program
311
# [*array*]  Cycle through gravities
312
# [*lambda*] Run a Ruby proc
313
#
314
# === Example
315
#
316
# This will create a grab that starts a urxvt when Alt+Enter are pressed:
317
#
318
#   grab "A-Return", "urxvt"
319
#   grab "C-a c",    "urxvt"
320
#
321
# === Link
322
#
323
# http://subforge.org/projects/subtle/wiki/Grabs
324
#
325

    
326
# Jump to view1, view2, ...
327
grab "W-S-1", :ViewJump1
328
grab "W-S-2", :ViewJump2
329
grab "W-S-3", :ViewJump3
330
grab "W-S-4", :ViewJump4
331

    
332
# Switch current view
333
grab "W-1", :ViewSwitch1
334
grab "W-2", :ViewSwitch2
335
grab "W-3", :ViewSwitch3
336
grab "W-4", :ViewSwitch4
337

    
338
# Select next and prev view */
339
grab "KP_Add",      :ViewNext
340
grab "KP_Subtract", :ViewPrev
341

    
342
# Move mouse to screen1, screen2, ...
343
grab "W-A-1", :ScreenJump1
344
grab "W-A-2", :ScreenJump2
345
grab "W-A-3", :ScreenJump3
346
grab "W-A-4", :ScreenJump4
347

    
348
# Force reload of config and sublets
349
grab "W-C-r", :SubtleReload
350

    
351
# Force restart of subtle
352
grab "W-C-S-r", :SubtleRestart
353

    
354
# Quit subtle
355
grab "W-C-q", :SubtleQuit
356

    
357
# Move current window
358
grab "W-B1", :WindowMove
359

    
360
# Resize current window
361
grab "W-B3", :WindowResize
362

    
363
# Toggle floating mode of window
364
grab "W-f", :WindowFloat
365

    
366
# Toggle fullscreen mode of window
367
grab "W-space", :WindowFull
368

    
369
# Toggle sticky mode of window (will be visible on all views)
370
grab "W-s", :WindowStick
371

    
372
# Toggle zaphod mode of window (will span across all screens)
373
grab "W-equal", :WindowZaphod
374

    
375
# Raise window
376
grab "W-r", :WindowRaise
377

    
378
# Lower window
379
grab "W-l", :WindowLower
380

    
381
# Select next windows
382
grab "W-Left",  :WindowLeft
383
grab "W-Down",  :WindowDown
384
grab "W-Up",    :WindowUp
385
grab "W-Right", :WindowRight
386

    
387
# Kill current window
388
grab "W-S-k", :WindowKill
389

    
390
# Cycle between given gravities
391
grab "W-KP_7", [ :top_left,     :top_left66,     :top_left33     ]
392
grab "W-KP_8", [ :top,          :top66,          :top33          ]
393
grab "W-KP_9", [ :top_right,    :top_right66,    :top_right33    ]
394
grab "W-KP_4", [ :left,         :left66,         :left33         ]
395
grab "W-KP_5", [ :center,       :center66,       :center33       ]
396
grab "W-KP_6", [ :right,        :right66,        :right33        ]
397
grab "W-KP_1", [ :bottom_left,  :bottom_left66,  :bottom_left33  ]
398
grab "W-KP_2", [ :bottom,       :bottom66,       :bottom33       ]
399
grab "W-KP_3", [ :bottom_right, :bottom_right66, :bottom_right33 ]
400

    
401
# In case no numpad is available e.g. on notebooks
402
#grab "W-q", [ :top_left,     :top_left66,     :top_left33     ]
403
#grab "W-w", [ :top,          :top66,          :top33          ]
404
#grab "W-e", [ :top_right,    :top_right66,    :top_right33    ]
405
#grab "W-a", [ :left,         :left66,         :left33         ]
406
#grab "W-s", [ :center,       :center66,       :center33       ]
407
#grab "W-d", [ :right,        :right66,        :right33        ]
408
#
409
# QUERTZ
410
#grab "W-y", [ :bottom_left,  :bottom_left66,  :bottom_left33  ]
411
#
412
# QWERTY
413
#grab "W-z", [ :bottom_left,  :bottom_left66,  :bottom_left33  ]
414
#
415
#grab "W-x", [ :bottom,       :bottom66,       :bottom33       ]
416
#grab "W-c", [ :bottom_right, :bottom_right66, :bottom_right33 ]
417

    
418
# Exec programs
419
grab "W-Return", "urxvt"
420

    
421
# Run Ruby lambdas
422
grab "S-F2" do |c|
423
  puts c.name
424
end
425

    
426
grab "S-F3" do
427
  puts Subtlext::VERSION
428
end
429

    
430
#
431
# == Tags
432
#
433
# Tags are generally used in subtle for placement of windows. This placement is
434
# strict, that means that - aside from other tiling window managers - windows
435
# must have a matching tag to be on a certain view. This also includes that
436
# windows that are started on a certain view will not automatically be placed
437
# there.
438
#
439
# There are to ways to define a tag:
440
#
441
# === Simple
442
#
443
# The simple way just needs a name and a regular expression to just handle the
444
# placement:
445
#
446
# Example:
447
#
448
#  tag "terms", "terms"
449
#
450
# === Extended
451
#
452
# Additionally tags can do a lot more then just control the placement - they
453
# also have properties than can define and control some aspects of a window
454
# like the default gravity or the default screen per view.
455
#
456
# Example:
457
#
458
#  tag "terms" do
459
#    match   "xterm|[u]?rxvt"
460
#    gravity :center
461
#  end
462
#
463
# === Default
464
#
465
# Whenever a window has no tag it will get the default tag and be placed on the
466
# default view. The default view can either be set by the user with adding the
467
# default tag to a view by choice or otherwise the first defined view will be
468
# chosen automatically.
469
#
470
# === Properties
471
#
472
# [*borderless*] This property enables the borderless mode for tagged clients.
473
#
474
#                Example: borderless true
475
#                Links:    http://subforge.org/projects/subtle/wiki/Tagging#Borderless
476
#                          http://subforge.org/projects/subtle/wiki/Clients#Borderless
477
#
478
# [*fixed*]      This property enables the fixed mode for tagged clients.
479
#
480
#                Example: fixed true
481
#                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Fixed
482
#                         http://subforge.org/projects/subtle/wiki/Clients#Fixed
483
#
484
# [*float*]      This property enables the float mode for tagged clients.
485
#
486
#                Example: float true
487
#                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Float
488
#                         http://subforge.org/projects/subtle/wiki/Clients#Float
489
#
490
# [*full*]       This property enables the fullscreen mode for tagged clients.
491
#
492
#                Example: full true
493
#                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Fullscreen
494
#                         http://subforge.org/projects/subtle/wiki/Clients#Fullscreen
495
#
496
# [*geometry*]   This property sets a certain geometry as well as floating mode
497
#                to the tagged client, but only on views that have this tag too.
498
#                It expects an array with x, y, width and height values whereas
499
#                width and height must be >0.
500
#
501
#                Example: geometry [100, 100, 50, 50]
502
#                Link:    http://subforge.org/projects/subtle/wiki/Tagging#Geometry
503
#
504
# [*gravity*]    This property sets a certain to gravity to the tagged client,
505
#                but only on views that have this tag too.
506
#
507
#                Example: gravity :center
508
#                Link:    http://subforge.org/projects/subtle/wiki/Tagging#Gravity
509
#
510
# [*match*]      This property adds matching patterns to a tag, a tag can have
511
#                more than one. Matching works either via plaintext, regex
512
#                (see man regex(7)) or window id. Per default tags will only
513
#                match the WM_NAME and the WM_CLASS portion of a client, this
514
#                can be changed with following possible values:
515
#
516
#                [*:name*]      Match the WM_NAME
517
#                [*:instance*]  Match the first (instance) part from WM_CLASS
518
#                [*:class*]     Match the second (class) part from WM_CLASS
519
#                [*:role*]      Match the window role
520
#                [*:type*]      Match the window type
521
#
522
#                Examples: match instance: "urxvt"
523
#                          match [:role, :class] => "test"
524
#                          match "[xa]+term"
525
#                Link:     http://subforge.org/projects/subtle/wiki/Tagging#Match
526
#
527
# [*position*]   Similar to the geometry property, this property just sets the
528
#                x/y coordinates of the tagged client, but only on views that
529
#                have this tag, too. It expects an array with x and y values.
530
#
531
#                Example: position [ 10, 10 ]
532
#                Link:    http://subforge.org/projects/subtle/wiki/Tagging#Position
533
#
534
# [*resize*]     This property enables the float mode for tagged clients.
535
#
536
#                Example: resize true
537
#                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Resize
538
#                         http://subforge.org/projects/subtle/wiki/Clients#Resize
539
#
540
# [*stick*]      This property enables the float mode for tagged clients.
541
#
542
#                Example: stick true
543
#                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Stick
544
#                         http://subforge.org/projects/subtle/wiki/Clients#Stick
545
#
546
# [*type*]       This property sets the tagged client to be treated as a specific
547
#                window type though as the window sets the type itself. Following
548
#                types are possible:
549
#
550
#                [*:desktop*]  Treat as desktop window (_NET_WM_WINDOW_TYPE_DESKTOP)
551
#                              Link: http://subforge.org/projects/subtle/wiki/Clients#Desktop
552
#                [*:dock*]     Treat as dock window (_NET_WM_WINDOW_TYPE_DOCK)
553
#                              Link: http://subforge.org/projects/subtle/wiki/Clients#Dock
554
#                [*:toolbar*]  Treat as toolbar windows (_NET_WM_WINDOW_TYPE_TOOLBAR)
555
#                              Link: http://subforge.org/projects/subtle/wiki/Clients#Toolbar
556
#                [*:splash*]   Treat as splash window (_NET_WM_WINDOW_TYPE_SPLASH)
557
#                              Link: http://subforge.org/projects/subtle/wiki/Clients#Splash
558
#                [*:dialog*]   Treat as dialog window (_NET_WM_WINDOW_TYPE_DIALOG)
559
#                              Link: http://subforge.org/projects/subtle/wiki/Clients#Dialog
560
#
561
#                Example: type :desktop
562
#                Link:    http://subforge.org/projects/subtle/wiki/Tagging#Type
563
#
564
# [*urgent*]     This property enables the urgent mode for tagged clients.
565
#
566
#                Example: stick true
567
#                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Stick
568
#                         http://subforge.org/projects/subtle/wiki/Clients#Urgent
569
#
570
# [*zaphod*]     This property enables the zaphod mode for tagged clients.
571
#
572
#                Example: zaphod true
573
#                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Zaphod
574
#                         http://subforge.org/projects/subtle/wiki/Clients#Zaphod
575
#
576
#
577
# === Link
578
#
579
# http://subforge.org/projects/subtle/wiki/Tagging
580
#
581

    
582
# Simple tags
583
tag "terms",   "xterm|[u]?rxvt"
584
tag "browser", "uzbl|opera|firefox|navigator"
585

    
586
# Placement
587
tag "editor" do
588
  match  "[g]?vim"
589
  resize true
590
end
591

    
592
tag "fixed" do
593
  geometry [ 10, 10, 100, 100 ]
594
  stick    true
595
end
596

    
597
tag "resize" do
598
  match  "sakura|gvim"
599
  resize true
600
end
601

    
602
tag "gravity" do
603
  gravity :center
604
end
605

    
606
# Modes
607
tag "stick" do
608
  match "mplayer"
609
  float true
610
  stick true
611
end
612

    
613
tag "float" do
614
  match "display"
615
  float true
616
end
617

    
618
# Gimp
619
tag "gimp_image" do
620
  match   :role => "gimp-image-window"
621
  gravity :gimp_image
622
end
623

    
624
tag "gimp_toolbox" do
625
  match   :role => "gimp-toolbox$"
626
  gravity :gimp_toolbox
627
end
628

    
629
tag "gimp_dock" do
630
  match   :role => "gimp-dock"
631
  gravity :gimp_dock
632
end
633

    
634
#
635
# == Views
636
#
637
# Views are the virtual desktops in subtle, they show all windows that share a
638
# tag with them. Windows that have no tag will be visible on the default view
639
# which is the view with the default tag or the first defined view when this
640
# tag isn't set.
641
#
642
# Like tags views can be defined in two ways:
643
#
644
# === Simple
645
#
646
# The simple way is exactly the same as for tags:
647
#
648
# Example:
649
#
650
#   view "terms", "terms"
651
#
652
# === Extended
653
#
654
# The extended way for views is also similar to the tags, but with fewer
655
# properties.
656
#
657
# Example:
658
#
659
#  view "terms" do
660
#    match "terms"
661
#    icon  "/usr/share/icons/icon.xbm"
662
#  end
663
#
664
# === Properties
665
#
666
# [*match*]      This property adds a matching pattern to a view. Matching
667
#                works either via plaintext or regex (see man regex(7)) and
668
#                applies to names of tags.
669
#
670
#                Example: match "terms"
671
#
672
# [*dynamic*]    This property hides unoccupied views, views that display no
673
#                windows.
674
#
675
#                Example: dynamic true
676
#
677
# [*icon*]       This property adds an icon in front of the view name. The
678
#                icon can either be path to an icon or an instance of
679
#                Subtlext::Icon.
680
#
681
#                Example: icon "/usr/share/icons/icon.xbm"
682
#                         icon Subtlext::Icon.new("/usr/share/icons/icon.xbm")
683
#
684
# [*icon_only*]  This property hides the view name from the view buttons, just
685
#                the icon will be visible.
686
#
687
#                Example: icon_only true
688
#
689
#
690
# === Link
691
#
692
# http://subforge.org/projects/subtle/wiki/Tagging
693
#
694

    
695
view "terms", "terms|default"
696
view "www",   "browser"
697
view "gimp",  "gimp_.*"
698
view "dev",   "editor"
699

    
700
#
701
# == Sublets
702
#
703
# Sublets are Ruby scripts that provide data for the panel and can be managed
704
# with the sur script that comes with subtle.
705
#
706
# === Example
707
#
708
#  sur install clock
709
#  sur uninstall clock
710
#  sur list
711
#
712
# === Configuration
713
#
714
# All sublets have a set of configuration values that can be changed directly
715
# from the config of subtle.
716
#
717
# There are three default properties, that can be be changed for every sublet:
718
#
719
# [*interval*]    Update interval of the sublet
720
# [*foreground*]  Default foreground color
721
# [*background*]  Default background color
722
#
723
# sur can also give a brief overview about properties:
724
#
725
# === Example
726
#
727
#   sur config clock
728
#
729
# The syntax of the sublet configuration is similar to other configuration
730
# options in subtle:
731
#
732
# === Example
733
#
734
#  sublet :clock do
735
#    interval      30
736
#    foreground    "#eeeeee"
737
#    background    "#000000"
738
#    format_string "%H:%M:%S"
739
#  end
740
#
741
#  === Link
742
#
743
# http://subforge.org/projects/subtle/wiki/Sublets
744
#
745

    
746
#
747
# == Hooks
748
#
749
# And finally hooks are a way to bind Ruby scripts to a certain event.
750
#
751
# Following hooks exist so far:
752
#
753
# [*:client_create*]    Called whenever a window is created
754
# [*:client_configure*] Called whenever a window is configured
755
# [*:client_focus*]     Called whenever a window gets focus
756
# [*:client_kill*]      Called whenever a window is killed
757
#
758
# [*:tag_create*]       Called whenever a tag is created
759
# [*:tag_kill*]         Called whenever a tag is killed
760
#
761
# [*:view_create*]      Called whenever a view is created
762
# [*:view_configure*]   Called whenever a view is configured
763
# [*:view_jump*]        Called whenever the view is switched
764
# [*:view_kill*]        Called whenever a view is killed
765
#
766
# [*:tile*]             Called on whenever tiling would be needed
767
# [*:reload*]           Called on reload
768
# [*:start*]            Called on start
769
# [*:exit*]             Called on exit
770
#
771
# === Example
772
#
773
# This hook will print the name of the window that gets the focus:
774
#
775
#   on :client_focus do |c|
776
#     puts c.name
777
#   end
778
#
779
# === Link
780
#
781
# http://subforge.org/projects/subtle/wiki/Hooks
782
#
783

    
784
# vim:ts=2:bs=2:sw=2:et:fdm=marker