@ -11,7 +11,20 @@ struct cmd_results *bar_cmd_font(int argc, char **argv) {
}
}
char * font = join_args ( argv , argc ) ;
char * font = join_args ( argv , argc ) ;
free ( config - > current_bar - > font ) ;
free ( config - > current_bar - > font ) ;
config - > current_bar - > font = font ;
if ( strncmp ( font , " pango: " , 6 ) = = 0 ) {
if ( config - > current_bar - > pango_markup = = PANGO_MARKUP_DEFAULT ) {
config - > current_bar - > pango_markup = true ;
}
config - > current_bar - > font = strdup ( font + 6 ) ;
} else {
if ( config - > current_bar - > pango_markup = = PANGO_MARKUP_DEFAULT ) {
config - > current_bar - > pango_markup = false ;
}
config - > current_bar - > font = strdup ( font ) ;
}
free ( font ) ;
sway_log ( SWAY_DEBUG , " Settings font '%s' for bar: %s " ,
sway_log ( SWAY_DEBUG , " Settings font '%s' for bar: %s " ,
config - > current_bar - > font , config - > current_bar - > id ) ;
config - > current_bar - > font , config - > current_bar - > id ) ;
return cmd_results_new ( CMD_SUCCESS , NULL ) ;
return cmd_results_new ( CMD_SUCCESS , NULL ) ;