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

subtle + xdefaults (scrot) (+3 likes)

candidate Apr 04, 2014 (wms/subtle)

subtle.rb(raw, dl)

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
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
# -*- encoding: utf-8 -*-
#
# Author::  Christoph Kappel <unexist@subforge.org>
# Version:: $Id: data/subtle.rb,v 3182 2012/02/04 16:39:33 unexist $
# License:: GNU GPLv2
#
# = Subtle default configuration
#
# This file will be installed as default and can also be used as a starter for
# an own custom configuration file. The system wide config usually resides in
# +/etc/xdg/subtle+ and the user config in +HOME/.config/subtle+, both locations
# are dependent on the locations specified by +XDG_CONFIG_DIRS+ and
# +XDG_CONFIG_HOME+.
#

#
# == Options
#
# Following options change behaviour and sizes of the window manager:
#

# == Options
# Window move/resize steps in pixel per keypress
set :increase_step, 10

# Window screen border snapping
set :border_snap, 10

# Default starting gravity for windows. Comment out to use gravity of
# currently active client
set :default_gravity, :ct66

# Make dialog windows urgent and draw focus
set :urgent_dialogs, true

# Honor resize size hints globally
set :honor_size_hints, false

# Enable gravity tiling for all gravities
set :gravity_tiling, false

set :tiling, false

# Enable click-to-focus focus model
set :click_to_focus, false

# Skip pointer movement on e.g. gravity change
set :skip_pointer_warp, false

# Skip pointer movement to urgent windows
set :skip_urgent_warp, false

# Set the WM_NAME of subtle (Java quirk)
# set :wmname, "LG3D"

#
# == Screen
#
# Generally subtle comes with two panels per screen, one on the top and one at
# the bottom. Each panel can be configured with different panel items and
# sublets screen wise. The default config uses top panel on the first screen
# only, it's up to the user to enable the bottom panel or disable either one
# or both.

# === Properties
#
# [*stipple*]    This property adds a stipple pattern to both screen panels.
#
#                Example: stipple "~/stipple.xbm"
#                         stipple Subtlext::Icon.new("~/stipple.xbm")
#
# [*top*]        This property adds a top panel to the screen.
#
#                Example: top [ :views, :title ]
#
# [*bottom*]     This property adds a bottom panel to the screen.
#
#                Example: bottom [ :views, :title ]

#
# Following items are available for the panels:
#
# [*:views*]     List of views with buttons
# [*:title*]     Title of the current active window
# [*:tray*]      Systray icons (Can be used only once)
# [*:keychain*]  Display current chain (Can be used only once)
# [*:sublets*]   Catch-all for installed sublets
# [*:sublet*]    Name of a sublet for direct placement
# [*:spacer*]    Variable spacer (free width / count of spacers)
# [*:ct66*]    Enclose items with :ct66 to center them on the panel
# [*:separator*] Insert separator
#
# Empty panels are hidden.
#
# === Links
#
# http://subforge.org/projects/subtle/wiki/Multihead
# http://subforge.org/projects/subtle/wiki/Panel
#

# == Screen
screen 1 do
    top  [ :conky, ]
    bottom    [ :views, :spacer, :clock, ]

end
# Example for a second screen:
#screen 2 do
#  top    [ :views, :title, :spacer ]
#  bottom [ ]
#end

# Colors

    background_1 =   "#181512"
    background_2 =   "#212121"    

    color_above =    "#373737"
    color_light =    "#a6594a"
    color_medium =   "#DCC58F"
    color_dark =     "#3F5454"
    
#
# == Styles
#
# Styles define various properties of styleable items in a CSS-like syntax.
#
# If no background color is given no color will be set. This will ensure a
# custom background pixmap won't be overwritten.
#
# Following properties are available for most the styles:
#
# [*foreground*] Foreground text color
# [*background*] Background color
# [*margin*]     Outer spacing
# [*border*]     Border color and size
# [*padding*]    Inner spacing
# [*font*]       Font string (xftontsel or xft)
#
# === Link
#
# http://subforge.org/projects/subtle/wiki/Styles

