aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/backend.c4
-rw-r--r--src/backend/gl/egl.c2
-rw-r--r--src/backend/gl/glx.c12
-rw-r--r--src/backend/xrender/xrender.c2
-rw-r--r--src/c2.c10
-rw-r--r--src/c2.h9
-rw-r--r--src/common.h12
-rw-r--r--src/compfy.c (renamed from src/picom.c)25
-rw-r--r--src/compfy.h (renamed from src/picom.h)1
-rw-r--r--src/config.c10
-rw-r--r--src/config_libconfig.c14
-rw-r--r--src/dbus.c31
-rw-r--r--src/dbus.h9
-rw-r--r--src/diagnostic.c4
-rw-r--r--src/event.c2
-rw-r--r--src/meson.build10
-rw-r--r--src/opengl.c9
-rw-r--r--src/opengl.h9
-rw-r--r--src/options.c56
-rw-r--r--src/picom.modulemap4
-rw-r--r--src/win.c4
21 files changed, 76 insertions, 163 deletions
diff --git a/src/backend/backend.c b/src/backend/backend.c
index 9d4d10c..32e7cb5 100644
--- a/src/backend/backend.c
+++ b/src/backend/backend.c
@@ -75,8 +75,8 @@ void handle_device_reset(session_t *ps) {
// So here we blindly wait 5 seconds and hope ourselves best of the luck.
sleep(5);
- // Reset picom
- log_info("Resetting picom after device reset");
+ // Reset compfy
+ log_info("Resetting compfy after device reset");
ev_break(ps->loop, EVBREAK_ALL);
}
diff --git a/src/backend/gl/egl.c b/src/backend/gl/egl.c
index e6d4d90..f4b1e3f 100644
--- a/src/backend/gl/egl.c
+++ b/src/backend/gl/egl.c
@@ -19,7 +19,7 @@
#include "compiler.h"
#include "config.h"
#include "log.h"
-#include "picom.h"
+#include "compfy.h"
#include "utils.h"
#include "x.h"
diff --git a/src/backend/gl/glx.c b/src/backend/gl/glx.c
index 109bec9..7e171e1 100644
--- a/src/backend/gl/glx.c
+++ b/src/backend/gl/glx.c
@@ -1,14 +1,4 @@
// SPDX-License-Identifier: MIT
-/*
- * Compton - a compositor for X11
- *
- * Based on `xcompmgr` - Copyright (c) 2003, Keith Packard
- *
- * Copyright (c) 2011-2013, Christopher Jeffrey
- * Copyright (c) 2019 Yuxuan Shui <[email protected]>
- * See LICENSE-mit for more information.
- *
- */
#include <X11/Xlib-xcb.h>
#include <assert.h>
@@ -28,7 +18,7 @@
#include "compiler.h"
#include "config.h"
#include "log.h"
-#include "picom.h"
+#include "compfy.h"
#include "region.h"
#include "utils.h"
#include "win.h"
diff --git a/src/backend/xrender/xrender.c b/src/backend/xrender/xrender.c
index 79b3ca9..1cbc638 100644
--- a/src/backend/xrender/xrender.c
+++ b/src/backend/xrender/xrender.c
@@ -17,7 +17,7 @@
#include "config.h"
#include "kernel.h"
#include "log.h"
-#include "picom.h"
+#include "compfy.h"
#include "region.h"
#include "types.h"
#include "utils.h"
diff --git a/src/c2.c b/src/c2.c
index 50407de..45f1d9e 100644
--- a/src/c2.c
+++ b/src/c2.c
@@ -1,15 +1,5 @@
// SPDX-License-Identifier: MIT
-/*
- * Compton - a compositor for X11
- *
- * Based on `xcompmgr` - Copyright (c) 2003, Keith Packard
- *
- * Copyright (c) 2011-2013, Christopher Jeffrey
- * See LICENSE-mit for more information.
- *
- */
-
#include <ctype.h>
#include <fnmatch.h>
#include <stdio.h>
diff --git a/src/c2.h b/src/c2.h
index a7ddd39..0659028 100644
--- a/src/c2.h
+++ b/src/c2.h
@@ -1,13 +1,4 @@
// SPDX-License-Identifier: MIT
-/*
- * Compton - a compositor for X11
- *
- * Based on `xcompmgr` - Copyright (c) 2003, Keith Packard
- *
- * Copyright (c) 2011-2013, Christopher Jeffrey
- * See LICENSE-mit for more information.
- *
- */
#pragma once
diff --git a/src/common.h b/src/common.h
index aa33140..978acf7 100644
--- a/src/common.h
+++ b/src/common.h
@@ -1,15 +1,4 @@
// SPDX-License-Identifier: MIT
-/*
- * Compton - a compositor for X11
- *
- * Based on `xcompmgr` - Copyright (c) 2003, Keith Packard
- *
- * Copyright (c) 2011-2013, Christopher Jeffrey
- * Copyright (c) 2018, Yuxuan Shui <[email protected]>
- *
- * See LICENSE-mit for more information.
- *
- */
#pragma once
@@ -245,7 +234,6 @@ typedef struct session {
bool redraw_needed;
/// Cache a xfixes region so we don't need to allocate it every time.
- /// A workaround for yshui/picom#301
xcb_xfixes_region_t damaged_region;
/// The region needs to painted on next paint.
region_t *damage;
diff --git a/src/picom.c b/src/compfy.c
index a3ed614..87dc603 100644
--- a/src/picom.c
+++ b/src/compfy.c
@@ -1,13 +1,4 @@
// SPDX-License-Identifier: MIT
-/*
- * Compton - a compositor for X11
- *
- * Based on `xcompmgr` - Copyright (c) 2003, Keith Packard
- *
- * Copyright (c) 2011-2013, Christopher Jeffrey
- * See LICENSE-mit for more information.
- *
- */
#include <X11/Xlib-xcb.h>
#include <X11/Xlib.h>
@@ -37,7 +28,7 @@
#include "config.h"
#include "err.h"
#include "kernel.h"
-#include "picom.h"
+#include "compfy.h"
#ifdef CONFIG_OPENGL
#include "opengl.h"
#endif
@@ -1248,7 +1239,7 @@ static int register_cm(session_t *ps) {
ps->c, xcb_change_property_checked(
ps->c, XCB_PROP_MODE_REPLACE, ps->reg_win, prop_atoms[i],
prop_is_utf8[i] ? ps->atoms->aUTF8_STRING : XCB_ATOM_STRING,
- 8, strlen("picom"), "picom"));
+ 8, strlen("compfy"), "compfy"));
if (e) {
log_error_x_error(e, "Failed to set window property %d",
prop_atoms[i]);
@@ -1256,11 +1247,11 @@ static int register_cm(session_t *ps) {
}
}
- const char picom_class[] = "picom\0picom";
+ const char compfy_class[] = "compfy\0compfy";
e = xcb_request_check(
ps->c, xcb_change_property_checked(ps->c, XCB_PROP_MODE_REPLACE, ps->reg_win,
ps->atoms->aWM_CLASS, XCB_ATOM_STRING, 8,
- ARR_SIZE(picom_class), picom_class));
+ ARR_SIZE(compfy_class), compfy_class));
if (e) {
log_error_x_error(e, "Failed to set the WM_CLASS property");
free(e);
@@ -1302,7 +1293,7 @@ static int register_cm(session_t *ps) {
ps->c, xcb_change_property_checked(
ps->c, XCB_PROP_MODE_REPLACE, ps->reg_win,
get_atom(ps->atoms, "COMPTON_VERSION"), XCB_ATOM_STRING, 8,
- (uint32_t)strlen(PICOM_VERSION), PICOM_VERSION));
+ (uint32_t)strlen(COMPFY_VERSION), COMPFY_VERSION));
if (e) {
log_error_x_error(e, "Failed to set COMPTON_VERSION.");
free(e);
@@ -1798,13 +1789,13 @@ static void x_event_callback(EV_P attr_unused, ev_io *w, int revents attr_unused
* This will result in the compostior resetting itself after next paint.
*/
static void reset_enable(EV_P_ ev_signal *w attr_unused, int revents attr_unused) {
- log_info("picom is resetting...");
+ log_info("Compfy is resetting...");
ev_break(EV_A_ EVBREAK_ALL);
}
static void exit_enable(EV_P attr_unused, ev_signal *w, int revents attr_unused) {
session_t *ps = session_ptr(w, int_signal);
- log_info("picom is quitting...");
+ log_info("Compfy is quitting...");
quit(ps);
}
@@ -2118,7 +2109,7 @@ static session_t *session_init(int argc, char **argv, Display *dpy,
}
if (strstr(argv[0], "compton")) {
- log_warn("This compositor has been renamed to \"picom\", the \"compton\" "
+ log_warn("This compositor has been renamed to \"compfy\", the \"picom\" "
"binary will not be installed in the future.");
}
diff --git a/src/picom.h b/src/compfy.h
index 7ee289b..5eb1002 100644
--- a/src/picom.h
+++ b/src/compfy.h
@@ -32,7 +32,6 @@ enum root_flags {
};
// == Functions ==
-// TODO(yshui) move static inline functions that are only used in picom.c, into picom.c
void add_damage(session_t *ps, const region_t *damage);
diff --git a/src/config.c b/src/config.c
index 53adeec..d23a69a 100644
--- a/src/config.c
+++ b/src/config.c
@@ -591,7 +591,7 @@ static char *locate_auxiliary_file_at(const char *base, const char *scope, const
* 1) If an absolute path is given, use it directly.
* 2) Search for the file directly under `include_dir`.
* 3) Search for the file in the XDG configuration directories, under path
- * /picom/<scope>/
+ * /compfy/<scope>/
*/
char *locate_auxiliary_file(const char *scope, const char *path, const char *include_dir) {
if (!path || strlen(path) == 0) {
@@ -615,9 +615,9 @@ char *locate_auxiliary_file(const char *scope, const char *path, const char *inc
}
// Fall back to searching in user config directory
- scoped_charp picom_scope = mstrjoin("/picom/", scope);
+ scoped_charp compfy_scope = mstrjoin("/compfy/", scope);
scoped_charp config_home = (char *)xdg_config_home();
- char *ret = locate_auxiliary_file_at(config_home, picom_scope, path);
+ char *ret = locate_auxiliary_file_at(config_home, compfy_scope, path);
if (ret) {
return ret;
}
@@ -625,7 +625,7 @@ char *locate_auxiliary_file(const char *scope, const char *path, const char *inc
// Fall back to searching in system config directory
auto config_dirs = xdg_config_dirs();
for (int i = 0; config_dirs[i]; i++) {
- ret = locate_auxiliary_file_at(config_dirs[i], picom_scope, path);
+ ret = locate_auxiliary_file_at(config_dirs[i], compfy_scope, path);
if (ret) {
free(config_dirs);
return ret;
@@ -841,7 +841,7 @@ char *parse_config(options_t *opt, const char *config_file, bool *shadow_enable,
.no_fading_destroyed_argb = false,
.fade_blacklist = NULL,
- // Picom Allusive
+ // compfy Allusive
.animations = true,
.animation_for_open_window = OPEN_WINDOW_ANIMATION_ZOOM,
diff --git a/src/config_libconfig.c b/src/config_libconfig.c
index ac4eb96..7aeecc4 100644
--- a/src/config_libconfig.c
+++ b/src/config_libconfig.c
@@ -40,8 +40,8 @@ static inline int lcfg_lookup_bool(const config_t *config, const char *path, boo
/// Search for config file under a base directory
FILE *open_config_file_at(const char *base, char **out_path) {
- static const char *config_paths[] = {"/picom.conf", "/picom/picom.conf",
- "/compton.conf", "/compton/compton.conf"};
+ static const char *config_paths[] = {"/compfy.conf", "/compfy/compfy.conf",
+ "/picom.conf", "/picom/picom.conf"};
for (size_t i = 0; i < ARR_SIZE(config_paths); i++) {
char *path = mstrjoin(base, config_paths[i]);
FILE *ret = fopen(path, "r");
@@ -51,11 +51,11 @@ FILE *open_config_file_at(const char *base, char **out_path) {
free(path);
}
if (ret) {
- if (strstr(config_paths[i], "compton")) {
- log_warn("This compositor has been renamed to \"picom\", "
+ if (strstr(config_paths[i], "picom")) {
+ log_warn("This compositor has been renamed to \"compfy\", "
"the old config file paths is deprecated. "
- "Please replace the \"compton\"s in the path "
- "with \"picom\"");
+ "Please replace the \"picom\"s in the path "
+ "with \"compfy\"");
}
return ret;
}
@@ -69,7 +69,7 @@ FILE *open_config_file_at(const char *base, char **out_path) {
* Follows the XDG specification to search for the configuration file.
*/
FILE *open_config_file(const char *cpath, char **ppath) {
- static const char config_filename_legacy[] = "/.compton.conf";
+ static const char config_filename_legacy[] = "/.picom.conf";
if (cpath) {
FILE *ret = fopen(cpath, "r");
diff --git a/src/dbus.c b/src/dbus.c
index 8b17b30..49432b8 100644
--- a/src/dbus.c
+++ b/src/dbus.c
@@ -1,13 +1,4 @@
// SPDX-License-Identifier: MIT
-/*
- * Compton - a compositor for X11
- *
- * Based on `xcompmgr` - Copyright (c) 2003, Keith Packard
- *
- * Copyright (c) 2011-2013, Christopher Jeffrey
- * See LICENSE-mit for more information.
- *
- */
#include <X11/Xlib.h>
#include <ctype.h>
@@ -72,8 +63,8 @@ typedef uint32_t cdbus_enum_t;
cdbus_reply_errm((ps), dbus_message_new_error_printf( \
(srcmsg), (err_name), (err_format), ##__VA_ARGS__))
-#define PICOM_WINDOW_INTERFACE "picom.Window"
-#define PICOM_COMPOSITOR_INTERFACE "picom.Compositor"
+#define COMPFY_WINDOW_INTERFACE "compfy.Window"
+#define COMPFY_COMPOSITOR_INTERFACE "compfy.Compositor"
static DBusHandlerResult cdbus_process(DBusConnection *conn, DBusMessage *m, void *);
static DBusHandlerResult cdbus_process_windows(DBusConnection *c, DBusMessage *msg, void *ud);
@@ -848,7 +839,7 @@ cdbus_process_window_property_get(session_t *ps, DBusMessage *msg, cdbus_window_
return false;
}
- if (strcmp(interface, PICOM_WINDOW_INTERFACE)) {
+ if (strcmp(interface, COMPFY_WINDOW_INTERFACE)) {
return false;
}
@@ -1153,7 +1144,7 @@ static bool cdbus_process_opts_get(session_t *ps, DBusMessage *msg) {
// version
if (!strcmp("version", target)) {
- cdbus_reply_string(ps, msg, PICOM_VERSION);
+ cdbus_reply_string(ps, msg, COMPFY_VERSION);
return true;
}
@@ -1388,7 +1379,7 @@ static bool cdbus_process_introspect(session_t *ps, DBusMessage *msg) {
" <method name='reset' />\n"
" <method name='repaint' />\n"
" </interface>\n"
- " <interface name='" PICOM_COMPOSITOR_INTERFACE "'>\n"
+ " <interface name='" COMPFY_COMPOSITOR_INTERFACE "'>\n"
" <signal name='WinAdded'>\n"
" <arg name='wid' type='" CDBUS_TYPE_WINDOW_STR "'/>\n"
" </signal>\n"
@@ -1479,7 +1470,7 @@ static bool cdbus_process_window_introspect(session_t *ps, DBusMessage *msg) {
" <arg type='as' name='invalidated_properties'/>\n"
" </signal>\n"
" </interface>\n"
- " <interface name='" PICOM_WINDOW_INTERFACE "'>\n"
+ " <interface name='" COMPFY_WINDOW_INTERFACE "'>\n"
" <property type='" CDBUS_TYPE_WINDOW_STR "' name='Leader' access='read'/>\n"
" <property type='" CDBUS_TYPE_WINDOW_STR "' name='ClientWin' access='read'/>\n"
" <property type='" CDBUS_TYPE_WINDOW_STR "' name='Id' access='read'/>\n"
@@ -1507,7 +1498,7 @@ cdbus_process(DBusConnection *c attr_unused, DBusMessage *msg, void *ud) {
dbus_message_is_method_call(msg, CDBUS_INTERFACE_NAME, method)
if (cdbus_m_ismethod("reset")) {
- log_info("picom is resetting...");
+ log_info("Compfy is resetting...");
ev_break(ps->loop, EVBREAK_ALL);
if (!dbus_message_get_no_reply(msg))
cdbus_reply_bool(ps, msg, true);
@@ -1656,7 +1647,7 @@ void cdbus_ev_win_added(session_t *ps, struct win *w) {
struct cdbus_data *cd = ps->dbus_data;
if (cd->dbus_conn) {
cdbus_signal_wid(ps, CDBUS_INTERFACE_NAME, "win_added", w->id);
- cdbus_signal_wid(ps, PICOM_COMPOSITOR_INTERFACE, "WinAdded", w->id);
+ cdbus_signal_wid(ps, COMPFY_COMPOSITOR_INTERFACE, "WinAdded", w->id);
}
}
@@ -1664,7 +1655,7 @@ void cdbus_ev_win_destroyed(session_t *ps, struct win *w) {
struct cdbus_data *cd = ps->dbus_data;
if (cd->dbus_conn) {
cdbus_signal_wid(ps, CDBUS_INTERFACE_NAME, "win_destroyed", w->id);
- cdbus_signal_wid(ps, PICOM_COMPOSITOR_INTERFACE, "WinDestroyed", w->id);
+ cdbus_signal_wid(ps, COMPFY_COMPOSITOR_INTERFACE, "WinDestroyed", w->id);
}
}
@@ -1672,7 +1663,7 @@ void cdbus_ev_win_mapped(session_t *ps, struct win *w) {
struct cdbus_data *cd = ps->dbus_data;
if (cd->dbus_conn) {
cdbus_signal_wid(ps, CDBUS_INTERFACE_NAME, "win_mapped", w->id);
- cdbus_signal_wid(ps, PICOM_COMPOSITOR_INTERFACE, "WinMapped", w->id);
+ cdbus_signal_wid(ps, COMPFY_COMPOSITOR_INTERFACE, "WinMapped", w->id);
}
}
@@ -1680,7 +1671,7 @@ void cdbus_ev_win_unmapped(session_t *ps, struct win *w) {
struct cdbus_data *cd = ps->dbus_data;
if (cd->dbus_conn) {
cdbus_signal_wid(ps, CDBUS_INTERFACE_NAME, "win_unmapped", w->id);
- cdbus_signal_wid(ps, PICOM_COMPOSITOR_INTERFACE, "WinUnmapped", w->id);
+ cdbus_signal_wid(ps, COMPFY_COMPOSITOR_INTERFACE, "WinUnmapped", w->id);
}
}
diff --git a/src/dbus.h b/src/dbus.h
index 54a58af..ce4696b 100644
--- a/src/dbus.h
+++ b/src/dbus.h
@@ -1,13 +1,4 @@
// SPDX-License-Identifier: MIT
-/*
- * Compton - a compositor for X11
- *
- * Based on `xcompmgr` - Copyright (c) 2003, Keith Packard
- *
- * Copyright (c) 2011-2013, Christopher Jeffrey
- * See LICENSE-mit for more information.
- *
- */
#include <stdbool.h>
diff --git a/src/diagnostic.c b/src/diagnostic.c
index 2cb3c8f..85f5ecd 100644
--- a/src/diagnostic.c
+++ b/src/diagnostic.c
@@ -9,10 +9,10 @@
#include "common.h"
#include "config.h"
#include "diagnostic.h"
-#include "picom.h"
+#include "compfy.h"
void print_diagnostics(session_t *ps, const char *config_file, bool compositor_running) {
- printf("**Version:** " PICOM_VERSION "\n");
+ printf("**Version:** " COMPFY_VERSION "\n");
//printf("**CFLAGS:** %s\n", "??");
printf("\n### Extensions:\n\n");
printf("* Shape: %s\n", ps->shape_exists ? "Yes" : "No");
diff --git a/src/event.c b/src/event.c
index 62f35e2..acbc82d 100644
--- a/src/event.c
+++ b/src/event.c
@@ -14,7 +14,7 @@
#include "config.h"
#include "event.h"
#include "log.h"
-#include "picom.h"
+#include "compfy.h"
#include "region.h"
#include "utils.h"
#include "win.h"
diff --git a/src/meson.build b/src/meson.build
index 09eb07b..48b212f 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -7,10 +7,10 @@ base_deps = [
libev
]
-srcs = [ files('picom.c', 'win.c', 'c2.c', 'x.c', 'config.c', 'vsync.c', 'utils.c',
+srcs = [ files('compfy.c', 'win.c', 'c2.c', 'x.c', 'config.c', 'vsync.c', 'utils.c',
'diagnostic.c', 'string_utils.c', 'render.c', 'kernel.c', 'log.c',
'options.c', 'event.c', 'cache.c', 'atom.c', 'file_watch.c') ]
-picom_inc = include_directories('.')
+compfy_inc = include_directories('.')
cflags = []
@@ -85,10 +85,10 @@ endif
subdir('backend')
-picom = executable('picom', srcs, c_args: cflags,
+compfy = executable('compfy', srcs, c_args: cflags,
dependencies: [ base_deps, deps, test_h_dep ],
- install: true, include_directories: picom_inc)
+ install: true, include_directories: compfy_inc)
if get_option('unittest')
- test('picom unittest', picom, args: [ '--unittest' ])
+ test('compfy unittest', compfy, args: [ '--unittest' ])
endif
diff --git a/src/opengl.c b/src/opengl.c
index 5d2d66c..2c6dc83 100644
--- a/src/opengl.c
+++ b/src/opengl.c
@@ -1,13 +1,4 @@
// SPDX-License-Identifier: MIT
-/*
- * Compton - a compositor for X11
- *
- * Based on `xcompmgr` - Copyright (c) 2003, Keith Packard
- *
- * Copyright (c) 2011-2013, Christopher Jeffrey
- * See LICENSE-mit for more information.
- *
- */
#include <stdio.h>
#include <stdlib.h>
diff --git a/src/opengl.h b/src/opengl.h
index dcd8697..492451a 100644
--- a/src/opengl.h
+++ b/src/opengl.h
@@ -1,13 +1,4 @@
// SPDX-License-Identifier: MIT
-/*
- * Compton - a compositor for X11
- *
- * Based on `xcompmgr` - Copyright (c) 2003, Keith Packard
- *
- * Copyright (c) 2011-2013, Christopher Jeffrey
- * See LICENSE-mit for more information.
- *
- */
#pragma once
diff --git a/src/options.c b/src/options.c
index c5f183c..098e25f 100644
--- a/src/options.c
+++ b/src/options.c
@@ -22,7 +22,7 @@
#pragma GCC diagnostic error "-Wunused-parameter"
-struct picom_option {
+struct compfy_option {
const char *long_name;
int has_arg;
int val;
@@ -32,7 +32,7 @@ struct picom_option {
// clang-format off
static const struct option *longopts = NULL;
-static const struct picom_option picom_options[] = {
+static const struct compfy_option compfy_options[] = {
#ifdef CONFIG_LIBCONFIG
{"config" , required_argument, 256, NULL , "Path to the configuration file."},
#endif
@@ -172,7 +172,7 @@ static const struct picom_option picom_options[] = {
{"monitor-repaint" , no_argument , 800, NULL , "Highlight the updated area of the screen. For debugging."},
{"diagnostics" , no_argument , 801, NULL , "Print diagnostic information"},
{"debug-mode" , no_argument , 802, NULL , "Render into a separate window, and don't take over the screen. Useful when "
- "you want to attach a debugger to picom"},
+ "you want to attach a debugger to compfy"},
{"no-ewmh-fullscreen" , no_argument , 803, NULL , "Do not use EWMH to detect fullscreen windows. Reverts to checking if a "
"window is fullscreen based only on its size and coordinates."},
{"animations", no_argument, 804, NULL, "Toggles Animations"},
@@ -195,12 +195,12 @@ static const struct picom_option picom_options[] = {
// clang-format on
static void setup_longopts(void) {
- auto opts = ccalloc(ARR_SIZE(picom_options) + 1, struct option);
- for (size_t i = 0; i < ARR_SIZE(picom_options); i++) {
- opts[i].name = picom_options[i].long_name;
- opts[i].has_arg = picom_options[i].has_arg;
+ auto opts = ccalloc(ARR_SIZE(compfy_options) + 1, struct option);
+ for (size_t i = 0; i < ARR_SIZE(compfy_options); i++) {
+ opts[i].name = compfy_options[i].long_name;
+ opts[i].has_arg = compfy_options[i].has_arg;
opts[i].flag = NULL;
- opts[i].val = picom_options[i].val;
+ opts[i].val = compfy_options[i].val;
}
longopts = opts;
}
@@ -259,9 +259,9 @@ void print_help(const char *help, size_t indent, size_t curr_indent, size_t line
*/
static void usage(const char *argv0, int ret) {
FILE *f = (ret ? stderr : stdout);
- fprintf(f, "picom (%s)\n", PICOM_VERSION);
+ fprintf(f, "compfy (%s)\n", COMPFY_VERSION);
fprintf(f, "Standalone X11 compositor\n");
- fprintf(f, "Please report bugs to https://github.com/yshui/picom\n\n");
+ fprintf(f, "Please report bugs to https://github.com/allusive-dev/compfy\n\n");
fprintf(f, "Usage: %s [OPTION]...\n\n", argv0);
fprintf(f, "OPTIONS:\n");
@@ -273,14 +273,14 @@ static void usage(const char *argv0, int ret) {
}
size_t help_indent = 0;
- for (size_t i = 0; i < ARR_SIZE(picom_options); i++) {
- if (picom_options[i].help == NULL) {
+ for (size_t i = 0; i < ARR_SIZE(compfy_options); i++) {
+ if (compfy_options[i].help == NULL) {
// Hide options with no help message.
continue;
}
- auto option_len = strlen(picom_options[i].long_name) + 2 + 4;
- if (picom_options[i].arg_name) {
- option_len += strlen(picom_options[i].arg_name) + 1;
+ auto option_len = strlen(compfy_options[i].long_name) + 2 + 4;
+ if (compfy_options[i].arg_name) {
+ option_len += strlen(compfy_options[i].arg_name) + 1;
}
if (option_len > help_indent && option_len < 30) {
help_indent = option_len;
@@ -288,27 +288,27 @@ static void usage(const char *argv0, int ret) {
}
help_indent += 6;
- for (size_t i = 0; i < ARR_SIZE(picom_options); i++) {
- if (picom_options[i].help == NULL) {
+ for (size_t i = 0; i < ARR_SIZE(compfy_options); i++) {
+ if (compfy_options[i].help == NULL) {
continue;
}
size_t option_len = 8;
fprintf(f, " ");
- if ((picom_options[i].val > 'a' && picom_options[i].val < 'z') ||
- (picom_options[i].val > 'A' && picom_options[i].val < 'Z')) {
- fprintf(f, "-%c, ", picom_options[i].val);
+ if ((compfy_options[i].val > 'a' && compfy_options[i].val < 'z') ||
+ (compfy_options[i].val > 'A' && compfy_options[i].val < 'Z')) {
+ fprintf(f, "-%c, ", compfy_options[i].val);
} else {
fprintf(f, " ");
}
- fprintf(f, "--%s", picom_options[i].long_name);
- option_len += strlen(picom_options[i].long_name) + 2;
- if (picom_options[i].arg_name) {
- fprintf(f, "=%s", picom_options[i].arg_name);
- option_len += strlen(picom_options[i].arg_name) + 1;
+ fprintf(f, "--%s", compfy_options[i].long_name);
+ option_len += strlen(compfy_options[i].long_name) + 2;
+ if (compfy_options[i].arg_name) {
+ fprintf(f, "=%s", compfy_options[i].arg_name);
+ option_len += strlen(compfy_options[i].arg_name) + 1;
}
fprintf(f, " ");
option_len += 2;
- print_help(picom_options[i].help, help_indent, option_len,
+ print_help(compfy_options[i].help, help_indent, option_len,
(size_t)line_wrap, f);
}
}
@@ -342,7 +342,7 @@ bool get_early_config(int argc, char *const *argv, char **config_file, bool *all
} else if (o == 314) {
*all_xerrors = true;
} else if (o == 318) {
- printf("%s\n", PICOM_VERSION);
+ printf("%s\n", COMPFY_VERSION);
return true;
} else if (o == '?' || o == ':') {
usage(argv[0], 1);
@@ -353,7 +353,7 @@ bool get_early_config(int argc, char *const *argv, char **config_file, bool *all
// Check for abundant positional arguments
if (optind < argc) {
// log is not initialized here yet
- fprintf(stderr, "picom doesn't accept positional arguments.\n");
+ fprintf(stderr, "Compfy doesn't accept positional arguments.\n");
goto err;
}
diff --git a/src/picom.modulemap b/src/picom.modulemap
index 787c4ff..621ad81 100644
--- a/src/picom.modulemap
+++ b/src/picom.modulemap
@@ -20,8 +20,8 @@ module utils {
module region {
header "region.h"
}
-module picom {
- header "picom.h"
+module compfy {
+ header "compfy.h"
}
module types {
header "types.h"
diff --git a/src/win.c b/src/win.c
index fdb2d32..4d96bb7 100644
--- a/src/win.c
+++ b/src/win.c
@@ -25,7 +25,7 @@
#include "config.h"
#include "list.h"
#include "log.h"
-#include "picom.h"
+#include "compfy.h"
#include "region.h"
#include "render.h"
#include "string_utils.h"
@@ -3133,7 +3133,7 @@ struct managed_win *find_managed_window_or_parent(session_t *ps, xcb_window_t wi
// Using find_win here because if we found a unmanaged window we know
// about, we can stop early.
while (wid && wid != ps->root && !(w = find_win(ps, wid))) {
- // xcb_query_tree probably fails if you run picom when X is
+ // xcb_query_tree probably fails if you run compfy when X is
// somehow initializing (like add it in .xinitrc). In this case
// just leave it alone.
auto reply = xcb_query_tree_reply(ps->c, xcb_query_tree(ps->c, wid), NULL);