blob: 5132eabdcd56cbd81f61907c7cd1af11faa57e64 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
# Contributing to sxwm
Firstly, thanks for taking the time to contribute to sxwm! I appreciate your interest in improving the project.
## Code Style and Formatting
There is an included clangd formatting file with this inside, but it wont do everything for you.
### Indentation
Indentation must always be **tabs** not spaces.
### Blocks
- All blocks of C code must be encased with curly braces `{}`
- Blocks must also be seperated, each statement on a new line
- Statements must be formatted with a space between the keyword and the brackets
**Example**:
``` c
if (x) {
y();
}
else {
z();
}
```
### Comments
Comments must be like this to keep the look consistent across the whole program.
`/* this is a comment */`
### Function Declarations
They must look like this
``` c
void function_x(void)
{
}
void function_y(int y)
{
}
```
### Variable Naming
Variables and function names must be in `snake_case`
``` c
void function_a(void);
void function_b(void);
```
``` c
int some_variable = 2;
float other_variable = 5;
```
## Build
- Make sure `make` succeeds with no warnings on your system
- Don't commit any build artifacts or backup files
- Test your changes on **multiple monitors (Xephyr)**
## File Layouts
- Please try to not make a new C file or header unless it is necissary. Most of the codebase is kept in the `sxwm.c` file.
## Submitting Changes
- Open a pull request with a **clear report** of the change(s)
- Keep commits having one purpose per commit
- If you fix a bug, please describe how to reproduce it
- If adding a feature, make sure it is consistent with sxwm’s minimalist philosophy
- Please don't keep multiple changes in one PR. Open a new one for that
## Documentation
- If applicable, **update `sxwm.1`, `README.md` and `default_sxwmrc`**, update `CHANGELOG.md`
## Respect the Existing Structure
- Before large changes, open an issue discussion
- Please don’t change for style unless it improves clarity or fixes a problem
## Testing
- [x] Builds with no warnings
- [x] Tested to work fully
- [x] All changes are explained in the PR
- [x] Configuration reload works (if relevant)
---
**Happy hacking!**
|