# Styles
    
    style :all do
      padding      2, 2, 2, 2
      margin       0, 0, 0, 0
      icon         color_light
      font         "xft:Dejavu Sans:pixelsize=10:antialias=false"
    end

    style :subtle do
      padding      0, 0, 0, 0
      margin       0, 0, 0, 0 
      panel_top    background_1
      panel_bottom background_1
    end

    style :clients do
      padding      0, 0, 0, 0
      margin       4, 4, 4, 4
      active       color_light, 3
      inactive     color_medium, 3
      width        75
    end
     
    style :title do
      padding      1, 4, 2, 4
      margin       0, 0, 0, 0 
      foreground   color_medium
      background   background_1
      font         "xft:Dejavu Sans:pixelsize=10:antialias=false"
    end
    
    style :sublets do
      padding      1, 4, 2, 4
      margin       0, 0, 0, 0
      foreground   color_medium
      background   background_1
      icon         color_light
      font         "xft:Dejavu Sans:pixelsize=10:antialias=false"
    end

    style :separator do
      padding      1, 2, 2, 2
      margin       0, 0, 0, 0
      foreground   color_above
      background   background_1
      separator    "|"
      font         "xft:Dejavu Sans:pixelsize=10:antialias=false"
    end
     
    style :views do
      padding      1, 5, 2, 5
      margin       0, 0, 0, 0
      foreground   color_medium
      background   background_1
      icon         color_medium
      font         "xft:Dejavu Sans:pixelsize=10:antialias=false"

        style :urgent do
          padding       1, 5, 2, 5
          margin        0, 0, 0, 0
          foreground    color_light
          background    background_1
          icon          color_light
          font          "xft:Dejavu Sans:pixelsize=10:antialias=false"
        end
         
        style :occupied do
          padding       1, 5, 2, 5
          margin        0, 0, 0, 0
          foreground    color_light
          background    background_1
          icon          color_light
          font          "xft:Dejavu Sans:pixelsize=10:antialias=false"
        end
    
        style :focus do
          padding       1, 5, 2, 5
          margin        0, 0, 0, 0
          foreground    color_medium
          background    color_light
          icon          color_medium
          font          "xft:Dejavu Sans:pixelsize=10:antialias=false"
        end
    end     
   
#
# == Gravities
#
# Gravities are predefined sizes a window can be set to. There are several ways
# to set a certain gravity, most convenient is to define a gravity via a tag or
# change them during runtime via grab. Subtler and subtlext can also modify
# gravities.
#
# A gravity consists of four values which are a percentage value of the screen
# size. The first two values are x and y starting at the center of the screen
# and he last two values are the width and height.
#
# === Example
#
# Following defines a gravity for a window with 100% width and height:
#
#   gravity :example, [ 0, 0, 100, 100 ]
#
# === Link
#
# http://subforge.org/projects/subtle/wiki/Gravity
#

# == Gravities {{{
     
    gravity :tl_a1,     [   0,   0,  33,  33 ]
    gravity :tl_a2,     [   0,   0,  50,  33 ]
    gravity :tl_a3,     [   0,   0,  67,  33 ]
     
    gravity :tl_b1,     [   0,   0,  33,  50 ]
    gravity :tl_b2,     [   0,   0,  50,  50 ]
    gravity :tl_b3,     [   0,   0,  67,  50 ]
     
    gravity :tl_c1,     [   0,   0,  33,  67 ]
    gravity :tl_c2,     [   0,   0,  50,  67 ]
    gravity :tl_c3,     [   0,   0,  67,  67 ]
     
    # Top center
    gravity :tc_a1,     [   0,   0, 100,  50 ]
    gravity :tc_a2,     [   0,   0, 100,  67 ]
    gravity :tc_a3,     [   0,   0, 100,  33 ]
     
    gravity :tc_b1,     [  33,   0,  34,  33 ]
    gravity :tc_b2,     [  33,   0,  34,  50 ]
    gravity :tc_b3,     [  33,   0,  34,  67 ]
     
    # Top right
    gravity :tr_a1,     [  67,   0,  33,  33 ]
    gravity :tr_a2,     [  50,   0,  50,  33 ]
    gravity :tr_a3,     [  33,   0,  67,  33 ]
     
    gravity :tr_b1,     [  67,   0,  33,  50 ]
    gravity :tr_b2,     [  50,   0,  50,  50 ]
    gravity :tr_b3,     [  33,   0,  67,  50 ]
     
    gravity :tr_c1,     [  67,   0,  33,  67 ]
    gravity :tr_c2,     [  50,   0,  50,  67 ]
    gravity :tr_c3,     [  33,   0,  67,  67 ]
     
    # Left
    gravity :l_a1,      [   0,  33,  33,  34 ]
    gravity :l_a2,      [   0,  33,  50,  34 ]
    gravity :l_a3,      [   0,  33,  67,  34 ]
     
    gravity :l_b1,      [   0,   0,  33, 100 ]
    gravity :l_b2,      [   0,   0,  50, 100 ]
    gravity :l_b3,      [   0,   0,  67, 100 ]
    
