summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-03-26 13:28:25 +0000
committerDana Jansens <danakj@orodu.net>2003-03-26 13:28:25 +0000
commit06f27af0a994a6f92d1c3a9306f46a73e6162bb8 (patch)
tree967fb5aedac48bfe1eb38a056dceddbc31991c73 /plugins
parentc473d5f80ac8a92ba4046365769b2b84ed72881d (diff)
split up the relative functions.
make the parsing more generic, anything can have a string/numeric argument
Diffstat (limited to 'plugins')
-rw-r--r--plugins/keyboard/keysrc.yacc13
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/keyboard/keysrc.yacc b/plugins/keyboard/keysrc.yacc
index 8772fa17..3546d097 100644
--- a/plugins/keyboard/keysrc.yacc
+++ b/plugins/keyboard/keysrc.yacc
@@ -25,8 +25,6 @@ static char *path;
%token <integer> INTEGER;
%token <string> STRING
%token <string> FIELD
-%token <string> EXECUTE
-%token <string> RESTART
%token <string> DESKTOP
%type <list> fields
@@ -36,10 +34,8 @@ static char *path;
config:
| config '\n'
| config fields FIELD '\n' { addbinding($2, $3, NULL, 0); }
- | config fields DESKTOP INTEGER '\n' { addbinding($2, $3, NULL, $4); }
- | config fields RESTART '\n' { addbinding($2, $3, NULL, 0); }
- | config fields EXECUTE STRING '\n' { addbinding($2, $3, $4, 0); }
- | config fields RESTART STRING '\n' { addbinding($2, $3, $4, 0); }
+ | config fields FIELD INTEGER '\n' { addbinding($2, $3, NULL, $4); }
+ | config fields FIELD STRING '\n' { addbinding($2, $3, $4, 0); }
;
fields:
@@ -92,6 +88,11 @@ static void addbinding(GList *keylist, char *action, char *apath, int num)
a->data.execute.path = apath;
if (a->func == action_desktop)
a->data.desktop.desk = (unsigned) num + 1;
+ if (a->func == action_move_relative_horz ||
+ a->func == action_move_relative_vert ||
+ a->func == action_resize_relative_horz ||
+ a->func == action_resize_relative_vert)
+ a->data.relative.delta = num;
if (!kbind(keylist, a)) {
action_free(a);