guest@dotshare [~/groups/wms/subtle] $ ls Subtle-Light/ | cat

Subtle Light (scrot, raw, dl)

PaulS Nov 12, 2011 (wms/subtle)

SCROT

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
#
# This program can be distributed under the terms of the GNU GPL.
# See the file COPYING.
#
# $Id: .config/subtle/subtle.rb,v 403 2011/11/08 16:03:21 unexist $
#

require "socket"

# Contrib {{{
begin
  require "#{ENV["HOME"]}/bin/launcher/launcher.rb"
  require "#{ENV["HOME"]}/selector.rb"

  Subtle::Contrib::Selector.font  = "xft:Arial:bold:size=10"
  Subtle::Contrib::Launcher.fonts = [
    "xft:Arial:bold:pixelsize=40",
    "xft:Arial:bold:pixelsize=10"
  ]

  Subtle::Contrib::Launcher.browser_screen_num = 0
rescue LoadError
end # }}}

# Options {{{
set :step,      5
set :snap,      10
set :gravity,   :center
set :urgent,    false
set :resize,    false
set :tiling,    false
# }}}

# Screens {{{
screen 1 do
arch = Subtlext::Icon.new("/home/paul/.icons/subtle/subtle1.xbm")
  top     [ :spacer, :mpd, :weather_mod, :spacer, arch ]
  bottom [ :views, :title, :spacer, :cpu, :separator, :battery, :separator, :clock, :separator, :betternotify, :volume, :tray ]
end

# }}}

# Styles {{{
style :all do
  padding    1, 4, 1, 4
  background "snow1"
  font       "xft:Arial:bold:pixelsize=11"
end

style :title do
  foreground "#330066"
end

style :views do
  foreground "#7c7c72"
  icon       "#909090"

  style :focus do
    foreground    "#ffffff"
    icon          "#ff006a"
    border_bottom "#ff006a", 2
  end

  style :occupied do
    icon          "#330066"
    foreground    "#330066"
    border_bottom "#330066", 2
  end

  style :urgent do
    foreground "#c0bd5c"
    icon       "#c0bd5c"
  end

  style :visible do
    padding_top 2
   # border_top  "#ff006a", 2
  end
end

style :sublets do
  style :clock do
       foreground "#399bff" 
       icon       "#399bff" 
  end
  style :tasks do
       foreground "#ff9800"
  end
  style :cpu do
       foreground "3f3f3f"
  end     
  style :weather_mod do
       foreground "#3f3f3f"
       background "snow1"
  end  
  style :betternotify do
       foreground "#ff006a"
       background "snow1"
  end        
       foreground "#3f3f3f"
       background "snow1"
end

style :separator do
  foreground "snow1"
  separator  " "
end

style :clients do
 # active   "#7c7c72", 2
  active "#909090", 1
 # inactive "#494948", 2
  inactive "#f0dfaf", 1
  margin   1
end

style :subtle do
  panel      "snow1"
  #background "#595959"
  stipple    "#595959"
end # }}}

# Gravities {{{
  # Full
gravity :full,           [   0,   0, 100, 100 ]
  # Top left
gravity :top_left,       [ 100,   0,  50,  50 ]
gravity :top_left66,     [ 100,   0,  50,  66 ]
gravity :top_left33,     [ 100,   0,  50,  34 ]

  # Top
gravity :top,            [ 100,   0, 100,  50 ]
gravity :top66,          [ 100,   0, 100,  66 ]
gravity :top33,          [ 100,   0, 100,  34 ]

  # Top right
gravity :top_right,      [ 100,  50,  50,  50 ]
gravity :top_right66,    [ 100,  50,  50,  66 ]
gravity :top_right33,    [ 100,  50,  50,  34 ]

  # Left
gravity :left,           [   0,  50,  50, 100 ]
gravity :left66,         [   0,  50,  50,  66 ]
gravity :left33,         [   0,  50,  25,  34 ]

  # Center