# Center
    gravity :ct,        [   0,   0, 100, 100 ]
    gravity :ct33,      [  33,  33,  34,  34 ] 
    gravity :ct66,      [  25,  25,  50,  50 ], :vert
    gravity :ct40,      [  0,  33,  100,  34 ]
 
    # Right
    gravity :r_a1,      [  67,  33,  33,  34 ]
    gravity :r_a2,      [  50,  33,  50,  34 ]
    gravity :r_a3,      [  33,  33,  67,  34 ]
     
    gravity :r_b1,      [  67,   0,  33, 100 ]
    gravity :r_b2,      [  50,   0,  50, 100 ]
    gravity :r_b3,      [  33,   0,  67, 100 ]
     
    # Bottom left
    gravity :bl_a1,     [   0,  67,  33,  33 ]
    gravity :bl_a2,     [   0,  67,  50,  33 ]
    gravity :bl_a3,     [   0,  67,  67,  33 ]
     
    gravity :bl_b1,     [   0,  50,  33,  50 ]
    gravity :bl_b2,     [   0,  50,  50,  50 ]
    gravity :bl_b3,     [   0,  50,  67,  50 ]
     
    gravity :bl_c1,     [   0,  33,  33,  67 ]
    gravity :bl_c2,     [   0,  33,  50,  67 ]
    gravity :bl_c3,     [   0,  33,  67,  67 ]
     
    # Bottom center
    gravity :bc_a1,     [   0,  50, 100,  50 ]
    gravity :bc_a2,     [   0,  33, 100,  67 ]
    gravity :bc_a3,     [   0,  67, 100,  33 ]

    gravity :bc_b1,     [  33,  67,  34,  33 ]
    gravity :bc_b2,     [  33,  50,  34,  50 ]
    gravity :bc_b3,     [  33,  33,  34,  67 ]
     
    # Bottom right
    gravity :br_a1,     [  67,  67,  33,  33 ]
    gravity :br_a2,     [  50,  67,  50,  33 ]
    gravity :br_a3,     [  33,  67,  67,  33 ]
     
    gravity :br_b1,     [  67,  50,  33,  50 ]
    gravity :br_b2,     [  50,  50,  50,  50 ]
    gravity :br_b3,     [  33,  50,  67,  50 ]
    gravity :br_c1,     [  67,  33,  33,  67 ]
    gravity :br_c2,     [  50,  33,  50,  67 ]
    gravity :br_c3,     [  33,  33,  67,  67 ]

    # Special
    gravity :sp_br,     [  70,  85,  30,  15 ]
    gravity :sp_bl,     [   0,  85,  30,  15 ]
    gravity :sp_tr,     [  70,   0,  30,  15 ]
    gravity :sp_tl,     [   0,   0,  30,  15 ]

    # Gimp
    gravity :gimp_i,    [  10,   0,  80, 100 ]
    gravity :gimp_t,    [   0,   0,  10, 100 ]
    gravity :gimp_d,    [  90,   0,  10, 100 ]
     
     # }}}
     #
