mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-04-01 07:16:11 -04:00
Merge branch 'mangowm:main' into main
This commit is contained in:
commit
5396ec13c2
6 changed files with 46 additions and 50 deletions
46
README.md
46
README.md
|
|
@ -1,6 +1,6 @@
|
||||||
# Mango Wayland Compositor
|
# Mango Wayland Compositor
|
||||||
<div>
|
<div>
|
||||||
<img src="https://github.com/DreamMaoMao/mangowc/blob/main/assets/mango-transparency-256.png" alt="MangoWC Logo" width="120"/>
|
<img src="https://github.com/mangowm/mango/blob/main/assets/mango-transparency-256.png" alt="MangoWM Logo" width="120"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
This project's development is based on [dwl](https://codeberg.org/dwl/dwl/).
|
This project's development is based on [dwl](https://codeberg.org/dwl/dwl/).
|
||||||
|
|
@ -36,7 +36,7 @@ https://github.com/user-attachments/assets/bb83004a-0563-4b48-ad89-6461a9b78b1f
|
||||||
**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.
|
**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
|
# Our discord
|
||||||
[mangowc](https://discord.gg/CPjbDxesh5)
|
[mangowm](https://discord.gg/CPjbDxesh5)
|
||||||
|
|
||||||
# Supported layouts
|
# Supported layouts
|
||||||
- tile
|
- tile
|
||||||
|
|
@ -52,7 +52,7 @@ https://github.com/user-attachments/assets/bb83004a-0563-4b48-ad89-6461a9b78b1f
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
|
|
||||||
[](https://repology.org/project/mangowc/versions)
|
[](https://repology.org/project/mangowm/versions)
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
|
|
@ -71,9 +71,9 @@ https://github.com/user-attachments/assets/bb83004a-0563-4b48-ad89-6461a9b78b1f
|
||||||
- libxcb
|
- libxcb
|
||||||
|
|
||||||
## Arch Linux
|
## Arch Linux
|
||||||
The package is in the Arch User Repository and is available 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
|
```bash
|
||||||
yay -S mangowc-git
|
yay -S mangowm-git
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -87,12 +87,12 @@ eselect repository enable guru
|
||||||
emerge --sync 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:
|
Finally, install the package:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
emerge --ask --verbose gui-wm/mangowc
|
emerge --ask --verbose gui-wm/mangowm
|
||||||
```
|
```
|
||||||
|
|
||||||
## Fedora Linux
|
## Fedora Linux
|
||||||
|
|
@ -102,32 +102,32 @@ First, add the [Terra Repository](https://terra.fyralabs.com/).
|
||||||
Then, install the package:
|
Then, install the package:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
dnf install mangowc
|
dnf install mangowm
|
||||||
```
|
```
|
||||||
|
|
||||||
## Guix System
|
## Guix System
|
||||||
The package definition is described in the source repository.
|
The package definition is described in the source repository.
|
||||||
First, add `mangowc` channel to `channels.scm` file:
|
First, add `mangowm` channel to `channels.scm` file:
|
||||||
|
|
||||||
```scheme
|
```scheme
|
||||||
;; In $HOME/.config/guix/channels.scm
|
;; In $HOME/.config/guix/channels.scm
|
||||||
(cons (channel
|
(cons (channel
|
||||||
(name 'mangowc)
|
(name 'mangowm)
|
||||||
(url "https://github.com/DreamMaoMao/mangowc.git")
|
(url "https://github.com/mangowm/mango.git")
|
||||||
(branch "main"))
|
(branch "main"))
|
||||||
... ;; Your other channels
|
... ;; Your other channels
|
||||||
%default-channels)
|
%default-channels)
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, run `guix pull` and after update you can either run
|
Then, run `guix pull` and after update you can either run
|
||||||
`guix install mangowc` or add it to your configuration via:
|
`guix install mangowm` or add it to your configuration via:
|
||||||
|
|
||||||
```scheme
|
```scheme
|
||||||
(use-modules (mangowc)) ;; Add mangowc module
|
(use-modules (mangowm)) ;; Add mangowm module
|
||||||
|
|
||||||
;; Add mangowc to packages list
|
;; Add mangowm to packages list
|
||||||
(packages (cons*
|
(packages (cons*
|
||||||
mangowc-git
|
mangowm-git
|
||||||
... ;; Other packages you specified
|
... ;; Other packages you specified
|
||||||
%base-packages))
|
%base-packages))
|
||||||
```
|
```
|
||||||
|
|
@ -147,8 +147,8 @@ cd scenefx
|
||||||
meson build -Dprefix=/usr
|
meson build -Dprefix=/usr
|
||||||
sudo ninja -C build install
|
sudo ninja -C build install
|
||||||
|
|
||||||
git clone https://github.com/DreamMaoMao/mangowc.git
|
git clone https://github.com/mangowm/mango.git
|
||||||
cd mangowc
|
cd mangowm
|
||||||
meson build -Dprefix=/usr
|
meson build -Dprefix=/usr
|
||||||
sudo ninja -C build install
|
sudo ninja -C build install
|
||||||
```
|
```
|
||||||
|
|
@ -206,9 +206,9 @@ git clone https://github.com/DreamMaoMao/mango-config.git ~/.config/mango
|
||||||
|
|
||||||
## Config Documentation
|
## 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
|
# NixOS + Home-manager
|
||||||
|
|
||||||
|
|
@ -228,7 +228,7 @@ Here's an example of using the modules in a flake:
|
||||||
};
|
};
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
mango = {
|
mango = {
|
||||||
url = "github:DreamMaoMao/mango";
|
url = "github:mangowm/mango";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
@ -290,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:
|
To package mango for other distributions, you can check the reference setup for:
|
||||||
|
|
||||||
- [nix](https://github.com/DreamMaoMao/mangowc/blob/main/nix/default.nix)
|
- [nix](https://github.com/mangowm/mango/blob/main/nix/default.nix)
|
||||||
- [arch](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=mangowc-git).
|
- [arch](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=mangowm-git).
|
||||||
- [gentoo](https://data.gpo.zugaina.org/guru/gui-wm/mangowc)
|
- [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).
|
You might need to package `scenefx` for your distribution, check availability [here](https://github.com/wlrfx/scenefx.git).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
(define-module (mangowc)
|
(define-module (mangowm)
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
|
|
@ -18,11 +18,11 @@
|
||||||
#:use-module (guix licenses))
|
#:use-module (guix licenses))
|
||||||
|
|
||||||
|
|
||||||
(define-public mangowc-git
|
(define-public mangowm-git
|
||||||
(package
|
(package
|
||||||
(name "mangowc")
|
(name "mangowm")
|
||||||
(version "git")
|
(version "git")
|
||||||
(source (local-file "." "mangowc-checkout"
|
(source (local-file "." "mangowm-checkout"
|
||||||
#:recursive? #t
|
#:recursive? #t
|
||||||
#:select? (or (git-predicate (current-source-directory))
|
#:select? (or (git-predicate (current-source-directory))
|
||||||
(const #t))))
|
(const #t))))
|
||||||
|
|
@ -55,10 +55,10 @@
|
||||||
wlroots
|
wlroots
|
||||||
scenefx))
|
scenefx))
|
||||||
(native-inputs (list pkg-config wayland-protocols))
|
(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")
|
(synopsis "Wayland compositor based on wlroots and scenefx")
|
||||||
(description "A 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.")
|
inspired by dwl but aiming to be more feature-rich.")
|
||||||
(license gpl3)))
|
(license gpl3)))
|
||||||
|
|
||||||
mangowc-git
|
mangowm-git
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
project('mango', ['c', 'cpp'],
|
project('mango', ['c', 'cpp'],
|
||||||
version : '0.12.4',
|
version : '0.12.5',
|
||||||
)
|
)
|
||||||
|
|
||||||
subdir('protocols')
|
subdir('protocols')
|
||||||
|
|
|
||||||
|
|
@ -500,7 +500,7 @@ static const struct wl_registry_listener registry_listener = {
|
||||||
|
|
||||||
static void usage(void) {
|
static void usage(void) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"mmsg - MangoWC IPC\n"
|
"mmsg - MangoWM IPC\n"
|
||||||
"\n"
|
"\n"
|
||||||
"SYNOPSIS:\n"
|
"SYNOPSIS:\n"
|
||||||
"\tmmsg [-OTLq]\n"
|
"\tmmsg [-OTLq]\n"
|
||||||
|
|
@ -517,7 +517,7 @@ static void usage(void) {
|
||||||
"\t-O Get all output (monitor) information\n"
|
"\t-O Get all output (monitor) information\n"
|
||||||
"\t-T Get number of tags\n"
|
"\t-T Get number of tags\n"
|
||||||
"\t-L Get all available layouts\n"
|
"\t-L Get all available layouts\n"
|
||||||
"\t-q Quit MangoWC\n"
|
"\t-q Quit mango\n"
|
||||||
"\t-o <output> Select output (monitor)\n"
|
"\t-o <output> Select output (monitor)\n"
|
||||||
"\n"
|
"\n"
|
||||||
"GET OPTIONS (used with -g or -w):\n"
|
"GET OPTIONS (used with -g or -w):\n"
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,6 @@ in {
|
||||||
options = {
|
options = {
|
||||||
programs.mango = {
|
programs.mango = {
|
||||||
enable = lib.mkEnableOption "mango, a wayland compositor based on dwl";
|
enable = lib.mkEnableOption "mango, a wayland compositor based on dwl";
|
||||||
addLoginEntry = lib.mkEnableOption {
|
|
||||||
default = true;
|
|
||||||
description = "Whether to add a login entry to the display manager for mango";
|
|
||||||
};
|
|
||||||
package = lib.mkOption {
|
package = lib.mkOption {
|
||||||
type = lib.types.package;
|
type = lib.types.package;
|
||||||
default = self.packages.${pkgs.stdenv.hostPlatform.system}.mango;
|
default = self.packages.${pkgs.stdenv.hostPlatform.system}.mango;
|
||||||
|
|
@ -59,7 +55,7 @@ in {
|
||||||
programs.xwayland.enable = lib.mkDefault true;
|
programs.xwayland.enable = lib.mkDefault true;
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
displayManager.sessionPackages = lib.mkIf cfg.addLoginEntry [ cfg.package ];
|
displayManager.sessionPackages = [cfg.package];
|
||||||
|
|
||||||
graphical-desktop.enable = lib.mkDefault true;
|
graphical-desktop.enable = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
26
src/mango.c
26
src/mango.c
|
|
@ -4266,19 +4266,6 @@ void motionnotify(uint32_t time, struct wlr_input_device *device, double dx,
|
||||||
struct wlr_pointer_constraint_v1 *constraint;
|
struct wlr_pointer_constraint_v1 *constraint;
|
||||||
bool should_lock = false;
|
bool should_lock = false;
|
||||||
|
|
||||||
/* Find the client under the pointer and send the event along. */
|
|
||||||
xytonode(cursor->x, cursor->y, &surface, &c, NULL, &sx, &sy);
|
|
||||||
|
|
||||||
if (cursor_mode == CurPressed && !seat->drag &&
|
|
||||||
surface != seat->pointer_state.focused_surface &&
|
|
||||||
toplevel_from_wlr_surface(seat->pointer_state.focused_surface, &w,
|
|
||||||
&l) >= 0) {
|
|
||||||
c = w;
|
|
||||||
surface = seat->pointer_state.focused_surface;
|
|
||||||
sx = cursor->x - (l ? l->scene->node.x : w->geom.x);
|
|
||||||
sy = cursor->y - (l ? l->scene->node.y : w->geom.y);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* time is 0 in internal calls meant to restore pointer focus. */
|
/* time is 0 in internal calls meant to restore pointer focus. */
|
||||||
if (time) {
|
if (time) {
|
||||||
wlr_relative_pointer_manager_v1_send_relative_motion(
|
wlr_relative_pointer_manager_v1_send_relative_motion(
|
||||||
|
|
@ -4316,6 +4303,19 @@ void motionnotify(uint32_t time, struct wlr_input_device *device, double dx,
|
||||||
selmon = xytomon(cursor->x, cursor->y);
|
selmon = xytomon(cursor->x, cursor->y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Find the client under the pointer and send the event along. */
|
||||||
|
xytonode(cursor->x, cursor->y, &surface, &c, NULL, &sx, &sy);
|
||||||
|
|
||||||
|
if (cursor_mode == CurPressed && !seat->drag &&
|
||||||
|
surface != seat->pointer_state.focused_surface &&
|
||||||
|
toplevel_from_wlr_surface(seat->pointer_state.focused_surface, &w,
|
||||||
|
&l) >= 0) {
|
||||||
|
c = w;
|
||||||
|
surface = seat->pointer_state.focused_surface;
|
||||||
|
sx = cursor->x - (l ? l->scene->node.x : w->geom.x);
|
||||||
|
sy = cursor->y - (l ? l->scene->node.y : w->geom.y);
|
||||||
|
}
|
||||||
|
|
||||||
/* Update drag icon's position */
|
/* Update drag icon's position */
|
||||||
wlr_scene_node_set_position(&drag_icon->node, (int32_t)round(cursor->x),
|
wlr_scene_node_set_position(&drag_icon->node, (int32_t)round(cursor->x),
|
||||||
(int32_t)round(cursor->y));
|
(int32_t)round(cursor->y));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue