daily pastebin goal
31%
SHARE
TWEET

subtle conf

a guest Oct 6th, 2011 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. # Separator between sublets
  41. set :separator, "|"
  42.  
  43. # Set the WM_NAME of subtle (Java quirk)
  44. # set :wmname, "LG3D"
  45.  
  46. #
  47. # == Screen
  48. #
  49. # Generally subtle comes with two panels per screen, one on the top and one at
  50. # the bottom. Each panel can be configured with different panel items and
  51. # sublets screen wise. The default config uses top panel on the first screen
  52. # only, it's up to the user to enable the bottom panel or disable either one
  53. # or both.
  54.  
  55. # === Properties
  56. #
  57. # [*stipple*]    This property adds a stipple pattern to both screen panels.
  58. #
  59. #                Example: stipple "~/stipple.xbm"
  60. #                         stipple Subtlext::Icon.new("~/stipple.xbm")
  61. #
  62. # [*top*]        This property adds a top panel to the screen.
  63. #
  64. #                Example: top [ :views, :title ]
  65. #
  66. # [*bottom*]     This property adds a bottom panel to the screen.
  67. #
  68. #                Example: bottom [ :views, :title ]
  69.  
  70. #
  71. # Following items are available for the panels:
  72. #
  73. # [*:views*]     List of views with buttons
  74. # [*:title*]     Title of the current active window
  75. # [*:tray*]      Systray icons (Can be used only once)
  76. # [*:keychain*]  Display current chain (Can be used only once)
  77. # [*:sublets*]   Catch-all for installed sublets
  78. # [*:sublet*]    Name of a sublet for direct placement
  79. # [*:spacer*]    Variable spacer (free width / count of spacers)
  80. # [*:center*]    Enclose items with :center to center them on the panel
  81. # [*:separator*] Insert separator
  82. #
  83. # Empty panels are hidden.
  84. #
  85. # === Links
  86. #
  87. # http://subforge.org/projects/subtle/wiki/Multihead
  88. # http://subforge.org/projects/subtle/wiki/Panel
  89. #
  90.  
  91. screen 1 do
  92.   top    [ :views, :title, :spacer, :keychain, :spacer, :tray, :sublets ]
  93.   bottom [ ]
  94. end
  95.  
  96. # Example for a second screen:
  97. #screen 2 do
  98. #  top    [ :views, :title, :spacer ]
  99. #  bottom [ ]
  100. #end
  101.  
  102. #
  103. # == Styles
  104. #
  105. # Styles define various properties of styleable items in a CSS-like syntax.
  106. #
  107. # If no background color is given no color will be set. This will ensure a
  108. # custom background pixmap won't be overwritten.
  109. #
  110. # Following properties are available for most the styles:
  111. #
  112. # [*foreground*] Foreground text color
  113. # [*background*] Background color
  114. # [*margin*]     Outer spacing
  115. # [*border*]     Border color and size
  116. # [*padding*]    Inner spacing
  117. # [*font*]       Font string (xftontsel or xft)
  118. #
  119. # === Link
  120. #
  121. # http://subforge.org/projects/subtle/wiki/Styles
  122.  
  123. # Style for all style elements
  124. style :all do
  125.   background  "#202020"
  126.   icon        "#757575"
  127.   border      "#303030", 0
  128.   padding     0, 3
  129.   font        "-*-*-*-*-*-*-14-*-*-*-*-*-*-*"
  130.   #font        "xft:sans-8"
  131. end
  132.  
  133. # Style for the views
  134. style :views do
  135.  
  136.   # Style for the active views
  137.   style :focus do
  138.     foreground  "#fecf35"
  139.   end
  140.  
  141.   # Style for urgent window titles and views
  142.   style :urgent do
  143.     foreground  "#ff9800"
  144.   end
  145.  
  146.   # Style for occupied views (views with clients)
  147.   style :occupied do
  148.     foreground  "#b8b8b8"
  149.   end
  150.  
  151.   # Style for unoccupied views (views without clients)
  152.   style :unoccupied do
  153.     foreground  "#757575"
  154.   end
  155. end
  156.  
  157. # Style for sublets
  158. style :sublets do
  159.   foreground  "#757575"
  160. end
  161.  
  162. # Style for separator
  163. style :separator do
  164.   foreground  "#757575"
  165. end
  166.  
  167. # Style for focus window title
  168. style :title do
  169.   foreground  "#fecf35"
  170. end
  171.  
  172. # Style for active/inactive windows
  173. style :clients do
  174.   active      "#303030", 2
  175.   inactive    "#202020", 2
  176.   margin      0
  177.   width       50
  178. end
  179.  
  180. # Style for subtle
  181. style :subtle do
  182.   margin      0, 0, 0, 0
  183.   panel       "#202020"
  184.   background  "#3d3d3d"
  185.   stipple     "#757575"
  186. end
  187.  
  188. #
  189. # == Gravities
  190. #
  191. # Gravities are predefined sizes a window can be set to. There are several ways
  192. # to set a certain gravity, most convenient is to define a gravity via a tag or
  193. # change them during runtime via grab. Subtler and subtlext can also modify
  194. # gravities.
  195. #
  196. # A gravity consists of four values which are a percentage value of the screen
  197. # size. The first two values are x and y starting at the center of the screen
  198. # and he last two values are the width and height.
  199. #
  200. # === Example
  201. #
  202. # Following defines a gravity for a window with 100% width and height:
  203. #
  204. #   gravity :example, [ 0, 0, 100, 100 ]
  205. #
  206. # === Link
  207. #
  208. # http://subforge.org/projects/subtle/wiki/Gravity
  209. #
  210.  
  211. # Top left
  212. gravity :top_left,       [   0,   0,  50,  50 ]
  213. gravity :top_left66,     [   0,   0,  50,  66 ]
  214. gravity :top_left33,     [   0,   0,  50,  34 ]
  215.  
  216. # Top
  217. gravity :top,            [   0,   0, 100,  50 ]
  218. gravity :top66,          [   0,   0, 100,  66 ]
  219. gravity :top33,          [   0,   0, 100,  34 ]
  220.  
  221. # Top right
  222. gravity :top_right,      [  50,   0,  50,  50 ]
  223. gravity :top_right66,    [  50,   0,  50,  66 ]
  224. gravity :top_right33,    [  50,   0,  50,  33 ]
  225.  
  226. # Left
  227. gravity :left,           [   0,   0,  50, 100 ]
  228. gravity :left66,         [   0,   0,  66, 100 ]
  229. gravity :left33,         [   0,   0,  33, 100 ]
  230.  
  231. # Center
  232. gravity :center,         [   0,   0, 100, 100 ]
  233. gravity :center66,       [  17,  17,  66,  66 ]
  234. gravity :center33,       [  33,  33,  33,  33 ]
  235.  
  236. # Right
  237. gravity :right,          [  50,   0,  50, 100 ]
  238. gravity :right66,        [  34,   0,  66, 100 ]
  239. gravity :right33,        [  67,  50,  33, 100 ]
  240.  
  241. # Bottom left
  242. gravity :bottom_left,    [   0,  50,  50,  50 ]
  243. gravity :bottom_left66,  [   0,  34,  50,  66 ]
  244. gravity :bottom_left33,  [   0,  67,  50,  33 ]
  245.  
  246. # Bottom
  247. gravity :bottom,         [   0,  50, 100,  50 ]
  248. gravity :bottom66,       [   0,  34, 100,  66 ]
  249. gravity :bottom33,       [   0,  67, 100,  33 ]
  250.  
  251. # Bottom right
  252. gravity :bottom_right,   [  50,  50,  50,  50 ]
  253. gravity :bottom_right66, [  50,  34,  50,  66 ]
  254. gravity :bottom_right33, [  50,  67,  50,  33 ]
  255.  
  256. # Gimp
  257. gravity :gimp_image,     [  10,   0,  80, 100 ]
  258. gravity :gimp_toolbox,   [   0,   0,  10, 100 ]
  259. gravity :gimp_dock,      [  90,   0,  10, 100 ]
  260.  
  261. #
  262. # == Grabs
  263. #
  264. # Grabs are keyboard and mouse actions within subtle, every grab can be
  265. # assigned either to a key and/or to a mouse button combination. A grab
  266. # consists of a chain and an action.
  267. #
  268. # === Finding keys
  269. #
  270. # The best resource for getting the correct key names is
  271. # */usr/include/X11/keysymdef.h*, but to make life easier here are some hints
  272. # about it:
  273. #
  274. # * Numbers and letters keep their names, so *a* is *a* and *0* is *0*
  275. # * Keypad keys need *KP_* as prefix, so *KP_1* is *1* on the keypad
  276. # * Strip the *XK_* from the key names if looked up in
  277. #   /usr/include/X11/keysymdef.h
  278. # * Keys usually have meaningful english names
  279. # * Modifier keys have special meaning (Alt (A), Control (C), Meta (M),
  280. #   Shift (S), Super (W))
  281. #
  282. # === Chaining
  283. #
  284. # Chains are a combination of keys and modifiers to one or a list of keys
  285. # and can be used in various ways to trigger an action. In subtle, there are
  286. # two ways to define chains for grabs:
  287. #
  288. #   1. *Default*: Add modifiers to a key and use it for a grab
  289. #
  290. #      *Example*: grab "W-Return", "urxvt"
  291. #
  292. #   2. *Chain*: Define a list of grabs that need to be pressed in order
  293. #
  294. #      *Example*: grab "C-y Return", "urxvt"
  295. #
  296. # ==== Mouse buttons
  297. #
  298. # [*B1*]  = Button1 (Left mouse button)
  299. # [*B2*]  = Button2 (Middle mouse button)
  300. # [*B3*]  = Button3 (Right mouse button)
  301. # [*B4*]  = Button4 (Mouse wheel up)
  302. # [*B5*]  = Button5 (Mouse wheel down)
  303. # [*...*]
  304. # [*B20*] = Button20 (Are you sure that this is a mouse and not a keyboard?)
  305. #
  306. # ==== Modifiers
  307. #
  308. # [*A*] = Alt key (Mod1)
  309. # [*C*] = Control key
  310. # [*M*] = Meta key (Mod3)
  311. # [*S*] = Shift key
  312. # [*W*] = Super/Windows key (Mod4)
  313. # [*G*] = Alt Gr (Mod5)
  314. #
  315. # === Action
  316. #
  317. # An action is something that happens when a grab is activated, this can be one
  318. # of the following:
  319. #
  320. # [*symbol*] Run a subtle action
  321. # [*string*] Start a certain program
  322. # [*array*]  Cycle through gravities
  323. # [*lambda*] Run a Ruby proc
  324. #
  325. # === Example
  326. #
  327. # This will create a grab that starts a urxvt when Alt+Enter are pressed:
  328. #
  329. #   grab "A-Return", "urxvt"
  330. #   grab "C-a c",    "urxvt"
  331. #
  332. # === Link
  333. #
  334. # http://subforge.org/projects/subtle/wiki/Grabs
  335. #
  336.  
  337. # Jump to view1, view2, ...
  338. grab "W-S-1", :ViewJump1
  339. grab "W-S-2", :ViewJump2
  340. grab "W-S-3", :ViewJump3
  341. grab "W-S-4", :ViewJump4
  342.  
  343. # Switch current view
  344. grab "W-1", :ViewSwitch1
  345. grab "W-2", :ViewSwitch2
  346. grab "W-3", :ViewSwitch3
  347. grab "W-4", :ViewSwitch4
  348.  
  349. # Select next and prev view */
  350. grab "KP_Add",      :ViewNext
  351. grab "KP_Subtract", :ViewPrev
  352.  
  353. # Move mouse to screen1, screen2, ...
  354. grab "W-A-1", :ScreenJump1
  355. grab "W-A-2", :ScreenJump2
  356. grab "W-A-3", :ScreenJump3
  357. grab "W-A-4", :ScreenJump4
  358.  
  359. # Force reload of config and sublets
  360. grab "W-C-r", :SubtleReload
  361.  
  362. # Force restart of subtle
  363. grab "W-C-S-r", :SubtleRestart
  364.  
  365. # Quit subtle
  366. grab "W-C-q", :SubtleQuit
  367.  
  368. # Move current window
  369. grab "W-B1", :WindowMove
  370.  
  371. # Resize current window
  372. grab "W-B3", :WindowResize
  373.  
  374. # Toggle floating mode of window
  375. grab "W-f", :WindowFloat
  376.  
  377. # Toggle fullscreen mode of window
  378. grab "W-space", :WindowFull
  379.  
  380. # Toggle sticky mode of window (will be visible on all views)
  381. grab "W-s", :WindowStick
  382.  
  383. # Toggle zaphod mode of window (will span across all screens)
  384. grab "W-equal", :WindowZaphod
  385.  
  386. # Raise window
  387. grab "W-r", :WindowRaise
  388.  
  389. # Lower window
  390. grab "W-l", :WindowLower
  391.  
  392. # Select next windows
  393. grab "W-Left",  :WindowLeft
  394. grab "W-Down",  :WindowDown
  395. grab "W-Up",    :WindowUp
  396. grab "W-Right", :WindowRight
  397.  
  398. # Kill current window
  399. grab "W-S-k", :WindowKill
  400.  
  401. # Cycle between given gravities
  402. grab "W-KP_7", [ :top_left,     :top_left66,     :top_left33     ]
  403. grab "W-KP_8", [ :top,          :top66,          :top33          ]
  404. grab "W-KP_9", [ :top_right,    :top_right66,    :top_right33    ]
  405. grab "W-KP_4", [ :left,         :left66,         :left33         ]
  406. grab "W-KP_5", [ :center,       :center66,       :center33       ]
  407. grab "W-KP_6", [ :right,        :right66,        :right33        ]
  408. grab "W-KP_1", [ :bottom_left,  :bottom_left66,  :bottom_left33  ]
  409. grab "W-KP_2", [ :bottom,       :bottom66,       :bottom33       ]
  410. grab "W-KP_3", [ :bottom_right, :bottom_right66, :bottom_right33 ]
  411.  
  412. # In case no numpad is available e.g. on notebooks
  413. #grab "W-q", [ :top_left,     :top_left66,     :top_left33     ]
  414. #grab "W-w", [ :top,          :top66,          :top33          ]
  415. #grab "W-e", [ :top_right,    :top_right66,    :top_right33    ]
  416. #grab "W-a", [ :left,         :left66,         :left33         ]
  417. #grab "W-s", [ :center,       :center66,       :center33       ]
  418. #grab "W-d", [ :right,        :right66,        :right33        ]
  419. #
  420. # QUERTZ
  421. #grab "W-y", [ :bottom_left,  :bottom_left66,  :bottom_left33  ]
  422. #
  423. # QWERTY
  424. #grab "W-z", [ :bottom_left,  :bottom_left66,  :bottom_left33  ]
  425. #
  426. #grab "W-x", [ :bottom,       :bottom66,       :bottom33       ]
  427. #grab "W-c", [ :bottom_right, :bottom_right66, :bottom_right33 ]
  428.  
  429. # Exec programs
  430. grab "W-Return", "urxvt"
  431. grab "W-o", "opera"
  432. grab "W-S-v", "urxvt -name MC -e mc"
  433.  
  434. # Run Ruby lambdas
  435. grab "S-F2" do |c|
  436.   puts c.name
  437. end
  438.  
  439. grab "S-F3" do
  440.   puts Subtlext::VERSION
  441. end
  442.  
  443. #
  444. # == Tags
  445. #
  446. # Tags are generally used in subtle for placement of windows. This placement is
  447. # strict, that means that - aside from other tiling window managers - windows
  448. # must have a matching tag to be on a certain view. This also includes that
  449. # windows that are started on a certain view will not automatically be placed
  450. # there.
  451. #
  452. # There are to ways to define a tag:
  453. #
  454. # === Simple
  455. #
  456. # The simple way just needs a name and a regular expression to just handle the
  457. # placement:
  458. #
  459. # Example:
  460. #
  461. #  tag "terms", "terms"
  462. #
  463. # === Extended
  464. #
  465. # Additionally tags can do a lot more then just control the placement - they
  466. # also have properties than can define and control some aspects of a window
  467. # like the default gravity or the default screen per view.
  468. #
  469. # Example:
  470. #
  471. #  tag "terms" do
  472. #    match   "xterm|[u]?rxvt"
  473. #    gravity :center
  474. #  end
  475. #
  476. # === Default
  477. #
  478. # Whenever a window has no tag it will get the default tag and be placed on the
  479. # default view. The default view can either be set by the user with adding the
  480. # default tag to a view by choice or otherwise the first defined view will be
  481. # chosen automatically.
  482. #
  483. # === Properties
  484. #
  485. # [*borderless*] This property enables the borderless mode for tagged clients.
  486. #
  487. #                Example: borderless true
  488. #                Links:    http://subforge.org/projects/subtle/wiki/Tagging#Borderless
  489. #                          http://subforge.org/projects/subtle/wiki/Clients#Borderless
  490. #
  491. # [*fixed*]      This property enables the fixed mode for tagged clients.
  492. #
  493. #                Example: fixed true
  494. #                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Fixed
  495. #                         http://subforge.org/projects/subtle/wiki/Clients#Fixed
  496. #
  497. # [*float*]      This property enables the float mode for tagged clients.
  498. #
  499. #                Example: float true
  500. #                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Float
  501. #                         http://subforge.org/projects/subtle/wiki/Clients#Float
  502. #
  503. # [*full*]       This property enables the fullscreen mode for tagged clients.
  504. #
  505. #                Example: full true
  506. #                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Fullscreen
  507. #                         http://subforge.org/projects/subtle/wiki/Clients#Fullscreen
  508. #
  509. # [*geometry*]   This property sets a certain geometry as well as floating mode
  510. #                to the tagged client, but only on views that have this tag too.
  511. #                It expects an array with x, y, width and height values whereas
  512. #                width and height must be >0.
  513. #
  514. #                Example: geometry [100, 100, 50, 50]
  515. #                Link:    http://subforge.org/projects/subtle/wiki/Tagging#Geometry
  516. #
  517. # [*gravity*]    This property sets a certain to gravity to the tagged client,
  518. #                but only on views that have this tag too.
  519. #
  520. #                Example: gravity :center
  521. #                Link:    http://subforge.org/projects/subtle/wiki/Tagging#Gravity
  522. #
  523. # [*match*]      This property adds matching patterns to a tag, a tag can have
  524. #                more than one. Matching works either via plaintext, regex
  525. #                (see man regex(7)) or window id. Per default tags will only
  526. #                match the WM_NAME and the WM_CLASS portion of a client, this
  527. #                can be changed with following possible values:
  528. #
  529. #                [*:name*]      Match the WM_NAME
  530. #                [*:instance*]  Match the first (instance) part from WM_CLASS
  531. #                [*:class*]     Match the second (class) part from WM_CLASS
  532. #                [*:role*]      Match the window role
  533. #                [*:type*]      Match the window type
  534. #
  535. #                Examples: match instance: "urxvt"
  536. #                          match [:role, :class] => "test"
  537. #                          match "[xa]+term"
  538. #                Link:     http://subforge.org/projects/subtle/wiki/Tagging#Match
  539. #
  540. # [*position*]   Similar to the geometry property, this property just sets the
  541. #                x/y coordinates of the tagged client, but only on views that
  542. #                have this tag, too. It expects an array with x and y values.
  543. #
  544. #                Example: position [ 10, 10 ]
  545. #                Link:    http://subforge.org/projects/subtle/wiki/Tagging#Position
  546. #
  547. # [*resize*]     This property enables the float mode for tagged clients.
  548. #
  549. #                Example: resize true
  550. #                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Resize
  551. #                         http://subforge.org/projects/subtle/wiki/Clients#Resize
  552. #
  553. # [*stick*]      This property enables the float mode for tagged clients.
  554. #
  555. #                Example: stick true
  556. #                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Stick
  557. #                         http://subforge.org/projects/subtle/wiki/Clients#Stick
  558. #
  559. # [*type*]       This property sets the tagged client to be treated as a specific
  560. #                window type though as the window sets the type itself. Following
  561. #                types are possible:
  562. #
  563. #                [*:desktop*]  Treat as desktop window (_NET_WM_WINDOW_TYPE_DESKTOP)
  564. #                              Link: http://subforge.org/projects/subtle/wiki/Clients#Desktop
  565. #                [*:dock*]     Treat as dock window (_NET_WM_WINDOW_TYPE_DOCK)
  566. #                              Link: http://subforge.org/projects/subtle/wiki/Clients#Dock
  567. #                [*:toolbar*]  Treat as toolbar windows (_NET_WM_WINDOW_TYPE_TOOLBAR)
  568. #                              Link: http://subforge.org/projects/subtle/wiki/Clients#Toolbar
  569. #                [*:splash*]   Treat as splash window (_NET_WM_WINDOW_TYPE_SPLASH)
  570. #                              Link: http://subforge.org/projects/subtle/wiki/Clients#Splash
  571. #                [*:dialog*]   Treat as dialog window (_NET_WM_WINDOW_TYPE_DIALOG)
  572. #                              Link: http://subforge.org/projects/subtle/wiki/Clients#Dialog
  573. #
  574. #                Example: type :desktop
  575. #                Link:    http://subforge.org/projects/subtle/wiki/Tagging#Type
  576. #
  577. # [*urgent*]     This property enables the urgent mode for tagged clients.
  578. #
  579. #                Example: stick true
  580. #                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Stick
  581. #                         http://subforge.org/projects/subtle/wiki/Clients#Urgent
  582. #
  583. # [*zaphod*]     This property enables the zaphod mode for tagged clients.
  584. #
  585. #                Example: zaphod true
  586. #                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Zaphod
  587. #                         http://subforge.org/projects/subtle/wiki/Clients#Zaphod
  588. #
  589. #
  590. # === Link
  591. #
  592. # http://subforge.org/projects/subtle/wiki/Tagging
  593. #
  594.  
  595. # Simple tags
  596. #tag "terms",   "xterm|[u]?rxvt"
  597. tag "browser", "uzbl|opera|firefox|navigator"
  598.  
  599. tag "dev" do
  600.   match :instance => "MC"
  601. end
  602.  
  603. # Placement
  604. tag "terms" do
  605.   match :instance => "xterm|[u]?rxvt"
  606. end
  607.  
  608. tag "editor" do
  609.   match  "[g]?vim"
  610.   resize true
  611. end
  612.  
  613. tag "fixed" do
  614.   geometry [ 10, 10, 100, 100 ]
  615.   stick    true
  616. end
  617.  
  618. tag "resize" do
  619.   match  "sakura|gvim"
  620.   resize true
  621. end
  622.  
  623. tag "gravity" do
  624.   gravity :center
  625. end
  626.  
  627. # Modes
  628. tag "stick" do
  629.   match "mplayer"
  630.   float true
  631.   stick true
  632. end
  633.  
  634. tag "float" do
  635.   match "display"
  636.   float true
  637. end
  638.  
  639. # Gimp
  640. tag "gimp_image" do
  641.   match   :role => "gimp-image-window"
  642.   gravity :gimp_image
  643. end
  644.  
  645. tag "gimp_toolbox" do
  646.   match   :role => "gimp-toolbox$"
  647.   gravity :gimp_toolbox
  648. end
  649.  
  650. tag "gimp_dock" do
  651.   match   :role => "gimp-dock"
  652.   gravity :gimp_dock
  653. end
  654.  
  655. #
  656. # == Views
  657. #
  658. # Views are the virtual desktops in subtle, they show all windows that share a
  659. # tag with them. Windows that have no tag will be visible on the default view
  660. # which is the view with the default tag or the first defined view when this
  661. # tag isn't set.
  662. #
  663. # Like tags views can be defined in two ways:
  664. #
  665. # === Simple
  666. #
  667. # The simple way is exactly the same as for tags:
  668. #
  669. # Example:
  670. #
  671. #   view "terms", "terms"
  672. #
  673. # === Extended
  674. #
  675. # The extended way for views is also similar to the tags, but with fewer
  676. # properties.
  677. #
  678. # Example:
  679. #
  680. #  view "terms" do
  681. #    match "terms"
  682. #    icon  "/usr/share/icons/icon.xbm"
  683. #  end
  684. #
  685. # === Properties
  686. #
  687. # [*match*]      This property adds a matching pattern to a view. Matching
  688. #                works either via plaintext or regex (see man regex(7)) and
  689. #                applies to names of tags.
  690. #
  691. #                Example: match "terms"
  692. #
  693. # [*dynamic*]    This property hides unoccupied views, views that display no
  694. #                windows.
  695. #
  696. #                Example: dynamic true
  697. #
  698. # [*icon*]       This property adds an icon in front of the view name. The
  699. #                icon can either be path to an icon or an instance of
  700. #                Subtlext::Icon.
  701. #
  702. #                Example: icon "/usr/share/icons/icon.xbm"
  703. #                         icon Subtlext::Icon.new("/usr/share/icons/icon.xbm")
  704. #
  705. # [*icon_only*]  This property hides the view name from the view buttons, just
  706. #                the icon will be visible.
  707. #
  708. #                Example: icon_only true
  709. #
  710. #
  711. # === Link
  712. #
  713. # http://subforge.org/projects/subtle/wiki/Tagging
  714. #
  715.  
  716. view "terms", "terms|default"
  717. view "www",   "browser"
  718. view "gimp",  "gimp_.*"
  719. view "dev",   "editor"
  720.  
  721. #
  722. # == Sublets
  723. #
  724. # Sublets are Ruby scripts that provide data for the panel and can be managed
  725. # with the sur script that comes with subtle.
  726. #
  727. # === Example
  728. #
  729. #  sur install clock
  730. #  sur uninstall clock
  731. #  sur list
  732. #
  733. # === Configuration
  734. #
  735. # All sublets have a set of configuration values that can be changed directly
  736. # from the config of subtle.
  737. #
  738. # There are three default properties, that can be be changed for every sublet:
  739. #
  740. # [*interval*]    Update interval of the sublet
  741. # [*foreground*]  Default foreground color
  742. # [*background*]  Default background color
  743. #
  744. # sur can also give a brief overview about properties:
  745. #
  746. # === Example
  747. #
  748. #   sur config clock
  749. #
  750. # The syntax of the sublet configuration is similar to other configuration
  751. # options in subtle:
  752. #
  753. # === Example
  754. #
  755. #  sublet :clock do
  756. #    interval      30
  757. #    foreground    "#eeeeee"
  758. #    background    "#000000"
  759. #    format_string "%H:%M:%S"
  760. #  end
  761. #
  762. #  === Link
  763. #
  764. # http://subforge.org/projects/subtle/wiki/Sublets
  765. #
  766. sublet :clock do
  767.     interval      30
  768.     foreground    "#dca3a3"
  769. #    background    "#000000"
  770.     format_string "%H:%M"
  771.   end
  772. #
  773. # == Hooks
  774. #
  775. # And finally hooks are a way to bind Ruby scripts to a certain event.
  776. #
  777. # Following hooks exist so far:
  778. #
  779. # [*:client_create*]    Called whenever a window is created
  780. # [*:client_configure*] Called whenever a window is configured
  781. # [*:client_focus*]     Called whenever a window gets focus
  782. # [*:client_kill*]      Called whenever a window is killed
  783. #
  784. # [*:tag_create*]       Called whenever a tag is created
  785. # [*:tag_kill*]         Called whenever a tag is killed
  786. #
  787. # [*:view_create*]      Called whenever a view is created
  788. # [*:view_configure*]   Called whenever a view is configured
  789. # [*:view_jump*]        Called whenever the view is switched
  790. # [*:view_kill*]        Called whenever a view is killed
  791. #
  792. # [*:tile*]             Called on whenever tiling would be needed
  793. # [*:reload*]           Called on reload
  794. # [*:start*]            Called on start
  795. # [*:exit*]             Called on exit
  796. #
  797. # === Example
  798. #
  799. # This hook will print the name of the window that gets the focus:
  800. #
  801. #   on :client_focus do |c|
  802. #     puts c.name
  803. #   end
  804. #
  805. # === Link
  806. #
  807. # http://subforge.org/projects/subtle/wiki/Hooks
  808. #
  809.  
  810. # vim:ts=2:bs=2:sw=2:et:fdm=marker
  811.  
  812.  
RAW Paste Data
Top