Add a swaymsg-like IPC, and add some more docs.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
cff-version: 1.2.0
|
||||
message: >-
|
||||
If you use PeachWM in your research or project, please cite it
|
||||
using the metadata below.
|
||||
title: PeachWM
|
||||
version: 0.2
|
||||
date-released: 2026
|
||||
authors:
|
||||
- family-names: HuntedByTheIRS
|
||||
email: [email protected]
|
||||
repository-code: >-
|
||||
https://github.com/HuntedByTheIRS/peachwm
|
||||
license: GPL-3.0-or-later
|
||||
preferred-citation:
|
||||
type: software
|
||||
authors:
|
||||
- family-names: HuntedByTheIRS
|
||||
email: [email protected]
|
||||
title: PeachWM
|
||||
version: 0.2
|
||||
year: 2026
|
||||
url: >-
|
||||
https://github.com/HuntedByTheIRS/peachwm
|
||||
@@ -0,0 +1,121 @@
|
||||
# Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and maintainers pledge to make participation
|
||||
in our community a harassment-free experience for everyone, regardless of
|
||||
age, body size, visible or invisible disability, ethnicity, sex
|
||||
characteristics, gender identity and expression, level of experience,
|
||||
education, socio-economic status, nationality, personal appearance, race,
|
||||
caste, color, religion, or sexual identity and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open,
|
||||
welcoming, diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment:
|
||||
|
||||
- Demonstrating empathy and kindness toward other people
|
||||
- Being respectful of differing opinions, viewpoints, and experiences
|
||||
- Giving and gracefully accepting constructive feedback
|
||||
- Accepting responsibility and apologizing to those affected by our
|
||||
mistakes, and learning from the experience
|
||||
- Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior:
|
||||
|
||||
- The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
- Trolling, insulting or derogatory comments, and personal or political
|
||||
attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying and enforcing our
|
||||
standards of acceptable behavior and will take appropriate and fair
|
||||
corrective action in response to any behavior that they deem
|
||||
inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit,
|
||||
or reject comments, commits, code, wiki edits, issues, and other
|
||||
contributions that are not aligned to this Code of Conduct, and will
|
||||
communicate reasons for moderation decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also
|
||||
applies when an individual is officially representing the community in
|
||||
public spaces.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may
|
||||
be reported to the project maintainer at **[email protected]**.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All project maintainers are obligated to respect the privacy and security
|
||||
of the reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Project maintainers will follow these Community Impact Guidelines in
|
||||
determining the consequences for any action they deem in violation of
|
||||
this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact:** Use of inappropriate language or other behavior
|
||||
deemed unprofessional or unwelcome.
|
||||
|
||||
**Consequence:** A private, written warning from project maintainers,
|
||||
providing clarity around the nature of the violation and an explanation
|
||||
of why the behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact:** A violation through a single incident or series of
|
||||
actions.
|
||||
|
||||
**Consequence:** A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, for a specified period of
|
||||
time. This includes avoiding interactions in community spaces as well
|
||||
as external channels like social media. Violating these terms may lead
|
||||
to a temporary or permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact:** A serious violation of community standards,
|
||||
including sustained inappropriate behavior.
|
||||
|
||||
**Consequence:** A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No
|
||||
public or private interaction with the people involved, including
|
||||
unsolicited interaction with those enforcing the Code of Conduct, is
|
||||
allowed during this period. Violating these terms may lead to a
|
||||
permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact:** Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of
|
||||
individuals.
|
||||
|
||||
**Consequence:** A permanent ban from any sort of public interaction
|
||||
within the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.1, available at
|
||||
<https://www.contributor-covenant.org/version/2/1/code_of_conduct.html>.
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
@@ -66,6 +66,7 @@ debug: CFLAGS += -Werror -Weverything \
|
||||
-Wno-unreachable-code-break -Wno-missing-format-attribute \
|
||||
-Wno-format-nonliteral -Wno-float-conversion \
|
||||
-Wno-tentative-definition-compat -Wno-missing-variable-declarations \
|
||||
-Wno-gnu-zero-variadic-macro-arguments \
|
||||
-g3 -fno-omit-frame-pointer -fsanitize=address,undefined,leak \
|
||||
-fsanitize-trap=all
|
||||
debug: LDLIBS += -fsanitize=address,undefined,leak
|
||||
@@ -78,7 +79,8 @@ peachwm: src/peachwm.o src/util.o parser/parser.o \
|
||||
$(CC) $^ $(LDFLAGS) $(LDLIBS) -o $@
|
||||
|
||||
src/peachwm.o: src/peachwm.c include/client.h include/ipc.h \
|
||||
include/ext-workspace.h src/wlr_ext_workspace_v1.h parser/parser.h \
|
||||
include/ipc_socket.h include/ext-workspace.h \
|
||||
src/wlr_ext_workspace_v1.h parser/parser.h \
|
||||
protocols/peachwm-ipc-unstable-v2-protocol.h \
|
||||
protocols/ext-workspace-v1-protocol.h \
|
||||
protocols/cursor-shape-v1-protocol.h \
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
# Security Policy
|
||||
|
||||
PeachWM is a Wayland compositor — a window manager. A major security
|
||||
vulnerability should never really happen, as it's literally just a
|
||||
window manager. That said, if you find a flaw, please handle it
|
||||
responsibly.
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Do **not** open a public issue disclosing the vulnerability.
|
||||
|
||||
Instead:
|
||||
|
||||
1. Send an email to **[email protected]** describing the issue.
|
||||
2. Open a public issue noting that you have sent an email about a security
|
||||
concern, but **do not** include any technical details about the
|
||||
vulnerability in the issue body.
|
||||
File diff suppressed because it is too large
Load Diff
+11
-1
@@ -529,6 +529,7 @@ static const char *custom_cfg_path;
|
||||
#include "client.h"
|
||||
#include "ext-workspace.h"
|
||||
#include "ipc.h"
|
||||
#include "ipc_socket.h"
|
||||
|
||||
/* function implementations */
|
||||
|
||||
@@ -824,6 +825,7 @@ void checkidleinhibitor(struct wlr_surface *exclude) {
|
||||
void cleanup(void) {
|
||||
config_watch_stop(cfg_watch_src);
|
||||
cfg_watch_src = NULL;
|
||||
ipc_socket_finish();
|
||||
cleanuplisteners();
|
||||
|
||||
#ifdef XWAYLAND
|
||||
@@ -888,6 +890,7 @@ void cleanupmon(struct wl_listener *listener, void *data) {
|
||||
|
||||
closemon(m);
|
||||
ext_workspace_cleanupmon(m);
|
||||
ipc_socket_send_output_event();
|
||||
for (int i = 0; i < TAGCOUNT; i++) {
|
||||
dwindle_free_tree(m->dwindle_root[i]);
|
||||
m->dwindle_root[i] = NULL;
|
||||
@@ -1260,6 +1263,7 @@ void createmon(struct wl_listener *listener, void *data) {
|
||||
wl_list_insert(&mons, &m->link);
|
||||
ext_workspace_createmon(m);
|
||||
printstatus();
|
||||
ipc_socket_send_output_event();
|
||||
|
||||
/* The xdg-protocol specifies:
|
||||
*
|
||||
@@ -2206,6 +2210,7 @@ void mapnotify(struct wl_listener *listener, void *data) {
|
||||
applyrules(c);
|
||||
}
|
||||
printstatus();
|
||||
ipc_socket_send_window_event("new");
|
||||
|
||||
unset_fullscreen:
|
||||
m = c->mon ? c->mon : xytomon(c->geom.x, c->geom.y);
|
||||
@@ -2522,6 +2527,7 @@ void printstatus(void) {
|
||||
}
|
||||
fflush(stdout);
|
||||
ipc_printstatus();
|
||||
ipc_socket_send_workspace_event("focus");
|
||||
}
|
||||
|
||||
void powermgrsetmode(struct wl_listener *listener, void *data) {
|
||||
@@ -2941,6 +2947,7 @@ void setup(void) {
|
||||
dpy = wl_display_create();
|
||||
event_loop = wl_display_get_event_loop(dpy);
|
||||
ipc_init();
|
||||
ipc_socket_init();
|
||||
workspaces_init();
|
||||
|
||||
/* Start the inotify config watcher */
|
||||
@@ -3815,6 +3822,7 @@ void unmapnotify(struct wl_listener *listener, void *data) {
|
||||
|
||||
wlr_scene_node_destroy(&c->scene->node);
|
||||
printstatus();
|
||||
ipc_socket_send_window_event("close");
|
||||
motionnotify(0, NULL, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
@@ -3918,8 +3926,10 @@ void updatemons(struct wl_listener *listener, void *data) {
|
||||
|
||||
void updatetitle(struct wl_listener *listener, void *data) {
|
||||
Client *c = wl_container_of(listener, c, set_title);
|
||||
if (c == focustop(c->mon))
|
||||
if (c == focustop(c->mon)) {
|
||||
printstatus();
|
||||
ipc_socket_send_window_event("title");
|
||||
}
|
||||
}
|
||||
|
||||
void urgent(struct wl_listener *listener, void *data) {
|
||||
|
||||
Reference in New Issue
Block a user