# == Grabs
#
# Grabs are keyboard and mouse actions within subtle, every grab can be
# assigned either to a key and/or to a mouse button combination. A grab
# consists of a chain and an action.
#
# === Finding keys
#
# The best resource for getting the correct key names is
# */usr/include/X11/keysymdef.h*, but to make life easier here are some hints
# about it:
#
# * Numbers and letters keep their names, so *a* is *a* and *0* is *0*
# * Keypad keys need *KP_* as prefix, so *KP_1* is *1* on the keypad
# * Strip the *XK_* from the key names if looked up in
#   /usr/include/X11/keysymdef.h
# * Keys usually have meaningful english names
# * Modifier keys have special meaning (Alt (A), Control (C), Meta (M),
#   Shift (S), Super (W))
#
# === Chaining
#
# Chains are a combination of keys and modifiers to one or a list of keys
# and can be used in various ways to trigger an action. In subtle, there are
# two ways to define chains for grabs:
#
#   1. *Default*: Add modifiers to a key and use it for a grab
#
#      *Example*: grab "W-Return", ""
#
#   2. *Chain*: Define a list of grabs that need to be pressed in order
#
#      *Example*: grab "C-y Return", "urxvt"
#
# ==== Mouse buttons
#
# [*B1*]  = Button1 (Left mouse button)
# [*B2*]  = Button2 (Middle mouse button)
# [*B3*]  = Button3 (Right mouse button)
# [*B4*]  = Button4 (Mouse wheel up)
# [*B5*]  = Button5 (Mouse wheel down)
# [*...*]
# [*B20*] = Button20 (Are you sure that this is a mouse and not a keyboard?)
#
# ==== Modifiers
#
# [*A*] = Alt key (Mod1)
# [*C*] = Control key
# [*M*] = Meta key (Mod3)
# [*S*] = Shift key
# [*W*] = Super/Windows key (Mod4)
# [*G*] = Alt Gr (Mod5)
#
# === Action
#
# An action is something that happens when a grab is activated, this can be one
# of the following:
#
# [*symbol*] Run a subtle action
# [*string*] Start a certain program
# [*array*]  Cycle through gravities
# [*lambda*] Run a Ruby proc
#
# === Example
#
# This will create a grab that starts a urxvt when Alt+Enter are pressed:
#
#   grab "A-Return", "urxvt"
#   grab "C-a c",    "urxvt"
#
# === Link
#
# http://subforge.org/projects/subtle/wiki/Grabs
#

# == Grabs {{{

# Jump to view1, view2, ...
grab "W-S-1", :ViewJump1
grab "W-S-2", :ViewJump2
grab "W-S-3", :ViewJump3
grab "W-S-4", :ViewJump4

# Switch current view
grab "W-1", :ViewSwitch1
grab "W-2", :ViewSwitch2
grab "W-3", :ViewSwitch3
grab "W-4", :ViewSwitch4
grab "W-5", :ViewSwitch5

# Select next and prev view */
grab "KP_Add",      :ViewNext
grab "KP_Subtract", :ViewPrev

# Move mouse to screen1, screen2, ...
grab "W-A-1", :ScreenJump1
grab "W-A-2", :ScreenJump2
grab "W-A-3", :ScreenJump3
grab "W-A-4", :ScreenJump4

# Force reload of config and sublets
grab "W-C-r", :SubtleReload

# Force restart of subtle
grab "W-S-r", :SubtleRestart

# Quit subtle
grab "W-C-q", :SubtleQuit

# Move current window
grab "W-B1", :WindowMove

# Resize current window
grab "W-B3", :WindowResize

# Toggle floating mode of window
grab "W-f", :WindowFloat

# Toggle fullscreen mode of window
grab "W-space", :WindowFull

# Toggle sticky mode of window (will be visible on all views)
grab "W-o", :WindowStick

# Toggle zaphod mode of window (will span across all screens)
grab "W-b", :WindowZaphod

# Raise window
grab "W-r", :WindowRaise

# Lower window
grab "W-l", :WindowLower

# Select next windows
grab "W-Left",  :WindowLeft
grab "W-Down",  :WindowDown
grab "W-Up",    :WindowUp
grab "W-Right", :WindowRight

