%token TOKCONTROL "control"
%token TOKSHIFT "shift"
%token TOKFLOATING_MODIFIER "floating_modifier"
+%token TOKFLOATING_MAXIMUM_SIZE "floating_maximum_size"
+%token TOKFLOATING_MINIMUM_SIZE "floating_minimum_size"
%token <string> QUOTEDSTRING "<quoted string>"
%token TOKWORKSPACE "workspace"
%token TOKOUTPUT "output"
%token TOK_ID "id"
%token TOK_CON_ID "con_id"
%token TOK_TITLE "title"
+%token TOK_URGENT "urgent"
%type <binding> binding
%type <binding> bindcode
| for_window
| mode
| bar
+ | floating_maximum_size
+ | floating_minimum_size
| floating_modifier
| orientation
| workspace_layout
current_match.title = regex_new($3);
free($3);
}
+ | TOK_URGENT '=' STR
+ {
+ printf("criteria: urgent = %s\n", $3);
+ if (strcasecmp($3, "latest") == 0 ||
+ strcasecmp($3, "newest") == 0 ||
+ strcasecmp($3, "recent") == 0 ||
+ strcasecmp($3, "last") == 0) {
+ current_match.urgent = U_LATEST;
+ } else if (strcasecmp($3, "oldest") == 0 ||
+ strcasecmp($3, "first") == 0) {
+ current_match.urgent = U_OLDEST;
+ }
+ free($3);
+ }
;
qstring_or_number:
bar_color_focused_workspace:
TOK_BAR_COLOR_FOCUSED_WORKSPACE HEXCOLOR HEXCOLOR
{
- DLOG("focused_ws = %s and %s\n", $2, $3);
+ /* Old syntax: text / background */
+ DLOG("focused_ws = %s, %s (old)\n", $2, $3);
+ current_bar.colors.focused_workspace_bg = $3;
current_bar.colors.focused_workspace_text = $2;
+ }
+ | TOK_BAR_COLOR_FOCUSED_WORKSPACE HEXCOLOR HEXCOLOR HEXCOLOR
+ {
+ /* New syntax: border / background / text */
+ DLOG("focused_ws = %s, %s and %s\n", $2, $3, $4);
+ current_bar.colors.focused_workspace_border = $2;
current_bar.colors.focused_workspace_bg = $3;
+ current_bar.colors.focused_workspace_text = $4;
}
;
bar_color_active_workspace:
TOK_BAR_COLOR_ACTIVE_WORKSPACE HEXCOLOR HEXCOLOR
{
- DLOG("active_ws = %s and %s\n", $2, $3);
+ /* Old syntax: text / background */
+ DLOG("active_ws = %s, %s (old)\n", $2, $3);
+ current_bar.colors.active_workspace_bg = $3;
current_bar.colors.active_workspace_text = $2;
+ }
+ | TOK_BAR_COLOR_ACTIVE_WORKSPACE HEXCOLOR HEXCOLOR HEXCOLOR
+ {
+ /* New syntax: border / background / text */
+ DLOG("active_ws = %s, %s and %s\n", $2, $3, $4);
+ current_bar.colors.active_workspace_border = $2;
current_bar.colors.active_workspace_bg = $3;
+ current_bar.colors.active_workspace_text = $4;
}
;
bar_color_inactive_workspace:
TOK_BAR_COLOR_INACTIVE_WORKSPACE HEXCOLOR HEXCOLOR
{
- DLOG("inactive_ws = %s and %s\n", $2, $3);
+ /* Old syntax: text / background */
+ DLOG("inactive_ws = %s, %s (old)\n", $2, $3);
+ current_bar.colors.inactive_workspace_bg = $3;
current_bar.colors.inactive_workspace_text = $2;
+ }
+ | TOK_BAR_COLOR_INACTIVE_WORKSPACE HEXCOLOR HEXCOLOR HEXCOLOR
+ {
+ DLOG("inactive_ws = %s, %s and %s\n", $2, $3, $4);
+ current_bar.colors.inactive_workspace_border = $2;
current_bar.colors.inactive_workspace_bg = $3;
+ current_bar.colors.inactive_workspace_text = $4;
}
;
bar_color_urgent_workspace:
TOK_BAR_COLOR_URGENT_WORKSPACE HEXCOLOR HEXCOLOR
{
- DLOG("urgent_ws = %s and %s\n", $2, $3);
+ /* Old syntax: text / background */
+ DLOG("urgent_ws = %s, %s (old)\n", $2, $3);
+ current_bar.colors.urgent_workspace_bg = $3;
current_bar.colors.urgent_workspace_text = $2;
+ }
+ | TOK_BAR_COLOR_URGENT_WORKSPACE HEXCOLOR HEXCOLOR HEXCOLOR
+ {
+ DLOG("urgent_ws = %s, %s and %s\n", $2, $3, $4);
+ current_bar.colors.urgent_workspace_border = $2;
current_bar.colors.urgent_workspace_bg = $3;
+ current_bar.colors.urgent_workspace_text = $4;
+ }
+ ;
+
+floating_maximum_size:
+ TOKFLOATING_MAXIMUM_SIZE NUMBER WORD NUMBER
+ {
+ printf("floating_maximum_width = %d\n", $2);
+ printf("floating_maximum_height = %d\n", $4);
+ config.floating_maximum_width = $2;
+ config.floating_maximum_height = $4;
+ }
+ ;
+
+floating_minimum_size:
+ TOKFLOATING_MINIMUM_SIZE NUMBER WORD NUMBER
+ {
+ printf("floating_minimum_width = %d\n", $2);
+ printf("floating_minimum_height = %d\n", $4);
+ config.floating_minimum_width = $2;
+ config.floating_minimum_height = $4;
}
;
dest->background = $3;
dest->text = $4;
}
+ | TOKCOLOR colorpixel colorpixel colorpixel colorpixel
+ {
+ struct Colortriple *dest = $1;
+
+ dest->border = $2;
+ dest->background = $3;
+ dest->text = $4;
+ dest->indicator = $5;
+ }
;
colorpixel: