add coding style stuff
This commit is contained in:
parent
b3995c6152
commit
4e0acfa99a
|
@ -0,0 +1,7 @@
|
|||
If you intend to patch and contribute awesome, please respect the following coding style:
|
||||
- Use 4 space tabs instead of tabs;
|
||||
- Place braces alone on new lines;
|
||||
- Do not put very long line, split them;
|
||||
- Be clear in what you do.
|
||||
|
||||
A vim modeline is set in each file to respect this.
|
|
@ -436,3 +436,4 @@ main(int argc, char *argv[])
|
|||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
|
@ -28,3 +28,4 @@ int xerror(Display *, XErrorEvent *); /* awesome's X error handler */
|
|||
UICB_PROTO(uicb_quit);
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
1
client.c
1
client.c
|
@ -808,3 +808,4 @@ uicb_killclient(awesome_config *awesomeconf,
|
|||
else
|
||||
XKillClient(awesomeconf->display, (*awesomeconf->client_sel)->win);
|
||||
}
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
1
client.h
1
client.h
|
@ -50,3 +50,4 @@ UICB_PROTO(uicb_swapnext);
|
|||
UICB_PROTO(uicb_swapprev);
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
1
common.h
1
common.h
|
@ -31,3 +31,4 @@
|
|||
#define LAYOUT_PROTO(name) void name(awesome_config *)
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
1
config.c
1
config.c
|
@ -429,3 +429,4 @@ initxcolor(Display *disp, int scr, const char *colstr)
|
|||
die("awesome: error, cannot allocate color '%s'\n", colstr);
|
||||
return color;
|
||||
}
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
1
config.h
1
config.h
|
@ -203,3 +203,4 @@ struct awesome_config
|
|||
void parse_config(Display *, int, const char *, awesome_config *); /* parse configuration file */
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
2
draw.c
2
draw.c
|
@ -126,3 +126,5 @@ textwidth(Display *disp, XftFont *font, char *text, ssize_t len)
|
|||
XftTextExtentsUtf8(disp, font, (FcChar8 *) text, len, &gi);
|
||||
return gi.width;
|
||||
}
|
||||
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
1
draw.h
1
draw.h
|
@ -29,3 +29,4 @@ void drawrectangle(Display *, int, int, int, int, int, Drawable, int, int, Bool,
|
|||
void drawcircle(Display *, int, int, int, int, Drawable, int, int, Bool, XColor);
|
||||
inline unsigned short textwidth(Display *, XftFont *, char *, ssize_t);
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
1
event.c
1
event.c
|
@ -538,3 +538,4 @@ grabkeys(Display *disp, int screen, awesome_config *awesomeconf)
|
|||
GrabModeAsync, GrabModeAsync);
|
||||
}
|
||||
}
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
1
event.h
1
event.h
|
@ -42,3 +42,4 @@ void handle_event_shape(XEvent *, awesome_config *);
|
|||
void handle_event_randr_screen_change_notify(XEvent *, awesome_config *);
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
1
layout.c
1
layout.c
|
@ -288,3 +288,4 @@ uicb_zoom(awesome_config *awesomeconf,
|
|||
arrange(awesomeconf->display, awesomeconf);
|
||||
}
|
||||
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
1
layout.h
1
layout.h
|
@ -43,3 +43,4 @@ UICB_PROTO(uicb_togglehorizontalmax);
|
|||
UICB_PROTO(uicb_zoom);
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
|
@ -39,3 +39,4 @@ layout_floating(awesome_config *awesomeconf)
|
|||
resize(c, c->x, c->y, c->w, c->h, awesomeconf, True);
|
||||
}
|
||||
}
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
|
@ -26,3 +26,4 @@
|
|||
LAYOUT_PROTO(layout_floating);
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
|
@ -36,3 +36,4 @@ layout_max(awesome_config *awesomeconf)
|
|||
si[awesomeconf->screen].height - 2 * c->border, awesomeconf, awesomeconf->resize_hints);
|
||||
XFree(si);
|
||||
}
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
|
@ -27,3 +27,4 @@
|
|||
LAYOUT_PROTO(layout_max);
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
|
@ -178,3 +178,4 @@ layout_tileleft(awesome_config *awesomeconf)
|
|||
{
|
||||
_tile(awesomeconf, False);
|
||||
}
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
|
@ -33,3 +33,4 @@ UICB_PROTO(uicb_setncol);
|
|||
UICB_PROTO(uicb_setmwfact);
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
1
screen.c
1
screen.c
|
@ -249,3 +249,4 @@ uicb_movetoscreen(awesome_config * awesomeconf,
|
|||
arrange(awesomeconf->display, &awesomeconf[prev_screen - awesomeconf->screen]);
|
||||
arrange(awesomeconf->display, &awesomeconf[new_screen - awesomeconf->screen]);
|
||||
}
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
1
screen.h
1
screen.h
|
@ -39,3 +39,4 @@ UICB_PROTO(uicb_focusprevscreen);
|
|||
UICB_PROTO(uicb_movetoscreen);
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
|
@ -260,3 +260,4 @@ uicb_setstatustext(awesome_config *awesomeconf, const char *arg)
|
|||
|
||||
drawstatusbar(awesomeconf->display, awesomeconf);
|
||||
}
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
|
@ -32,3 +32,4 @@ UICB_PROTO(uicb_togglebar);
|
|||
UICB_PROTO(uicb_setstatustext);
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
1
tag.c
1
tag.c
|
@ -329,3 +329,4 @@ uicb_tag_viewprev(awesome_config *awesomeconf,
|
|||
saveawesomeprops(awesomeconf->display, awesomeconf);
|
||||
arrange(awesomeconf->display, awesomeconf);
|
||||
}
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
1
tag.h
1
tag.h
|
@ -41,3 +41,4 @@ UICB_PROTO(uicb_tag_viewnext);
|
|||
UICB_PROTO(uicb_tag_viewprev);
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
1
uicb.c
1
uicb.c
|
@ -84,3 +84,4 @@ run_uicb(char *cmd, awesome_config *awesomeconf)
|
|||
|
||||
return 0;
|
||||
}
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
1
uicb.h
1
uicb.h
|
@ -28,3 +28,4 @@ int parse_control(char *, awesome_config *);
|
|||
int run_uicb(char *, awesome_config *);
|
||||
|
||||
#endif
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
1
util.c
1
util.c
|
@ -225,3 +225,4 @@ ssize_t a_strcpy(char *dst, ssize_t n, const char *src)
|
|||
|
||||
return len;
|
||||
}
|
||||
// vim: filetype=c:expandtab:shiftwidth=6:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||
|
|
Loading…
Reference in New Issue