# Kill current window
grab "W-S-k", :WindowKill

    # Cycle between given gravities
	grab "W-KP_9",      [ :tr_a1, :tr_a2, :tr_a3, :tr_b1, :tr_b2, :tr_b3, :tr_c1, :tr_c2, :tr_c3 ]
    grab "W-KP_8",      [ :tc_b1, :tc_b2, :tc_b3, :tc_a3, :tc_a1, :tc_a2                         ]
    grab "W-KP_7",      [ :tl_a1, :tl_a2, :tl_a3, :tl_b1, :tl_b2, :tl_b3, :tl_c1, :tl_c2, :tl_c3 ]
     
    grab "W-KP_6",      [ :r_a1,  :r_a2,  :r_a3,  :r_b1,  :r_b2,  :r_b3                          ]
    grab "W-KP_5",      [ :ct33,  :ct66,  :ct,    :ct40                                          ]
    grab "W-KP_4",      [ :l_a1,  :l_a2,  :l_a3,  :l_b1,  :l_b2,  :l_b3                          ]
     
    grab "W-KP_3",      [ :br_a1, :br_a2, :br_a3, :br_b1, :br_b2, :br_b3, :br_c1, :br_c2, :br_c3 ]
    grab "W-KP_2",      [ :bc_b1, :bc_b2, :bc_b3, :bc_a3, :bc_a1, :bc_a2                         ]
    grab "W-KP_1",      [ :bl_a1, :bl_a2, :bl_a3, :bl_b1, :bl_b2, :bl_b3, :bl_c1, :bl_c2, :bl_c3 ]
     
    grab "W-KP_0",      [ :sp_br, :sp_bl, :sp_tr, :sp_tl                                         ]
     
    # Naviguate through clients 
    grab "A-Tab" do
        clients = Subtlext::Client.visible
        clients.last.instance_eval do
            focus
            raise
        end
    end

    # Go to next non-empty view
    grab "C-F8" do
        vArr = Subtlext::View[:all];
        cindx = vArr.index(Subtlext::View.current);
        for i in 1..vArr.size do
            cV = vArr[(i + cindx) % vArr.size];
            if (!cV.clients.empty? && Subtlext::View.visible.index(cV) == nil) then
                cV.jump;
                break;
            end
        end
    end
 
    # Go to previous non-empty view
    grab "C-F9" do
        vArr = Subtlext::View[:all].reverse;
        cindx = vArr.index(Subtlext::View.current);
        for i in 1..vArr.size do
            cV = vArr[(i + cindx) % vArr.size];
            if (!cV.clients.empty? && Subtlext::View.visible.index(cV) == nil) then
                cV.jump;
                break;
            end
        end
    end
    

    # Scratchpad
    grab "W-Tab" do
       if (c = Subtlext::Client.first("scratchpad"))
         c.toggle_stick
         c.focus
         c.raise
         c.toggle_float
       elsif (c = Subtlext::Subtle.spawn("urxvtc_mod -name scratchpad -e tmux attach"))
         c.tags  = []
         c.flags = [ :stick ]
       end
    end

    # Manually initialize scratchpad
    grab "W-A-Tab" do
      c = Subtlext::Subtle.spawn("urxvtc_mod -name scratchpad -e tmux attach")
         c.tags  = []
         c.flags = [ :stick ]
    end

    # Scratchstack
    scratch_stack   = []
    scratch_current = 0
 
        # Add window to stack
         grab "W-colon" do |c|
            unless scratch_stack.include?(c.win)
                scratch_stack << c.win
                c.tags = []
                c.toggle_stick if c.is_stick?
             end
         end
 
        # Remove window from stack
        grab "W-ugrave" do |c|
            if scratch_stack.include?(c.win)
                c.retag
                scratch_stack.delete(c.win)
            end
        end
 
        # Cycle through stacked windows
        grab "W-exclam" do
            if 0 < scratch_current
                cur_idx = scratch_stack.index(scratch_current)
                cur_client = Subtlext::Client[scratch_current]
                cur_client.toggle_stick
                if cur_idx == scratch_stack.size - 1
                    scratch_current = 0
                    return
                end
                idx = cur_idx + 1
            else
                idx = 0
            end 
            cur = Subtlext::Client[scratch_stack[idx]] 
            scratch_current = cur.win
            cur.toggle_stick
            cur.focus
            cur.raise
        end

    # Launch Selector
    grab "W-comma" do
        Subtle::Contrib::Selector.run
    end

    # Launch Positionner 
    grab "W-semicolon" do
        Subtle::Contrib::Positioner.run
    end

# Exec programs
grab "W-Return", "urxvtc"
grab "C-r",  'dmenu_run -nb "#0d0b0d" -nf "#b8b8b8" -sb "#a6594a" -sf "#DCC58F" -p "run:" -i'
grab "W-C-f", "firefox"
grab "W-C-s", "spacefm"
grab "W-C-d", "deadbeef"
grab "W-C-g", "geany"
grab "W-C-o", "libreoffice"
grab "W-C-y", "rhythmbox"

# Special Keys/Mu
grab "XF86AudioStop", "MpdStop"
grab "XF86AudioPrev", "MpdPrevious"
grab "XF86AudioNext", "MpdNext"
grab "XF86AudioPlay", "MpdToggle"
#grab "XF86AudioMute", "amixer -q set Master 2+"
#XF86AudioRaiseVolume
#XF86AudioLowerVolume

