randalltux

subtle.rb

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