gravity :center,         [   0,   0, 100, 100 ]
gravity :center66,       [   0,   0, 100,  66 ]
gravity :center33,       [   0,   0, 100,  34 ]

  # Right
gravity :right,          [  50,   0,  50, 100 ]
gravity :right66,        [  50,   0,  50,  66 ]
gravity :right33,        [  50,   0,  50,  34 ]

  # Bottom left
gravity :bottom_left,    [   0,  50,  50,  50 ]
gravity :bottom_left66,  [   0,  50,  50,  66 ]
gravity :bottom_left33,  [   0,  50,  50,  34 ]

  # Bottom
gravity :bottom,         [  50,   0, 100, 100 ]
gravity :bottom66,       [  50,   0, 100,  66 ]
gravity :bottom33,       [  50,   0, 100,  34 ]

  # Bottom right
gravity :bottom_right,   [   0,  50,  50,  50 ]
gravity :bottom_right66, [   0,  50,  50,  66 ]
gravity :bottom_right33, [   0,  50,  50,  34 ]

 #Gimp
gravity :gimp_image,     [   0,   0,  83, 100 ]
gravity :gimp_toolbox,   [  83,   0,  17,  30 ]
gravity :gimp_dock,      [  83,  30,  17,  70 ]

  # Scratchpad
gravity :scratchpad,     [  20, 50, 60, 45 ]

  # Pidgin
gravity :pidgin,         [   0, 50, 25, 100 ]
# }}}


# Grabs {{{
# Host specific
modkey   = "W"
gravkeys = [ "1", "2", "3", "4", "5", "6", "7", "8", "9" ]

# Views and screens
(1..9).each do |i|
  grab modkey + "-#{i}",   "ViewSwitch#{i}".to_sym
  grab modkey + "-S-#{i}", "ViewJump#{i}".to_sym
end

# Windows
grab modkey + "-q", [ :top_left,     :top_left66,     :top_left33     ]
grab modkey + "-w", [ :top,          :top66,          :top33          ]
grab modkey + "-e", [ :top_right,    :top_right66,    :top_right33    ]
grab modkey + "-a", [ :left,         :left66,         :left33         ]
grab modkey + "-s", [ :center,       :center66,       :center33       ]
grab modkey + "-d", [ :right,        :right66,        :right33        ]
grab modkey + "-y", [ :bottom_left,  :bottom_left66,  :bottom_left33  ]
#grab modkey + "-x", [ :bottom,       :bottom66,       :bottom33       ]
grab modkey + "-B1",      :WindowMove
grab modkey + "-B3",      :WindowResize
grab modkey + "-S-f",     :WindowFloat
grab modkey + "-S-space", :WindowFull
grab modkey + "-s",       :WindowStick
grab modkey + "-r",       :WindowRaise
grab modkey + "-l",       :WindowLower
grab modkey + "-Left",    :WindowLeft
grab modkey + "-Down",    :WindowDown
grab modkey + "-Up",      :WindowUp
grab modkey + "-Right",   :WindowRight
grab modkey + "-S-c",     :WindowKill
grab modkey + "-h", lambda { |c| c.retag }
grab "A-Tab" do
   clients = Subtlext::Client.visible
    
   clients.last.instance_eval do
   focus
   raise
  end
end
                      
grab "A-S-Tab" do 
  clients = Subtlext::Client.visible
                         
  clients.first.instance_eval do                                                 
  lower                                                                        
  end
 clients.first.instance_eval do
 focus
end                                                                            
end

# Reload/restart
grab modkey + "-C-q",     :SubtleQuit
grab modkey + "-C-r",     :SubtleReload
grab modkey + "-C-A-r",   :SubtleRestart

# Multimedia keys
grab "XF86AudioMute",        :VolumeToggle
grab "XF86AudioRaiseVolume", :VolumeRaise
grab "XF86AudioLowerVolume", :VolumeLower
grab "XF86AudioPlay",        :MpdToggle
grab "XF86AudioStop",        :MpdStop
grab "XF86AudioNext",        :MpdNext
grab "XF86AudioPrev",        :MpdPrevious