# Run Ruby lambdas
grab "S-F2" do |c|
  puts c.name
end

grab "S-F3" do
  puts Subtlext::VERSION
end

#
# == Tags
#
# Tags are generally used in subtle for placement of windows. This placement is
# strict, that means that - aside from other tiling window managers - windows
# must have a matching tag to be on a certain view. This also includes that
# windows that are started on a certain view will not automatically be placed
# there.
#
# There are to ways to define a tag:
#
# === Simple
#
# The simple way just needs a name and a regular expression to just handle the
# placement:
#
# Example:
#
#  tag "terms", "terms"
#
# === Extended
#
# Additionally tags can do a lot more then just control the placement - they
# also have properties than can define and control some aspects of a window
# like the default gravity or the default screen per view.
#
# Example:
#
#  tag "terms" do
#    match   "xterm|[u]?rxvt"
#    gravity :ct66
#  end
#
# === Default
#
# Whenever a window has no tag it will get the default tag and be placed on the
# default view. The default view can either be set by the user with adding the
# default tag to a view by choice or otherwise the first defined view will be
# chosen automatically.
#
# === Properties
#
# [*borderless*] This property enables the borderless mode for tagged clients.
#
#                Example: borderless true
#                Links:    http://subforge.org/projects/subtle/wiki/Tagging#Borderless
#                          http://subforge.org/projects/subtle/wiki/Clients#Borderless
#
# [*fixed*]      This property enables the fixed mode for tagged clients.
#
#                Example: fixed true
#                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Fixed
#                         http://subforge.org/projects/subtle/wiki/Clients#Fixed
#
# [*float*]      This property enables the float mode for tagged clients.
#
#                Example: float true
#                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Float
#                         http://subforge.org/projects/subtle/wiki/Clients#Float
#
# [*full*]       This property enables the fullscreen mode for tagged clients.
#
#                Example: full true
#                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Fullscreen
#                         http://subforge.org/projects/subtle/wiki/Clients#Fullscreen
#
# [*geometry*]   This property sets a certain geometry as well as floating mode
#                to the tagged client, but only on views that have this tag too.
#                It expects an array with x, y, width and height values whereas
#                width and height must be >0.
#
#                Example: geometry [100, 100, 50, 50]
#                Link:    http://subforge.org/projects/subtle/wiki/Tagging#Geometry
#
# [*gravity*]    This property sets a certain to gravity to the tagged client,
#                but only on views that have this tag too.
#
#                Example: gravity :ct66
#                Link:    http://subforge.org/projects/subtle/wiki/Tagging#Gravity
#
# [*match*]      This property adds matching patterns to a tag, a tag can have
#                more than one. Matching works either via plaintext, regex
#                (see man regex(7)) or window id. Per default tags will only
#                match the WM_NAME and the WM_CLASS portion of a client, this
#                can be changed with following possible values:
#
#                [*:name*]      Match the WM_NAME
#                [*:instance*]  Match the first (instance) part from WM_CLASS
#                [*:class*]     Match the second (class) part from WM_CLASS
#                [*:role*]      Match the window role
#                [*:type*]      Match the window type
#
#                Examples: match instance: "urxvt"
#                          match [:role, :class] => "test"
#                          match "[xa]+term"
#                Link:     http://subforge.org/projects/subtle/wiki/Tagging#Match
#
# [*position*]   Similar to the geometry property, this property just sets the
#                x/y coordinates of the tagged client, but only on views that
#                have this tag, too. It expects an array with x and y values.
#
#                Example: position [ 10, 10 ]
#                Link:    http://subforge.org/projects/subtle/wiki/Tagging#Position
#
# [*resize*]     This property enables the float mode for tagged clients. When set,
#                subtle honors size hints, that define various size constraints like
#                sizes for columns and rows of a terminal.
#
#                Example: resize true
#                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Resize
#                         http://subforge.org/projects/subtle/wiki/Clients#Resize
#
# [*stick*]      This property enables the stick mode for tagged clients. When set,
#                clients are visible on all views, even when they don't have matching
#                tags. On multihead, sticky clients keep the screen they are assigned
#                on.
#
#                Supported values are either true or a number to specify a screen.
#
#                Example: stick true
#                         stick 1
#                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Stick
#                         http://subforge.org/projects/subtle/wiki/Clients#Stick
#
# [*type*]       This property sets the tagged client to be treated as a specific
#                window type though as the window sets the type itself. Following
#                types are possible:
#
#                [*:desktop*]  Treat as desktop window (_NET_WM_WINDOW_TYPE_DESKTOP)
#                              Link: http://subforge.org/projects/subtle/wiki/Clients#Desktop
#                [*:dock*]     Treat as dock window (_NET_WM_WINDOW_TYPE_DOCK)
#                              Link: http://subforge.org/projects/subtle/wiki/Clients#Dock
#                [*:toolbar*]  Treat as toolbar windows (_NET_WM_WINDOW_TYPE_TOOLBAR)
#                              Link: http://subforge.org/projects/subtle/wiki/Clients#Toolbar
#                [*:splash*]   Treat as splash window (_NET_WM_WINDOW_TYPE_SPLASH)
#                              Link: http://subforge.org/projects/subtle/wiki/Clients#Splash
#                [*:dialog*]   Treat as dialog window (_NET_WM_WINDOW_TYPE_DIALOG)
#                              Link: http://subforge.org/projects/subtle/wiki/Clients#Dialog
#
#                Example: type :desktop
#                Link:    http://subforge.org/projects/subtle/wiki/Tagging#Type
#
# [*urgent*]     This property enables the urgent mode for tagged clients. When set,
#                subtle automatically sets this client to urgent.
#
#                Example: urgent true
#                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Stick
#                         http://subforge.org/projects/subtle/wiki/Clients#Urgent
#
# [*zaphod*]     This property enables the zaphod mode for tagged clients. When set,
#                the client spans across all connected screens.
#
#                Example: zaphod true
#                Links:   http://subforge.org/projects/subtle/wiki/Tagging#Zaphod
#                         http://subforge.org/projects/subtle/wiki/Clients#Zaphod
#
#
# === Link
#
# http://subforge.org/projects/subtle/wiki/Tagging
#

