diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index 43e8bad..d0b19c1 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -16,7 +16,7 @@ jobs:
days-before-issue-stale: -1
# 手动标记后,14 天后关闭
days-before-issue-close: 7
- # 使用的标签(必须和你手动添加的标签一致)
+ # 使用的标签
stale-issue-label: "stale"
# 自动关闭时自动加上的标签
close-issue-label: "automatic-closing"
diff --git a/README.md b/README.md
index 7818c36..b927b92 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
-# MangoWC
-
-
-
+# Mango Wayland Compositor
+
+

+
This project's development is based on [dwl](https://codeberg.org/dwl/dwl/).
@@ -23,25 +23,22 @@ This project's development is based on [dwl](https://codeberg.org/dwl/dwl/).
- Ipc support(get/send message from/to compositor by external program)
- Hycov-like overview
- Window effects from scenefx (blur, shadow, corner radius, opacity)
+ - Zero flickering - every frame is perfect.
-Master-Stack Layout
+https://github.com/user-attachments/assets/bb83004a-0563-4b48-ad89-6461a9b78b1f
-https://github.com/user-attachments/assets/a9d4776e-b50b-48fb-94ce-651d8a749b8a
+# Mango's Vision
-Scroller Layout
+**Mango's primary goal is stability**: After months of testing and development—and aside from a few lingering GPU compatibility issues—it should now be stable enough. I don't plan on making many breaking changes.
-https://github.com/user-attachments/assets/c9bf9415-fad1-4400-bcdc-3ad2d76de85a
-
-Layer animation
-
-https://github.com/user-attachments/assets/014c893f-115c-4ae9-8342-f9ae3e9a0df0
+**Mango's preference is practicality**: I tend to add features that genuinely help with daily workflows—things that make our work more convenient.
+**Mango won't cater to every user preference**: For niche feature requests, I'll take a wait-and-see approach. I'll only consider adding them if they get a significant number of upvotes.
# Our discord
-[mangowc](https://discord.gg/CPjbDxesh5)
+[mangowm](https://discord.gg/CPjbDxesh5)
# Supported layouts
-
- tile
- scroller
- monocle
@@ -51,21 +48,20 @@ https://github.com/user-attachments/assets/014c893f-115c-4ae9-8342-f9ae3e9a0df0
- vertical_tile
- vertical_grid
- vertical_scroller
+- tgmix
# Installation
+[](https://repology.org/project/mangowm/versions)
+
## Dependencies
-- glibc
- wayland
- wayland-protocols
- libinput
- libdrm
- libxkbcommon
- pixman
-- git
-- meson
-- ninja
- libdisplay-info
- libliftoff
- hwdata
@@ -75,9 +71,9 @@ https://github.com/user-attachments/assets/014c893f-115c-4ae9-8342-f9ae3e9a0df0
- libxcb
## Arch Linux
-The package is in the Arch User Repository and is availble for manual download [here](https://aur.archlinux.org/packages/mangowc-git) or through a AUR helper like yay:
+The package is in the Arch User Repository and is available for manual download [here](https://aur.archlinux.org/packages/mangowm-git) or through a AUR helper like yay:
```bash
-yay -S mangowc-git
+yay -S mangowm-git
```
@@ -91,12 +87,12 @@ eselect repository enable guru
emerge --sync guru
```
-Then, add `gui-libs/scenefx` and `gui-wm/mangowc` to the `package.accept_keywords`.
+Then, add `gui-libs/scenefx` and `gui-wm/mangowm` to the `package.accept_keywords`.
Finally, install the package:
```bash
-emerge --ask --verbose gui-wm/mangowc
+emerge --ask --verbose gui-wm/mangowm
```
## Fedora Linux
@@ -106,9 +102,38 @@ First, add the [Terra Repository](https://terra.fyralabs.com/).
Then, install the package:
```bash
-dnf install mangowc
+dnf install mangowm
```
+## Guix System
+The package definition is described in the source repository.
+First, add `mangowm` channel to `channels.scm` file:
+
+```scheme
+;; In $HOME/.config/guix/channels.scm
+(cons (channel
+ (name 'mangowm)
+ (url "https://github.com/mangowm/mango.git")
+ (branch "main"))
+ ... ;; Your other channels
+ %default-channels)
+```
+
+Then, run `guix pull` and after update you can either run
+`guix install mangowm` or add it to your configuration via:
+
+```scheme
+(use-modules (mangowm)) ;; Add mangowm module
+
+;; Add mangowm to packages list
+(packages (cons*
+ mangowm-git
+ ... ;; Other packages you specified
+ %base-packages))
+```
+
+And then rebuild your system.
+
## Other
```bash
@@ -122,8 +147,8 @@ cd scenefx
meson build -Dprefix=/usr
sudo ninja -C build install
-git clone https://github.com/DreamMaoMao/mangowc.git
-cd mangowc
+git clone https://github.com/mangowm/mango.git
+cd mangowm
meson build -Dprefix=/usr
sudo ninja -C build install
```
@@ -181,9 +206,9 @@ git clone https://github.com/DreamMaoMao/mango-config.git ~/.config/mango
## Config Documentation
-Refer to the repo wiki [wiki](https://github.com/DreamMaoMao/mango/wiki/)
+Refer to the repo wiki [wiki](https://github.com/mangowm/mango/wiki/)
-or the website docs [docs](https://mangowc.vercel.app/docs)
+or the website docs [docs](https://mangowm.github.io/)
# NixOS + Home-manager
@@ -203,7 +228,7 @@ Here's an example of using the modules in a flake:
};
flake-parts.url = "github:hercules-ci/flake-parts";
mango = {
- url = "github:DreamMaoMao/mango";
+ url = "github:mangowm/mango";
inputs.nixpkgs.follows = "nixpkgs";
};
};
@@ -265,9 +290,9 @@ Here's an example of using the modules in a flake:
To package mango for other distributions, you can check the reference setup for:
-- [nix](https://github.com/DreamMaoMao/mangowc/blob/main/nix/default.nix)
-- [arch](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=mangowc-git).
-- [gentoo](https://data.gpo.zugaina.org/guru/gui-wm/mangowc)
+- [nix](https://github.com/mangowm/mango/blob/main/nix/default.nix)
+- [arch](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=mangowm-git).
+- [gentoo](https://data.gpo.zugaina.org/guru/gui-wm/mangowm)
You might need to package `scenefx` for your distribution, check availability [here](https://github.com/wlrfx/scenefx.git).
@@ -285,3 +310,15 @@ Read The Friendly Manual on packaging software in your distribution first.
- https://github.com/swaywm/sway - Sample of Wayland protocol
- https://github.com/wlrfx/scenefx - Make it simple to add window effect.
+
+
+# Sponsor
+At present, I can only accept sponsorship through an encrypted connection.
+If you find this project helpful to you, you can offer sponsorship in the following ways.
+
+
+
+
+Thanks to the following friends for their sponsorship of this project
+
+[@tonybanters](https://github.com/tonybanters)
diff --git a/config.conf b/assets/config.conf
similarity index 96%
rename from config.conf
rename to assets/config.conf
index e93b3e6..15b654c 100644
--- a/config.conf
+++ b/assets/config.conf
@@ -26,7 +26,7 @@ focused_opacity=1.0
unfocused_opacity=1.0
# Animation Configuration(support type:zoom,slide)
-# tag_animation_direction: 0-horizontal,1-vertical
+# tag_animation_direction: 1-horizontal,0-vertical
animations=1
layer_animations=1
animation_type_open=slide
@@ -77,7 +77,7 @@ overviewgappo=30
no_border_when_single=0
axis_bind_apply_timeout=100
focus_on_activate=1
-inhibit_regardless_of_visibility=0
+idleinhibit_ignore_visible=0
sloppyfocus=1
warpcursor=1
focus_cross_monitor=0
@@ -240,12 +240,11 @@ bind=CTRL+ALT,Left,resizewin,-50,+0
bind=CTRL+ALT,Right,resizewin,+50,+0
# Mouse Button Bindings
-# NONE mode key only work in ov mode
+# btn_left and btn_right can't bind none mod key
mousebind=SUPER,btn_left,moveresize,curmove
mousebind=NONE,btn_middle,togglemaximizescreen,0
mousebind=SUPER,btn_right,moveresize,curresize
-mousebind=NONE,btn_left,toggleoverview,1
-mousebind=NONE,btn_right,killclient,0
+
# Axis Bindings
axisbind=SUPER,UP,viewtoleft_have_client
diff --git a/assets/mango-portals.conf b/assets/mango-portals.conf
new file mode 100644
index 0000000..aebea31
--- /dev/null
+++ b/assets/mango-portals.conf
@@ -0,0 +1,5 @@
+[preferred]
+default=gtk
+org.freedesktop.impl.portal.ScreenCast=wlr
+org.freedesktop.impl.portal.Screenshot=wlr
+org.freedesktop.impl.portal.Inhibit=none
diff --git a/mango.desktop b/assets/mango.desktop
similarity index 78%
rename from mango.desktop
rename to assets/mango.desktop
index 0c109ce..37c4fad 100644
--- a/mango.desktop
+++ b/assets/mango.desktop
@@ -1,6 +1,7 @@
[Desktop Entry]
Encoding=UTF-8
Name=Mango
+DesktopNames=mango;wlroots
Comment=mango WM
Exec=mango
Icon=mango
diff --git a/mangowc.scm b/mangowm.scm
similarity index 89%
rename from mangowc.scm
rename to mangowm.scm
index 9c55d43..7d94166 100644
--- a/mangowc.scm
+++ b/mangowm.scm
@@ -1,4 +1,4 @@
-(define-module (mangowc)
+(define-module (mangowm)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix gexp)
@@ -18,11 +18,11 @@
#:use-module (guix licenses))
-(define-public mangowc-git
+(define-public mangowm-git
(package
- (name "mangowc")
+ (name "mangowm")
(version "git")
- (source (local-file "." "mangowc-checkout"
+ (source (local-file "." "mangowm-checkout"
#:recursive? #t
#:select? (or (git-predicate (current-source-directory))
(const #t))))
@@ -55,10 +55,13 @@
wlroots
scenefx))
(native-inputs (list pkg-config wayland-protocols))
- (home-page "https://github.com/DreamMaoMao/mangowc")
+ (home-page "https://github.com/DreamMaoMao/mangowm")
(synopsis "Wayland compositor based on wlroots and scenefx")
(description "A Wayland compositor based on wlroots and scenefx,
inspired by dwl but aiming to be more feature-rich.")
(license gpl3)))
-mangowc-git
+(define-deprecated-package mangowc
+ mangowm-git)
+
+mangowm-git
diff --git a/meson.build b/meson.build
index 9f197ab..c538c92 100644
--- a/meson.build
+++ b/meson.build
@@ -1,5 +1,5 @@
project('mango', ['c', 'cpp'],
- version : '0.10.8',
+ version : '0.12.6',
)
subdir('protocols')
@@ -56,7 +56,7 @@ endif
if is_git_repo
# 如果是 Git 目录,获取 Commit Hash 和最新的 tag
commit_hash = run_command(git, 'rev-parse', '--short', 'HEAD', check : false).stdout().strip()
- latest_tag = run_command(git, 'describe', '--tags', '--abbrev=0', check : false).stdout().strip()
+ latest_tag = meson.project_version()
version_with_hash = '@0@(@1@)'.format(latest_tag, commit_hash)
else
# 如果不是 Git 目录,使用项目版本号和 "release" 字符串
@@ -147,5 +147,7 @@ executable('mmsg',
)
desktop_install_dir = join_paths(prefix, 'share/wayland-sessions')
-install_data('mango.desktop', install_dir : desktop_install_dir)
-install_data('config.conf', install_dir : join_paths(sysconfdir, 'mango'))
+portal_install_dir = join_paths(prefix, 'share/xdg-desktop-portal')
+install_data('assets/mango.desktop', install_dir : desktop_install_dir)
+install_data('assets/mango-portals.conf', install_dir : portal_install_dir)
+install_data('assets/config.conf', install_dir : join_paths(sysconfdir, 'mango'))
diff --git a/mmsg/arg.h b/mmsg/arg.h
index ccbd65a..c3b0d7b 100644
--- a/mmsg/arg.h
+++ b/mmsg/arg.h
@@ -8,13 +8,13 @@
extern char *argv0;
-/* use main(int argc, char *argv[]) */
+/* use main(int32_t argc, char *argv[]) */
#define ARGBEGIN \
for (argv0 = *argv, argv++, argc--; \
argv[0] && argv[0][0] == '-' && argv[0][1]; argc--, argv++) { \
char argc_; \
char **argv_; \
- int brk_; \
+ int32_t brk_; \
if (argv[0][1] == '-' && argv[0][2] == '\0') { \
argv++; \
argc--; \
diff --git a/mmsg/mmsg.c b/mmsg/mmsg.c
index 2bbe870..4e0e1d8 100644
--- a/mmsg/mmsg.c
+++ b/mmsg/mmsg.c
@@ -25,31 +25,31 @@ static enum {
WATCH = 1 << 2 | GET,
} mode = NONE;
-static int Oflag;
-static int Tflag;
-static int Lflag;
-static int oflag;
-static int tflag;
-static int lflag;
-static int cflag;
-static int vflag;
-static int mflag;
-static int fflag;
-static int qflag;
-static int dflag;
-static int xflag;
-static int eflag;
-static int kflag;
-static int bflag;
-static int Aflag;
+static int32_t Oflag;
+static int32_t Tflag;
+static int32_t Lflag;
+static int32_t oflag;
+static int32_t tflag;
+static int32_t lflag;
+static int32_t cflag;
+static int32_t vflag;
+static int32_t mflag;
+static int32_t fflag;
+static int32_t qflag;
+static int32_t dflag;
+static int32_t xflag;
+static int32_t eflag;
+static int32_t kflag;
+static int32_t bflag;
+static int32_t Aflag;
static uint32_t occ, seltags, total_clients, urg;
static char *output_name;
-static int tagcount;
+static int32_t tagcount;
static char *tagset;
static char *layout_name;
-static int layoutcount, layout_idx;
+static int32_t layoutcount, layout_idx;
static char *client_tags;
static char *dispatch_cmd;
static char *dispatch_arg1;
@@ -87,7 +87,7 @@ static void noop_description(void *data, struct wl_output *wl_output,
// 将 n 转换为 9 位二进制字符串,结果存入 buf(至少长度 10)
void bin_str_9bits(char *buf, uint32_t n) {
- for (int i = 8; i >= 0; i--) {
+ for (int32_t i = 8; i >= 0; i--) {
*buf++ = ((n >> i) & 1) ? '1' : '0';
}
*buf = '\0'; // 字符串结尾
@@ -324,7 +324,7 @@ static void dwl_ipc_output_frame(void *data,
if (tflag) {
uint32_t mask = seltags;
char *t = tagset;
- int i = 0;
+ int32_t i = 0;
for (; *t && *t >= '0' && *t <= '9'; t++)
i = *t - '0' + i * 10;
@@ -354,7 +354,7 @@ static void dwl_ipc_output_frame(void *data,
if (cflag) {
uint32_t and = ~0, xor = 0;
char *t = client_tags;
- int i = 0;
+ int32_t i = 0;
for (; *t && *t >= '0' && *t <= '9'; t++)
i = *t - '0' + i * 10;
@@ -500,16 +500,52 @@ static const struct wl_registry_listener registry_listener = {
static void usage(void) {
fprintf(stderr,
- "usage:"
- "\t%s [-OTLq]\n"
- "\t%s [-o