# Programs
grab modkey + "-Return", "urxvtc"
grab modkey + "-c", "chromium"
grab modkey + "-f", "firefox"
grab modkey + "-t", "thunar"
grab modkey + "-p", "/home/paul/scripts/launcher"
grab modkey + "-S-d", "/home/paul/scripts/todo1"
grab modkey + "-S-r", "urxvtc -name ranger -e ranger"
grab modkey + "-S-n", "urxvtc -name ncmpcpp -e ncmpcpp"

# Contrib
grab "W-x" do
  Subtle::Contrib::Launcher.run
end

grab "W-z" do
  Subtle::Contrib::Selector.run
end

# Scratchpad
grab "W-S-s" do
  if (c = Subtlext::Client.first("scratchpad"))
    c.toggle_stick
    c.focus
  elsif (c = Subtlext::Subtle.spawn("urxvtc -name scratchpad"))
    c.tags  = []
    c.flags = [ :stick ]
  end
end

# Tags {{{
tag "terms" do
  match    instance: "xterm|urxvtc|urxvt|terminal"
 # exclude  instance: "scratchpad"
  gravity  :center
  resize   true
end

tag "net" do
  match "navigator|(google\-)?chrom[e|ium]"
  gravity :center
end

tag "edit" do
  match  "[g]?vim|gedit"
  resize true
end

tag "file" do
  match    "thunar|ranger"
end

tag "im" do
  match    "pidgin"
  gravity :pidgin
end

tag "media" do
  match   "mplayer|ncmpcpp|vlc"
  float   true
  #stick   true
  #urgent  true
end

tag "stuff" do
  match   "calibre"
  gravity :center
end

tag "float" do
  match :name => "Copying*";
  match :name => "Moving*";
  match :name => "File*";
  float true
end

tag "scratchpad" do
  match :instance => "scratchpad"
  gravity :scratchpad
  urgent false
  stick true
end

tag "stick" do
  match  "dialog|subtly|python|gtk.rb|display|pychrom|skype|xev|evince|exe|<unknown>|plugin-container"
  stick  true
  float  true
end

tag "urgent" do
  stick  true
  urgent true
  float  true
end

tag "dialogs" do
  match  "sun-awt-X11-XDialogPeer"
  match type: [ :dialog, :splash ]
  stick true
end

tag "terms" do
  match    "terms"
  gravity  :center
end

tag "gimp_image" do
  match    role: "gimp-image-window"
  gravity  :gimp_image
end

tag "gimp_toolbox" do
  match    role: "gimp-toolbox$"
  gravity  :gimp_toolbox
end

tag "gimp_dock" do
  match    role: "gimp-dock"
  gravity  :gimp_dock
end

tag "gimp_scum" do
  match role: "gimp-.*|screenshot"
end
# }}}

# Views {{{
net       = "net"
terms     = "term"
file      = "file"
im        = "im"
media     = "media"
edit      = "edit"
stuff     = "stuff"
gimp      = "gimp"
libre     = "libre"
icons     = true

iconpath = "#{ENV["HOME"]}/.icons/subtle"

space = {
  :net     => Subtlext::Icon.new("#{iconpath}/invader1.xbm"),
  :terms   => Subtlext::Icon.new("#{iconpath}/invader2.xbm"),
  :file    => Subtlext::Icon.new("#{iconpath}/invader3.xbm"),
  :im      => Subtlext::Icon.new("#{iconpath}/balloon.xbm"),
  :media   => Subtlext::Icon.new("#{iconpath}/movie.xbm"),
  :edit    => Subtlext::Icon.new("#{iconpath}/binder.xbm"),
  :stuff   => Subtlext::Icon.new("#{iconpath}/ghost.xbm"),
  :gimp    => Subtlext::Icon.new("#{iconpath}/pencil.xbm"),
  :libre   => Subtlext::Icon.new("#{iconpath}/mouse.xbm")
}

view "net" do
  match     net
  #icon      "#{iconpath}/world.xbm"
  icon      Subtlext::Icon.new("#{iconpath}/invader1.xbm")
  icon_only icons