# Simple tags
tag "terms",   "xterm|[u]?rxvt"
tag "editor",  "geany"
tag "imp",	   "gimp|inkscape"
tag "browser", "uzbl|opera|navigator|firefox"
tag "files", "spacefm|thunar"
tag "media",   "nictotine|soulseek|puddletag|document viewer|vlc|rhythmbox"
tag "writing", "libreoffice"

 # Placement
    tag "browser_full" do
      match "firefox"
      gravity :ct
    end
 tag "media_full" do
      match "nicotine|soulseek|puddletag|document viewer|vlc|rhythmbox"
      gravity :ct
    end
tag "writing_full" do
      match "libreoffice" 
      gravity :ct
    end
    
    # Apps definition
 tag "editor" do
  match  "[g]?vim, geany"
  resize true
end

# Modes
#    tag "stick" do
#      match "mplayerr|vlc"
#      stick true
#    end
     
    tag "float" do
      match "mplayer|nitrogen|file-roller|display|feh"
      float true
    end

    tag "fixed" do
      match "display|gimp_*"
      fixed true
    end

    tag "borderless" do
      match "display|evince|epdfview"
      type :desktop
      borderless true
    end

    tag "urgent" do
      match "feh|display|file-roller"
      urgent true
    end

    tag "full" do
      match "epdfview"
      full true
    end

    tag "resize" do
      match "vlc|mplayer|virtualbox"
      resize true
    end

# Gimp
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
#
# Views are the virtual desktops in subtle, they show all windows that share a
# tag with them. Windows that have no tag will be visible on the default view
# which is the view with the default tag or the first defined view when this
# tag isn't set.
#
# Like tags views can be defined in two ways:
#
# === Simple
#
# The simple way is exactly the same as for tags:
#
# Example:
#
#   view "terms", "terms"
#
# === Extended
#
# The extended way for views is also similar to the tags, but with fewer
# properties.
#
# Example:
#
#  view "terms" do
#    match "terms"
#    icon  "/usr/share/icons/icon.xbm"
#  end
#
# === Properties
#
# [*match*]      This property adds a matching pattern to a view. Matching
#                works either via plaintext or regex (see man regex(7)) and
#                applies to names of tags.
#
#                Example: match "terms"
#
# [*dynamic*]    This property hides unoccupied views, views that display no
#                windows.
#
#                Example: dynamic true
#
# [*icon*]       This property adds an icon in front of the view name. The
#                icon can either be path to an icon or an instance of
#                Subtlext::Icon.
#
#                Example: icon "/usr/share/icons/icon.xbm"
#                         icon Subtlext::Icon.new("/usr/share/icons/icon.xbm")
#
# [*icon_only*]  This property hides the view name from the view buttons, just
#                the icon will be visible.
#
#                Example: icon_only true
#
#
# === Link
#
# http://subforge.org/projects/subtle/wiki/Tagging
#
icons = false

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

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

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

