Guest User

subtle blue

a guest
Dec 15th, 2014
223
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # -*- encoding: utf-8 -*-
  2. #
  3. # Author::  Christoph Kappel <unexist@subforge.org>
  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.  
  27. set :border_snap, 10
  28.  
  29. # Default starting gravity for windows. Comment out to use gravity of
  30. # currently active client
  31. #set :default_gravity, :center
  32.  
  33. # Make dialog windows urgent and draw focus
  34. set :urgent_dialogs, false
  35.  
  36. # Honor resize size hints globally
  37. set :honor_size_hints, false
  38.  
  39. # Enable gravity tiling for all gravities
  40. set :gravity_tiling, false
  41.  
  42. # Enable click-to-focus focus model
  43. set :click_to_focus, false
  44.  
  45. # Skip pointer movement on e.g. gravity change
  46. set :skip_pointer_warp, false
  47.  
  48. # Skip pointer movement to urgent windows
  49. set :skip_urgent_warp, false
  50.  
  51. # Set the WM_NAME of subtle (Java quirk)
  52. # set :wmname, "LG3D"
  53.  
  54.  
  55.  
  56. screen 1 do
  57.   top [ :clock, :wifi, :volume, :center, :views, ]
  58.   #bottom    [ :center, :tray, ]
  59.  
  60. end
  61.  
  62. # Style for all style elements
  63.  
  64.    
  65.     style :all do
  66.       padding      2, 2, 2, 2
  67.       margin       0, 0, 0, 0
  68.       icon         "#C2C2A8"
  69.       font         "xft:clean:pixelsize=9"
  70.     end
  71.  
  72.     style :subtle do
  73.       padding      0, 0, 0, 0
  74.       margin       0, 0, 0, 0
  75.       panel_top    "#0d1319"
  76.       panel_bottom "#0d1319"
  77.     end
  78.  
  79.     style :clients do
  80.       padding      0, 0, 0, 0
  81.       margin       4, 4, 4, 4
  82.       active       "#BDC79E", 4
  83.       inactive     "#7F7F7a", 4
  84.       width        75
  85.     end
  86.      
  87.     style :title do
  88.       padding      1, 4, 2, 4
  89.       margin       0, 0, 0, 0
  90.       foreground   "#7A9388"
  91.       background   "#0d1319"
  92.       font         "xft:clean:pixelsize=9"
  93.     end
  94.    
  95.     style :sublets do
  96.       padding      1, 4, 2, 4
  97.       margin       0, 0, 0, 0
  98.       foreground   "#C2C2A8"
  99.       background   "#0d1319"
  100.       icon         "#CD7860"
  101.       font         "xft:clean:pixelsize=9"
  102.     end
  103.  
  104.     style :separator do
  105.       padding      1, 2, 2, 2
  106.       margin       0, 0, 0, 0
  107.       foreground   "#BDC79E"
  108.       background   "#0d1319"
  109.       separator    "|"
  110.       font         "xft:clean:pixelsize=9"
  111.     end
  112.      
  113.     style :views do
  114.       padding      1, 5, 2, 5
  115.       margin       0, 0, 0, 0
  116.       foreground   "#C2C2A8"
  117.       background   "#0d1319"
  118.       icon         "#7A9388"
  119.       font         "xft:clean:pixelsize=9"
  120.  
  121.         style :urgent do
  122.           padding       1, 5, 2, 5
  123.           margin        0, 0, 0, 0
  124.           foreground    "#C2C2A8"
  125.           background    "#0d1319"
  126.           icon          "#C2C2A8"
  127.           font          "xft:clean:pixelsize=9"
  128.         end
  129.          
  130.         style :occupied do
  131.           padding       1, 5, 2, 5
  132.           margin        0, 0, 0, 0
  133.           foreground    "#C2C2A8"
  134.           background    "#0d1319"
  135.           icon          "#C2C2A8"
  136.           font          "xft:clean:pixelsize=9"
  137.         end
  138.    
  139.         style :focus do
  140.           padding       1, 5, 2, 5
  141.           margin        0, 0, 0, 0
  142.           foreground    "#7A9388"
  143.           background    "#0d1319"
  144.           border_bottom "#D6D6D6", 2
  145.           icon          "#7A9388"
  146.           font          "xft:clean:pixelsize=9"
  147.         end
  148.     end
  149.  
  150.  
  151. #
  152. # == Views
  153. #view "" do
  154.  # match "code"
  155.   #icon "/home/literallyryan/images/mail.xbm"
  156. #end
  157.  
  158. #
  159. # == Gravities
  160. #
  161. # Gravities are predefined sizes a window can be set to. There are several ways
  162. # to set a certain gravity, most convenient is to define a gravity via a tag or
  163. # change them during runtime via grab. Subtler and subtlext can also modify
  164. # gravities.
  165. #
  166. # A gravity consists of four values which are a percentage value of the screen
  167. # size. The first two values are x and y starting at the center of the screen
  168. # and he last two values are the width and height.
  169. #
  170.  
  171. # Top left
  172. gravity :top_left,       [   0,   0,  50,  50 ]
  173. gravity :top_left66,     [   0,   0,  50,  66 ]
  174. gravity :top_left33,     [   0,   0,  50,  34 ]
  175.  
  176. # Top
  177. gravity :top,            [   0,   0, 100,  50 ]
  178. gravity :top66,          [   0,   0, 100,  66 ]
  179. gravity :top33,          [   0,   0, 100,  34 ]
  180.  
  181. # Top right
  182. gravity :top_right,      [  50,   0,  50,  50 ]
  183. gravity :top_right66,    [  50,   0,  50,  66 ]
  184. gravity :top_right33,    [  50,   0,  50,  33 ]
  185.  
  186. # Left
  187. gravity :left,           [   0,   0,  50, 100 ]
  188. gravity :left66,         [   0,   0,  66, 100 ]
  189. gravity :left33,         [   0,   0,  33, 100 ]
  190.  
  191. # Center
  192. gravity :center,         [   0,   0, 100, 100 ]
  193. gravity :center66,       [  17,  17,  66,  66 ]
  194. gravity :center33,       [  33,  33,  33,  33 ]
  195.  
  196. # Right
  197. gravity :right,          [  50,   0,  50, 100 ]
  198. gravity :right66,        [  34,   0,  66, 100 ]
  199. gravity :right33,        [  67,   0,  33, 100 ]
  200.  
  201. # Bottom left
  202. gravity :bottom_left,    [   0,  50,  50,  50 ]
  203. gravity :bottom_left66,  [   0,  34,  50,  66 ]
  204. gravity :bottom_left33,  [   0,  67,  50,  33 ]
  205.  
  206. # Bottom
  207. gravity :bottom,         [   0,  50, 100,  50 ]
  208. gravity :bottom66,       [   0,  34, 100,  66 ]
  209. gravity :bottom33,       [   0,  67, 100,  33 ]
  210.  
  211. # Bottom right
  212. gravity :bottom_right,   [  50,  50,  50,  50 ]
  213. gravity :bottom_right66, [  50,  34,  50,  66 ]
  214. gravity :bottom_right33, [  50,  67,  50,  33 ]
  215.  
  216. # Gimp
  217. gravity :gimp_image,     [  10,   0,  80, 100 ]
  218. gravity :gimp_toolbox,   [   0,   0,  10, 100 ]
  219. gravity :gimp_dock,      [  90,   0,  10, 100 ]
  220.  
  221.  
  222. # Switch current view
  223. grab "W-1", :ViewSwitch1
  224. grab "W-2", :ViewSwitch2
  225. grab "W-3", :ViewSwitch3
  226. grab "W-4", :ViewSwitch4
  227.  
  228. # Move mouse to screen1, screen2, ...
  229. grab "W-A-1", :ScreenJump1
  230. grab "W-A-2", :ScreenJump2
  231. grab "W-A-3", :ScreenJump3
  232. grab "W-A-4", :ScreenJump4
  233.  
  234. # Force reload of config and sublets
  235. grab "W-C-r", :SubtleReload
  236.  
  237. # Force restart of subtle
  238. grab "W-A-r", :SubtleRestart
  239.  
  240. # Quit subtle
  241. grab "W-C-q", :SubtleQuit
  242.  
  243. # Move current window
  244. grab "W-B1", :WindowMove
  245.  
  246. # Resize current window
  247. grab "W-B3", :WindowResize
  248.  
  249. # Toggle floating mode of window
  250. grab "W-7", :WindowFloat
  251.  
  252. # Toggle fullscreen mode of window
  253. grab "W-space", :WindowFull
  254.  
  255. # Toggle sticky mode of window (will be visible on all views)
  256. grab "W-s", :WindowStick
  257.  
  258. # Toggle zaphod mode of window (will span across all screens)
  259. grab "W-equal", :WindowZaphod
  260.  
  261. # Raise window
  262. grab "W-r", :WindowRaise
  263.  
  264. # Lower window
  265. grab "W-l", :WindowLower
  266.  
  267. # Select next windows
  268. grab "W-Left",  :WindowLeft
  269. grab "W-Down",  :WindowDown
  270. grab "W-Up",    :WindowUp
  271. grab "W-Right", :WindowRight
  272.  
  273. # Kill current window
  274. grab "W-S-k", :WindowKill
  275.  
  276. # Cycle between given gravities
  277. #grab "W-l-7", [ :top_left,     :top_left66,     :top_left33     ]
  278. #grab "W-KP_8", [ :top,          :top66,          :top33          ]
  279. #grab "W-KP_9", [ :top_right,    :top_right66,    :top_right33    ]
  280. #grab "W-KP_4", [ :left,         :left66,         :left33         ]
  281. #grab "W-KP_5", [ :center,       :center66,       :center33       ]
  282. #grab "W-KP_6", [ :right,        :right66,        :right33        ]
  283. #grab "W-KP_1", [ :bottom_left,  :bottom_left66,  :bottom_left33  ]
  284. #grab "W-KP_2", [ :bottom,       :bottom66,       :bottom33       ]
  285. #grab "W-KP_3", [ :bottom_right, :bottom_right66, :bottom_right33 ]
  286.  
  287. # In case no numpad is available e.g. on notebooks
  288. #grab "W-q", [ :top_left,     :top_left66,     :top_left33     ]
  289. #grab "W-w", [ :top,          :top66,          :top33          ]
  290. #grab "W-e", [ :top_right,    :top_right66,    :top_right33    ]
  291. #grab "W-a", [ :left,         :left66,         :left33         ]
  292. #grab "W-s", [ :center,       :center66,       :center33       ]
  293. #grab "W-d", [ :right,        :right66,        :right33        ]
  294. #
  295. # QUERTZ
  296. #grab "W-y", [ :bottom_left,  :bottom_left66,  :bottom_left33  ]
  297. #
  298. # QWERTY
  299. grab "W-z", [ :bottom_left,  :bottom_left66,  :bottom_left33  ]
  300. grab "W-x", [ :bottom,       :bottom66,       :bottom33       ]
  301. grab "W-c", [ :bottom_right, :bottom_right66, :bottom_right33 ]
  302.  
  303. # Exec programs
  304. grab "W-Return", "urxvt"
  305. grab "W-f", "firefox"
  306. grab "W-g", "gedit"
  307. grab "S-i", "urxvt exec weechat-curses"
  308.  
  309. # Run Ruby lambdas
  310. grab "S-F2" do |c|
  311.   puts c.name
  312. end
  313.  
  314. grab "S-F3" do
  315.   puts Subtlext::VERSION
  316. end
  317.  
  318.  
  319.  
  320. # Simple tags
  321. tag "terms",  "urxvt"
  322.  
  323. tag "www", "firefox|iceweasel" do
  324.   gravity :center
  325. end
  326.  
  327. tag "media", "evince"
  328.  
  329. tag "editor", "gedit|geany"do
  330.   gravity :center
  331. end
  332.  
  333.  
  334.  
  335. # Placement
  336. tag "editor" do
  337.   match  "gedit|geany"
  338.   resize true
  339. end
  340.  
  341. tag "clean" do
  342.   geometry [ 10, 10, 100, 100 ]
  343.   stick    true
  344. end
  345.  
  346. tag "resize" do
  347.   match  "sakura|gvim"
  348.   resize true
  349. end
  350.  
  351. tag "gravity" do
  352.   gravity :center
  353. end
  354.  
  355. # Modes
  356. tag "stick" do
  357.   match "mplayer"
  358.   float true
  359.   stick true
  360. end
  361.  
  362. tag "float" do
  363.   match "display"
  364.   float true
  365. end
  366.  
  367. # Gimp
  368. tag "gimp_image" do
  369.   match   :role => "gimp-image-window"
  370.   gravity :gimp_image
  371. end
  372.  
  373. tag "gimp_toolbox" do
  374.   match   :role => "gimp-toolbox$"
  375.   gravity :gimp_toolbox
  376. end
  377.  
  378. tag "gimp_dock" do
  379.   match   :role => "gimp-dock"
  380.   gravity :gimp_dock
  381. end
  382.  
  383. tag "gimp_scum" do
  384.   match role: "gimp-.*|screenshot"
  385. end
  386.  
  387. #
  388. # == Views
  389. #
  390. # Views are the virtual desktops in subtle, they show all windows that share a
  391. # tag with them. Windows that have no tag will be visible on the default view
  392. # which is the view with the default tag or the first defined view when this
  393. # tag isn't set.
  394. #
  395. # Like tags views can be defined in two ways:
  396. #
  397. # === Simple
  398. #
  399. # The simple way is exactly the same as for tags:
  400. #
  401. # Example:
  402. #
  403. #   view "terms", "terms"
  404. #
  405. # === Extended
  406. #
  407. # The extended way for views is also similar to the tags, but with fewer
  408. # properties.
  409. #
  410. # Example:
  411. #
  412. #  view "terms" do
  413. #    match "terms"
  414. #    icon  "/usr/share/icons/icon.xbm"
  415. #  end
  416. #
  417. # === Properties
  418. #
  419. # [*match*]      This property adds a matching pattern to a view. Matching
  420. #                works either via plaintext or regex (see man regex(7)) and
  421. #                applies to names of tags.
  422. #
  423. #                Example: match "terms"
  424. #
  425. # [*dynamic*]    This property hides unoccupied views, views that display no
  426. #                windows.
  427. #
  428. #                Example: dynamic true
  429. #
  430. # [*icon*]       This property adds an icon in front of the view name. The
  431. #                icon can either be path to an icon or an instance of
  432. #                Subtlext::Icon.
  433. #
  434. #                Example: icon "/usr/share/icons/icon.xbm"
  435. #                         icon Subtlext::Icon.new("/usr/share/icons/icon.xbm")
  436. #
  437. # [*icon_only*]  This property hides the view name from the view buttons, just
  438. #                the icon will be visible.
  439. #
  440. #                Example: icon_only true
  441. #
  442. #
  443. # === Link
  444. #
  445. # http://subforge.org/projects/subtle/wiki/Tagging
  446. #
  447.  
  448. view "terms", "terms|urxvt"
  449. #do
  450.  #   icon "/home/literallyryan/images/cpu.xbm"
  451. #end
  452.  
  453. view "www",   "www|firefox|iceweasel"
  454.  
  455. view "media",  "evince|pdf|media"
  456.  
  457. view "code",   "editor|geany|gedit"
  458.  
  459.  
  460. #
  461. # == Sublets
  462. #
  463. # Sublets are Ruby scripts that provide data for the panel and can be managed
  464. # with the sur script that comes with subtle.
  465. #
  466. # === Example
  467. #
  468. #  sur install clock
  469. #  sur uninstall clock
  470. #  sur list
  471. #
  472. # === Configuration
  473. #
  474. # All sublets have a set of configuration values that can be changed directly
  475. # from the config of subtle.
  476. #
  477. # There are three default properties, that can be be changed for every sublet:
  478. #
  479. # [*interval*]    Update interval of the sublet
  480. # [*foreground*]  Default foreground color
  481. # [*background*]  Default background color
  482. #
  483. # sur can also give a brief overview about properties:
  484. #
  485. # === Example
  486. #
  487. #   sur config clock
  488. #
  489. # The syntax of the sublet configuration is similar to other configuration
  490. # options in subtle:
  491. #
  492. # === Example
  493. #
  494. #  sublet :clock do
  495. #    interval      30
  496. #    foreground    "#eeeeee"
  497. #    background    "#000000"
  498. #    format_string "%H:%M:%S"
  499. #  end
  500. #
  501. #  === Link
  502. #
  503. # http://subforge.org/projects/subtle/wiki/Sublets
  504.  
  505.  
  506.  
  507. sublet :clock do
  508. interval    30
  509. #format_string  "%H:%M | %a %d %b"
  510. format_string   "%a %d %b"
  511. end
  512.  
  513. sublet :tint2 do
  514.   interval 1
  515. end
  516.  
  517. # == Hooks
  518. #
  519. # And finally hooks are a way to bind Ruby scripts to a certain event.
  520. #
  521. # Following hooks exist so far:
  522. #
  523. # [*:client_create*]    Called whenever a window is created
  524. # [*:client_configure*] Called whenever a window is configured
  525. # [*:client_focus*]     Called whenever a window gets focus
  526. # [*:client_kill*]      Called whenever a window is killed
  527. #
  528. # [*:tag_create*]       Called whenever a tag is created
  529. # [*:tag_kill*]         Called whenever a tag is killed
  530. #
  531. # [*:view_create*]      Called whenever a view is created
  532. # [*:view_configure*]   Called whenever a view is configured
  533. # [*:view_jump*]        Called whenever the view is switched
  534. # [*:view_kill*]        Called whenever a view is killed
  535. #
  536. # [*:tile*]             Called on whenever tiling would be needed
  537. # [*:reload*]           Called on reload
  538. # [*:start*]            Called on start
  539. # [*:exit*]             Called on exit
  540. #
  541. # === Example
  542. #
  543. # This hook will print the name of the window that gets the focus:
  544. #
  545. #   on :client_focus do |c|
  546. #     puts c.name
  547. #   end
  548. #
  549. # === Link
  550. #
  551. # http://subforge.org/projects/subtle/wiki/Hooks
  552. #
  553.  
  554. # vim:ts=2:bs=2:sw=2:et:fdm=marker
RAW Paste Data