end

view "terms" do
  match     terms
  #icon      "#{iconpath}/terminal.xbm"
  icon      Subtlext::Icon.new("#{iconpath}/invader2.xbm")
  icon_only icons
end

view "file" do
  match     file
  #icon      "#{iconpath}/quote.xbm"
  icon      Subtlext::Icon.new("#{iconpath}/invader3.xbm")
  icon_only icons
end

view "im" do
  match   im
  icon     Subtlext::Icon.new("#{iconpath}/balloon.xbm")
  icon_only icons
end

view "media" do
  match   media
  icon     Subtlext::Icon.new("#{iconpath}/movie.xbm")
  icon_only icons
end

view "edit" do
  match   edit
  icon     Subtlext::Icon.new("#{iconpath}/binder.xbm")
  icon_only icons
end

view "stuff" do
  match   stuff
  icon     Subtlext::Icon.new("#{iconpath}/ghost.xbm")
  icon_only icons
end

view "gimp" do
  match     "gimp_.*"
  #icon      "#{iconpath}/paint.xbm"
  icon      Subtlext::Icon.new("#{iconpath}/pencil.xbm")
  icon_only icons
end

view "libre" do
  match     libre
  #icon      "#{iconpath}/bug.xbm"
  icon      Subtlext::Icon.new("#{iconpath}/mouse.xbm")
  icon_only icons
end

#on :view_jump do |v|
#  views = Hash[*Subtlext::Screen.all.map { |s|
#    [ s.view.name.to_sym, space[space.keys[s.id]] ] }.flatten
#  ]
#
#  Subtlext::View.all.each do |va|
#    sym = va.name.to_sym
#
#    if(views.keys.include?(sym))
#      va.icon.copy_area(views[sym])
#    else
#      va.icon.copy_area(space[va.name.to_sym])
#    end
#  end

#  Subtlext::Subtle.render
#end
# }}}
on :start do
   Subtlext::Subtle.spawn "setxkbmap gb"
end

on :start do
   Subtlext::Subtle.spawn "xfsettingsd"
end

on :start do
   Subtlext::Subtle.spawn "nm-applet"
end

on :start do
   Subtlext::Subtle.spawn "setxkbmap -option terminate:ctrl_alt_bksp"
end

on :start do
   Subtlext::Subtle.spawn "gnome-sound-applet"
end

on :start do
   Subtlext::Subtle.spawn "pidgin"
end

# Sublets {{{
#Sublet Colours
#col1 = Subtlext::Color.new("#52d017")                         
#col2 = Subtlext::Color.new("#e67373")                       
#col3 = Subtlext::Color.new("#ffffff") 
#col3 = Subtlext::Color.new("#080808")                      
#col4 = Subtlext::Color.new("#d16587")
#col5 = Subtlext::Color.new("#0D25FD")
#col6 = Subtlext::Color.new("#6699ff")
#col6 = Subtlext::Color.new("#505050")      
#col7 = Subtlext::Color.new("#3bb9ff")  

sublet :clock do
  format_string "%a %b %d, %X"
end

sublet :weather_mod do
  interval 7200
  locale "en"
  units "c"
  location "Swansea"
  day_color "#3f3f3f"
  temp_color "#ff006a"
  sep "-"
  temp_suffix 'c'
end  

sublet :mpd do
  interval 30
  show_colors true
  foreground "#6699FF"
  background "snow1"
  show_icons false
  show_pause true
  def_action "toggle"
  format_string "%artist% - %title%"
  pause_text "mpd paused :("
  artist_color "#52d017"
  title_color "#0D25FD"
  not_running_text "mpd stopped :("
  album_color "#0D25FD"
  stop_color "#3f3f3f"
  pause_color "red"
end  
  
sublet :battery do
  colors 10 => "#FF0000", 20 => "#399bff", 100 => "#33cc00"
  path "/sys/class/power_supply/BAT1"
end 
# }}}

CLICK TO VIEW

x

Notes

Nice Light Subtle WM Theme