Want more features on Pastebin? Sign Up, it's FREE!
Guest

subtle.rb

By: a guest on Jan 14th, 2012  |  syntax: None  |  size: 3.22 KB  |  views: 88  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # subtle.rb
  2.  
  3. # general setup
  4. set :step,              5
  5. set :snap,              10
  6. set :gravity,           :main
  7. set :urgent,            false
  8. set :resize,            false
  9. set :tiling,            false
  10.  
  11. # screen setup
  12. screen 1 do
  13.   top                   [ :views, :spacer, :clock, :center, :mpd ]
  14. end
  15.  
  16. # styles
  17. style :all do
  18.   background            "#bbbbbb"
  19.   font                  "-*-bitocra13-*-*-*-*-*-*-*-*-*-*-*-*"
  20. end
  21.  
  22. style :subtle do
  23.   panel                 "#bbbbbb"
  24. end
  25.  
  26. style :separator do  
  27.   separator             "|"
  28.   foreground            "#333333"
  29. end
  30.  
  31. style :title do
  32.   foreground            "#333333"
  33. end
  34.  
  35. style :clients do
  36.   active                "#660000", 2
  37.   inactive              "#222222", 2
  38. end
  39.  
  40. style :sublets do
  41.   foreground            "#333333"
  42. end
  43.  
  44. sublet :clock do
  45.   interval              1
  46.   format_string         "%A %d %B - %H:%M"
  47. end
  48.  
  49. style :views do
  50.   padding               2, 4, 2
  51.  
  52.   style :focus do
  53.     foreground          "#333333"
  54.     border_bottom       "#333333", 2
  55.   end
  56.  
  57.   style :urgent do
  58.     foreground          "#ff9800"
  59.   end
  60.  
  61.   style :occupied do
  62.     foreground          "#333333"
  63.   end
  64.  
  65.   style :unoccupied do
  66.     foreground          "#333333"
  67.   end
  68. end
  69.  
  70. # W-* = general use
  71. # W-S-* = jump to view
  72. # W-C-* = system
  73.  
  74. # grabs: system
  75. grab "W-C-e",           :SubtleReload
  76. grab "W-C-w",           :SubtleRestart
  77. grab "W-C-q",           :SubtleQuit
  78. grab "W-C-a",           :WindowFloat
  79. grab "W-C-s",           :WindowFull
  80. grab "W-C-d",           :WindowStick
  81. grab "W-C-f",           :WindowZaphod
  82. grab "W-Left",          :WindowLeft
  83. grab "W-Down",          :WindowDown
  84. grab "W-Up",            :WindowUp
  85. grab "W-Right",         :WindowRight
  86. grab "W-x",             :WindowKill
  87.  
  88. # grabs: start programs
  89. grab "W-Return",        "urxvt -name tmux -e tmux"
  90. grab "W-r",             "uzbl-tabbed"
  91. grab "W-t",             "thunderbird"
  92. grab "W-C-Return",      "urxvt -name urxvt -e urxvt"
  93.  
  94. grab "W-s",             "leafpad"
  95. grab "W-d",             "abiword"
  96. grab "W-f",             "xpdf"
  97. grab "W-g",             "pymp"
  98. grab "W-h",             "urxvt -name ncmpcpp -e ncmpcpp"               
  99.  
  100. # grabs: views
  101. grab "W-S-1",           :ViewJump1
  102. grab "W-S-2",           :ViewJump2
  103. grab "W-S-3",           :ViewJump3
  104. grab "W-S-4",           :ViewJump4
  105. grab "W-1",             :ViewSwitch1
  106. grab "W-2",             :ViewSwitch2
  107. grab "W-3",             :ViewSwitch3
  108. grab "W-4",             :ViewSwitch4
  109.  
  110. # grabs: gravities
  111. grab "W-q",             [ :main, :bottom, :full ]
  112.  
  113. # gravities
  114. gravity :full,          [   0,   0, 100, 100 ]
  115. gravity :main,          [   0,   0, 100,  80 ]
  116. gravity :bottom,        [   0,  80, 100,  20 ] 
  117.  
  118. # tags
  119. tag "tmux" do
  120.   match instance: "tmux"
  121.   gravity :main
  122. end
  123.  
  124. tag "term" do
  125.   match instance: "urxvt"
  126.   gravity :main
  127. end
  128.  
  129. tag "www" do
  130.   match "uzbl-tabbed"
  131.   gravity :main
  132. end
  133.  
  134. tag "leafpad" do
  135.   match "leafpad"
  136.   gravity :full
  137. end
  138.  
  139. tag "abiword" do
  140.   match "abiword"
  141.   gravity :full
  142. end
  143.  
  144. tag "xpdf" do
  145.   match "xpdf"
  146.   gravity :full
  147. end
  148.  
  149. tag "mplayer" do
  150.   match "mplayer"
  151.   gravity :main
  152. end
  153.  
  154. tag "thunderbird" do
  155.   match "thunderbird"
  156.   gravity :full
  157. end
  158.  
  159. tag "feh" do
  160.   match "feh"
  161.   gravity :full
  162. end
  163.  
  164. tag "pymp" do
  165.   match "pymp"
  166.   gravity :bottom
  167. end
  168.  
  169. tag "ncmpcpp" do
  170.   match instance: "ncmpcpp"
  171.   gravity :bottom
  172. end
  173.  
  174. on :start do
  175.   Subtlext::Subtle.spawn "uzbl-tabbed"
  176.   Subtlext::Subtle.spawn "urxvt -name tmux -e tmux"
  177.   Subtlext::Subtle.spawn "urxvt -name ncmpcpp -e ncmpcpp"
  178. end
  179.  
  180. # views
  181. view "term",                    "tmux|ncmpcpp|term"
  182. view "inet",                    "www|default"
  183. view "file",                    "leafpad|abiword|xpdf|feh|mplayer|pymp"
  184. view "mail",                    "thunderbird"
clone this paste RAW Paste Data