view "FILE" do
  match "files|editor"
#  icon Subtlext::Icon.new("#{iconpath}/file3.xbm")
#  icon_only icons
end

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

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

#view "main", "terms|default"
#view "www",  "browser"
#view "docs",  "document|editor"
#view "media",	 "media"

#
# == Sublets
#
# Sublets are Ruby scripts that provide data for the panel and can be managed
# with the sur script that comes with subtle.
#
# === Example
#
#  sur install clock
#  sur uninstall clock
#  sur list
#
# === Configuration
#
# All sublets have a set of configuration values that can be changed directly
# from the config of subtle.
#
# There are three default properties, that can be be changed for every sublet:
#
# [*interval*]    Update interval of the sublet
# [*foreground*]  Default foreground color
# [*background*]  Default background color
#
# sur can also give a brief overview about properties:
#
# === Example
#
#   sur config clock
#
# The syntax of the sublet configuration is similar to other configuration
# options in subtle:
#
# === Example
#
#  sublet :clock do
#    interval      30
#    foreground    "#eeeeee"
#    background    "#000000"
#    format_string "%H:%M:%S"
#  end
#
#  === Link
#
# http://subforge.org/projects/subtle/wiki/Sublets
#

sublet :clock do
interval	30
#format_string	"%H:%M | %a %d %b"
format_string	"%a %d %b"
end

sublet :conky do
  interval 1
end

#
# == Hooks
#
# And finally hooks are a way to bind Ruby scripts to a certain event.
#
# Following hooks exist so far:
#
# [*:client_create*]    Called whenever a window is created
# [*:client_configure*] Called whenever a window is configured
# [*:client_focus*]     Called whenever a window gets focus
# [*:client_kill*]      Called whenever a window is killed
#
# [*:tag_create*]       Called whenever a tag is created
# [*:tag_kill*]         Called whenever a tag is killed
#
# [*:view_create*]      Called whenever a view is created
# [*:view_configure*]   Called whenever a view is configured
# [*:view_jump*]        Called whenever the view is switched
# [*:view_kill*]        Called whenever a view is killed
#
# [*:tile*]             Called on whenever tiling would be needed
# [*:reload*]           Called on reload
# [*:start*]            Called on start
# [*:exit*]             Called on exit
#
# === Example
#
# This hook will print the name of the window that gets the focus:
#
#   on :client_focus do |c|
#     puts c.name
#   end
#
on :start do
#	Subtlext::Subtle.spawn "compton -b"

# === Link
#
# http://subforge.org/projects/subtle/wiki/Hooks
#

# vim:ts=2:bs=2:sw=2:et:fdm=marker

CLICK TO VIEW

x

.Xdefaults(raw, dl)

 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
Xft.lcdfilter: lcddefault
urxvt*font:				xft:anorexia:size=8:antialias=false		
urxvt*boldFont:			xft:anorexia:size=8:antialias=false
urxvt*italicFont:		xft:anorexia:size=8:antialias=false
urxvt*bolditalicFont:	xft:anorexia:size=8:antialias=false
urxvt*scrollBar:		false
urxvt*internalBorder:	3
URxvt*cursorUnderline: true

*foreground: #DCC58F
*background: #181512

! Black Black !
*color0: #252525
*color8: #454545
! Red Red !
*color1: #8c5b3e
*color9: #9f6744
! Green Green !
*color2: #A5AF86
*color10: #BDC79E
! Yellow Yellow!
*color3: #965142
*color11: #a6594a
! Blue Blue !
*color4: #7A9388
*color12: #94B1A3
! Magenta Magenta
*color5: #917154
*color13: #989584
! Cyan Cyan !
*color6: #767D75
*color14: #9DA69E
! White White !
*color7: #b99f8d
*color15: #DCC58F
 

x

Notes

my subtle config, with gravities inspired (stolen) from Graawr’s Classy Touch http://dotshare.it/dots/576/

Comments

crshd said about 10 years ago

Please post those terminal colors in the correct category, they deserve to be found!