summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/CHANGELOG.md58
-rw-r--r--docs/CONTRIBUTIONS.md204
2 files changed, 262 insertions, 0 deletions
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
new file mode 100644
index 0000000..9d0dd97
--- /dev/null
+++ b/docs/CHANGELOG.md
@@ -0,0 +1,58 @@
+### Changelog
+
+All notable changes to this project will be documented in this file.
+
+#### v1.7 (git)
+- **ADD**: `_NET_FRAME_EXTENTS` support
+- **ADD**: `start_fullscreen` which opens specified windows in fullscreen mode
+- **FIX**: Resizing bug on second monitor
+
+#### v1.6 (current)
+- **NEW**: True multi-monitor support
+- **NEW**: Vertical stack resizing
+- **NEW**: Mouse warping
+- **NEW**: Floating window rules
+- **NEW**: Ctrl key as modifier
+- **NEW**: Focus window on creation
+- **NEW**: Copy config to `/usr/local/share/sxwmrc`
+- **NEW**: Can switch monitors via keyboard
+- **NEW**: Can move windows between monitors via keyboard
+- **NEW**: Can click on a window to set focus to it
+- **NEW**: Window swallowing
+- **NEW**: New windows can now open as master window
+- **NEW**: Scratchpads
+- **NEW**: Window centering
+- **CHANGE**: Renamed `focus_previous` to `focus_prev`
+- **CHANGE**: Invalid sample config
+- **CHANGE**: Parser `$HOME` searching order. XDG Compliance
+- **CHANGE**: `-b` or `--backup` option for using backup keybinds
+- **FIXED**: Improved parsing now supporting commands with `"` and `'`
+- **FIXED**: (mouse warping) Switching to master doesn't automatically shift cursor to it
+- **FIXED**: `ctrl` and `shift` key works as a modifier
+- **FIXED**: Fixed build error (#64).
+- **FIXED**: Removed debug logs
+- **FIXED**: Fixed new window getting interrupted by mouse
+- **FIXED**: Fixed `should_float` segfalt
+- **FIXED**: Invisible windows of minimized programs
+- **FIXED**: Zombie processes spawned from apps
+- **FIXED**: Undefined behaviour in `parse_col`
+- **FIXED**: Added monitor switching functions to call_table (#95)
+
+#### v1.5
+- **NEW**: Using XCursor instead of cursor font && new logo.
+- **CHANGE**: No longer using INIT_WORKSPACE macro, proper workspace handling. New sxwmrc
+- **FIXED**: Proper bind resetting on refresh config. && Multi-arg binds now work due to new and improved spawn function
+
+#### v1.4
+- **CHANGE**: Added motion throttle && master width general options
+
+#### v1.3
+- **CHANGE**: ulong, u_char uint are gone
+
+#### v1.2
+- **NEW**: Parser support
+- **FIXED**: Quit syntax && Freeing cursor on exit
+
+#### v1.1
+- **NEW**: Xinerama support, swap windows with Mod + Shift + Drag
+- **FIXED**: New windows in `global_floating` mode spawn centered
diff --git a/docs/CONTRIBUTIONS.md b/docs/CONTRIBUTIONS.md
new file mode 100644
index 0000000..9b4aa1e
--- /dev/null
+++ b/docs/CONTRIBUTIONS.md
@@ -0,0 +1,204 @@
+# Contributing to sxwm
+
+Firstly, thanks for taking the time to contribute to `sxwm`! Your interest
+in improving the project is truly appreciated.
+
+## Code Style and Formatting
+
+There is an included `clangd` formatting file, but it won’t do everything for you.
+Please follow the rules below to keep the codebase consistent and clean.
+
+### Indentation
+
+* Use **tabs** for indentation — never spaces.
+
+### Blocks
+
+* All blocks of C code must be wrapped in curly braces `{}`.
+* Each statement must be on its own line.
+* Always add a space between keywords and the opening parenthesis.
+
+**Example**:
+
+```c
+if (x) {
+ y();
+}
+else {
+ z();
+}
+```
+
+### Comments
+
+* Use this format for comments to maintain consistency:
+
+```c
+/* this is a comment */
+```
+
+* For temporary notes, use:
+
+```c
+/* TODO: something to fix */
+/* FIXME: known issue */
+```
+
+### Function Declarations
+
+Functions should look like this:
+
+```c
+void function_x(void)
+{
+}
+
+void function_y(int y)
+{
+}
+```
+
+### Variable and Function Naming
+
+* Use `snake_case` for all variable and function names.
+
+**Examples**:
+
+```c
+int some_variable = 2;
+float other_variable = 5;
+
+void do_something(void);
+```
+
+### Header Guards
+
+If you create a header file, use header guards:
+
+```c
+#ifndef HEADER_NAME_H
+#define HEADER_NAME_H
+
+// content
+
+#endif /* HEADER_NAME_H */
+```
+
+### Line Length
+
+* Keep lines under **100 characters** when possible to improve terminal readability.
+
+### Whitespace
+
+* No trailing whitespace.
+* One blank line between function definitions.
+* Avoid unnecessary vertical spacing.
+
+### Include Order
+
+Organize includes like this:
+
+1. Corresponding header (if any)
+2. Standard library headers
+3. Other project headers
+
+---
+
+## Build
+
+* `make` must succeed **with no warnings** on your system.
+* Don’t commit build artifacts (e.g., `.o`, `sxwm`) or backup files (e.g., `*~`).
+* Test your changes, especially on **multi-monitor setups** using **Xephyr**.
+
+---
+
+## File Layout
+
+* Don’t create new `.c` or `.h` files unless absolutely necessary.
+* Keep most changes within `sxwm.c` to maintain cohesion.
+
+---
+
+## Submitting Changes
+
+* Open a pull request with a **clear description** of what and why.
+* Keep **one purpose per commit** — don’t mix unrelated changes.
+* If fixing a bug, describe **how to reproduce it**.
+* If adding a feature, ensure it fits with `sxwm`’s **minimalist philosophy**.
+* **Open separate PRs** for unrelated changes.
+
+---
+
+## Git Commit Guidelines
+
+* Use imperative mood: `Add foo`, not `Added foo`.
+* Keep the summary under 50 characters.
+* Add a detailed body if needed.
+
+**Example**:
+
+```
+Fix crash when window is closed
+
+Previously, sxwm would segfault if a client closed itself.
+This patch adds a check for null pointers before accessing window data.
+```
+
+---
+
+## Tooling & Analysis
+
+* Use the provided `.clang-format` file where applicable.
+* You may optionally run:
+
+ * `cppcheck`
+ * `clang-tidy`
+* Avoid committing debug code like stray `printf()` or `fprintf(stderr, ...)`.
+
+---
+
+## Editor Configuration
+
+A sample `.editorconfig` file is provided (or you can request one).
+It ensures editors match the project’s formatting conventions.
+
+---
+
+## Documentation
+
+Update all relevant documentation if applicable:
+
+* `sxwm.1`
+* `README.md`
+* `default_sxwmrc`
+* `CHANGELOG.md`
+
+---
+
+## Respect the Existing Structure
+
+* For **large changes**, open an issue for discussion first.
+* Do not change code for personal style unless it improves clarity or solves a specific problem.
+
+---
+
+## Testing Checklist
+
+Please ensure the following before opening a PR:
+
+* [x] Code builds **without warnings**
+* [x] Changes are **fully tested**
+* [x] PR includes a **clear explanation**
+* [x] Configuration reload works (if relevant)
+
+---
+
+## Code Review Etiquette
+
+* Be respectful and open to feedback.
+* Feel free to ask questions about any review comments.
+* Reviews are collaborative and meant to improve the code, not criticize you personally.
+
+---
+
+**Happy hacking!**