changeset 3142:9ebcecc9b509

Added alternate, more meaningful names for config set options
author unexist
date Fri, 18 Nov 2011 23:01:47 +0100
parents 007340c8917c
children 4273595140f5
files data/subtle.rb src/subtle/ruby.c
diffstat 2 files changed, 42 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- a/data/subtle.rb	Fri Nov 18 23:01:03 2011 +0100
+++ b/data/subtle.rb	Fri Nov 18 23:01:47 2011 +0100
@@ -19,23 +19,26 @@
 #
 
 # Window move/resize steps in pixel per keypress
-set :step, 5
+set :increase_step, 5
 
 # Window screen border snapping
-set :snap, 10
+set :border_snap, 10
 
 # Default starting gravity for windows. Comment out to use gravity of
 # currently active client
-set :gravity, :center
+set :default_gravity, :center
 
-# Make transient windows urgent
-set :urgent, false
+# Make dialog windows urgent and draw focus
+set :urgent_dialogs, false
 
 # Honor resize size hints globally
-set :resize, false
+set :honor_size_hints, false
 
-# Enable gravity tiling
-set :tiling, false
+# Enable gravity tiling for all gravities
+set :gravity_tiling, false
+
+# Enable click-to-focus focus model
+set :click_to_focus, false
 
 # Set the WM_NAME of subtle (Java quirk)
 # set :wmname, "LG3D"
--- a/src/subtle/ruby.c	Fri Nov 18 23:01:03 2011 +0100
+++ b/src/subtle/ruby.c	Fri Nov 18 23:01:47 2011 +0100
@@ -1842,17 +1842,20 @@
       switch(rb_type(value))
         {
           case T_FIXNUM: /* {{{ */
-            if(CHAR2SYM("step") == option)
+            if(CHAR2SYM("step") == option ||
+                CHAR2SYM("increase_step") == option)
               {
                 if(!(subtle->flags & SUB_SUBTLE_CHECK))
                   subtle->step = FIX2INT(value);
               }
-            else if(CHAR2SYM("snap") == option)
+            else if(CHAR2SYM("snap") == option ||
+                CHAR2SYM("border_snap") == option)
               {
                 if(!(subtle->flags & SUB_SUBTLE_CHECK))
                   subtle->snap = FIX2INT(value);
               }
-            else if(CHAR2SYM("gravity") == option)
+            else if(CHAR2SYM("gravity") == option ||
+                CHAR2SYM("default_gravity") == option)
               {
                 if(!(subtle->flags & SUB_SUBTLE_CHECK))
                   subtle->gravity = value; ///< Store for later
@@ -1861,11 +1864,35 @@
               SYM2CHAR(option));
             break; /* }}} */
           case T_SYMBOL: /* {{{ */
-            if(CHAR2SYM("gravity") == option)
+            if(CHAR2SYM("gravity") == option ||
+                CHAR2SYM("default_gravity") == option)
               {
                 if(!(subtle->flags & SUB_SUBTLE_CHECK))
                   subtle->gravity = value; ///< Store for later
               }
+            else subSubtleLogWarn("Cannot find option `:%s'\n",
+              SYM2CHAR(option));
+            break; /* }}} */
+          case T_TRUE:
+          case T_FALSE: /* {{{ */
+            if(CHAR2SYM("urgent") == option ||
+                CHAR2SYM("urgent_dialogs") == option)
+              {
+                if(!(subtle->flags & SUB_SUBTLE_CHECK) && Qtrue == value)
+                  subtle->flags |= SUB_SUBTLE_URGENT;
+              }
+            else if(CHAR2SYM("resize") == option ||
+                CHAR2SYM("honor_size_hints") == option)
+              {
+                if(!(subtle->flags & SUB_SUBTLE_CHECK) && Qtrue == value)
+                  subtle->flags |= SUB_SUBTLE_RESIZE;
+              }
+            else if(CHAR2SYM("tiling") == option ||
+                CHAR2SYM("gravity_tiling") == option)
+              {
+                if(!(subtle->flags & SUB_SUBTLE_CHECK) && Qtrue == value)
+                  subtle->flags |= SUB_SUBTLE_TILING;
+              }
             else if(CHAR2SYM("click_to_focus") == option)
               {
                 if(!(subtle->flags & SUB_SUBTLE_CHECK) && Qtrue == value)
@@ -1874,42 +1901,11 @@
             else subSubtleLogWarn("Cannot find option `:%s'\n",
               SYM2CHAR(option));
             break; /* }}} */
-          case T_TRUE:
-          case T_FALSE: /* {{{ */
-            if(CHAR2SYM("urgent") == option)
-              {
-                if(!(subtle->flags & SUB_SUBTLE_CHECK) && Qtrue == value)
-                  subtle->flags |= SUB_SUBTLE_URGENT;
-              }
-            else if(CHAR2SYM("resize") == option)
-              {
-                if(!(subtle->flags & SUB_SUBTLE_CHECK) && Qtrue == value)
-                  subtle->flags |= SUB_SUBTLE_RESIZE;
-              }
-            else if(CHAR2SYM("tiling") == option)
-              {
-                if(!(subtle->flags & SUB_SUBTLE_CHECK) && Qtrue == value)
-                  subtle->flags |= SUB_SUBTLE_TILING;
-              }
-            else subSubtleLogWarn("Cannot find option `:%s'\n",
-              SYM2CHAR(option));
-            break; /* }}} */
           case T_STRING: /* {{{ */
            if(CHAR2SYM("font") == option)
             {
               subSubtleLogDeprecated("The `font' option is deprecated, "
                 "please use the styles `font' property instead.\n");
-
-              if(!(subtle->flags & SUB_SUBTLE_CHECK) &&
-                  !subtle->styles.all.font)
-                {
-                  subtle->styles.all.font   = RubyFont(RSTRING_PTR(value));
-                  subtle->styles.all.flags |= SUB_STYLE_FONT;
-
-                  /* EWMH: Font */
-                  subEwmhSetString(ROOT, SUB_EWMH_SUBTLE_FONT,
-                    RSTRING_PTR(value));
-                }
             }
            else if(CHAR2SYM("separator") == option)
               {