diff --git a/README.md b/README.md index e4c8e84..5bc023b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Maomaowm -This project is developed based on [dwl](https://codeberg.org/dwl/dwl/), +This project's development is based on [dwl](https://codeberg.org/dwl/dwl/). "Since many people have asked about the meaning of this compositor's name, 'Maomao' is an online alias I've been using for years - it comes from the first two characters of the Chinese word for 'caterpillar' (毛毛虫). You can basically think of it as meaning 'caterpillar'. @@ -8,16 +8,16 @@ This project is developed based on [dwl](https://codeberg.org/dwl/dwl/), - *Maomao* is as lightweight as *dwl*, and its build can be completed within few seconds. Despite this, *maomao* does not compromise on functionality. 2. **Feature Highlights** - - Besides basic WM functionality, maomao provides: - - Base tag not workspace(supports separate window layouts for each tag) - - Smooth and customizable complete animations(window open/move/close, tag enter/leave) - - Excellent input method support(text input v2/v3) - - Flexible window layouts with easy switching(scroller,master,monocle,spiral..etc) - - Rich window states(swallow, minimize, maximize, unglobal, global, fakefullscreen, overlay...etc) + - In addition to basic WM functionality, Maomao provides: + - Base tag not workspace (supports separate window layouts for each tag) + - Smooth and customizable complete animations (window open/move/close, tag enter/leave) + - Excellent input method support (text input v2/v3) + - Flexible window layouts with easy switching (scroller, master, monocle, spiral, etc.) + - Rich window states (swallow, minimize, maximize, unglobal, global, fakefullscreen, overlay, etc.) - Simple yet powerful external configuration - - Sway like scratchpad and named scratchpad + - Sway-like scratchpad and named scratchpad - Minimize window to scratchpad - - Hycov like overview + - Hycov-like overview Master-Stack Layout @@ -36,21 +36,21 @@ https://github.com/user-attachments/assets/c9bf9415-fad1-4400-bcdc-3ad2d76de85a - Spiral - Deck -# install +# Installation -## depend +## Dependencies ```bash yay -S glibc wayland libinput libdrm pixman libxkbcommon git meson ninja wayland-protocols libdisplay-info libliftoff hwdata seatd pcre2 ``` -## arch +## Arch Linux ```bash yay -S maomaowm-git ``` -## other +## Other ```bash # wlroots 0.19.0 release with a fix-patch to avoid crash git clone -b 0.19.0-fix https://github.com/DreamMaoMao/wlroots.git @@ -64,40 +64,40 @@ meson build -Dprefix=/usr sudo ninja -C build install ``` -## suggest tools +## Suggested Tools ``` yay -S rofi foot xdg-desktop-portal-wlr swaybg waybar wl-clip-persist cliphist wl-clipboard wlsunset xfce-polkit swaync ``` -## Some common default key bindings +## Some Common Default Keybindings - alt+return: open foot terminal - alt+q: kill client - alt+left/right/up/down: focus direction - super+m: quit maomao -## My dotfile -- depend +## My Dotfiles +- Dependencies ``` yay -S pamixer lavalauncher-mao-git wlr-dpms sway-audio-idle-inhibit-git swayidle dimland-git brightnessctl swayosd wlr-randr grim slurp satty swaylock-effects-git wlogout ``` -### maomao config +### Maomao Config [maomao-config](https://github.com/DreamMaoMao/dotfile/tree/main/maomao) -#### other +#### Other Tools [foot](https://github.com/DreamMaoMao/dotfile/tree/main/foot) [swaylock](https://github.com/DreamMaoMao/dotfile/tree/main/swaylock) [wlogout](https://github.com/DreamMaoMao/dotfile/tree/main/wlogout) [swaync](https://github.com/DreamMaoMao/dotfile/tree/main/swaync) -## Config document -refer to [wiki](https://github.com/DreamMaoMao/maomaowm/wiki/) +## Config Document +Refer to the [wiki](https://github.com/DreamMaoMao/maomaowm/wiki/) -# NixOS+Home-manager +# NixOS + Home-manager The repo contains a flake that provides a NixOS module and a home-manager module for maomaowm. -Use the NixOS module to install maomaowm with other necessary components of a working wayland environment. +Use the NixOS module to install maomaowm with other necessary components of a working Wayland environment. Use the home-manager module to declare configuration and autostart for maomaowm. Here's an example of using the modules in a flake: @@ -167,12 +167,12 @@ Here's an example of using the modules in a flake: } ``` -# thanks for some refer repo +# Thanks to These Reference Repositories -- https://gitlab.freedesktop.org/wlroots/wlroots - implementation of wayland protocol +- https://gitlab.freedesktop.org/wlroots/wlroots - Implementation of Wayland protocol -- https://github.com/dqrk0jeste/owl - basal window animaition +- https://github.com/dqrk0jeste/owl - Basal window animation -- https://codeberg.org/dwl/dwl - basal dwl feature +- https://codeberg.org/dwl/dwl - Basal dwl feature -- https://github.com/swaywm/sway - sample of wayland protocol +- https://github.com/swaywm/sway - Sample of Wayland protocol diff --git a/flake.lock b/flake.lock index 56be444..5c49420 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "flake-compat": { "locked": { - "lastModified": 1717312683, - "narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=", + "lastModified": 1746162366, + "narHash": "sha256-5SSSZ/oQkwfcAz/o/6TlejlVGqeK08wyREBQ5qFFPhM=", "owner": "nix-community", "repo": "flake-compat", - "rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea", + "rev": "0f158086a2ecdbb138cd0429410e44994f1b7e4b", "type": "github" }, "original": { @@ -20,11 +20,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1738453229, - "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", + "lastModified": 1749398372, + "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd", + "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569", "type": "github" }, "original": { @@ -75,11 +75,11 @@ "nixpkgs-lib": "nixpkgs-lib_3" }, "locked": { - "lastModified": 1742732002, - "narHash": "sha256-fznNOUwLtsnaFHIeHfmj1QxOhjiohM2oiGj/54IO+AI=", + "lastModified": 1749989692, + "narHash": "sha256-ojISk2CXljR3qIgwgZh4iNzP3W2H3zGH49xWTJARkoM=", "owner": "nix-community", "repo": "lib-aggregate", - "rev": "00480968bd30f3f43bcd520046bb647833bf2cf2", + "rev": "cae85629e70ce05b968757f3af8f2f2b3923d080", "type": "github" }, "original": { @@ -96,11 +96,11 @@ ] }, "locked": { - "lastModified": 1742777868, - "narHash": "sha256-MdHiygQjBoM22LUJSjeW87t7eDkfRLI2F4Nd64xdLX4=", + "lastModified": 1750505787, + "narHash": "sha256-D57Vl2x9RJP+8pjYGYUf1L/q+G6bsmoVaqJX3m5PtlQ=", "owner": "DreamMaoMao", "repo": "mmsg", - "rev": "6c9dc91e86a0eb89db3ef8f8290530441cb7b658", + "rev": "4dc703aa06ae40d2cf5d3c0122b4d7f7d78fe8bf", "type": "github" }, "original": { @@ -111,11 +111,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1742800061, - "narHash": "sha256-oDJGK1UMArK52vcW9S5S2apeec4rbfNELgc50LqiPNs=", + "lastModified": 1750386251, + "narHash": "sha256-1ovgdmuDYVo5OUC5NzdF+V4zx2uT8RtsgZahxidBTyw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1750f3c1c89488e2ffdd47cab9d05454dddfb734", + "rev": "076e8c6678d8c54204abcb4b1b14c366835a58bb", "type": "github" }, "original": { @@ -127,14 +127,17 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1738452942, - "narHash": "sha256-vJzFZGaCpnmo7I6i416HaBLpC+hvcURh/BQwROcGIp8=", - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz" + "lastModified": 1748740939, + "narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "656a64127e9d791a334452c6b6606d17539476e2", + "type": "github" }, "original": { - "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz" + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" } }, "nixpkgs-lib_2": { @@ -154,11 +157,11 @@ }, "nixpkgs-lib_3": { "locked": { - "lastModified": 1742692082, - "narHash": "sha256-s3XOULQj7BVO7myY5V4Sob0tRZ7nRpwEOIzXg/MkD/Q=", + "lastModified": 1749950217, + "narHash": "sha256-qXoEFKOnznVvMAKezJhSXzRKsJ/LHLRY8NCw1mGhwrU=", "owner": "nix-community", "repo": "nixpkgs.lib", - "rev": "a09310bc940f245e51b1ffea68731244ca38f2bd", + "rev": "753176a8605439613fc6dc9911267b9f720a2615", "type": "github" }, "original": { @@ -174,11 +177,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1742870145, - "narHash": "sha256-ik+6+EorpRPqEVazsJhjyP9z7N83Tkq0F/Ky7GKHEso=", + "lastModified": 1750512508, + "narHash": "sha256-gqSQsdLwfEXG076aSG/SLxKwmFzPdi6cfpl6OZhfnfo=", "owner": "nix-community", "repo": "nixpkgs-wayland", - "rev": "b2bfc4d198ca1ff4e9278c0e984f74a6a086b2ee", + "rev": "c020c609f5bbf34ad5b39856caabafae6175b739", "type": "github" }, "original": { @@ -189,11 +192,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1742669843, - "narHash": "sha256-G5n+FOXLXcRx+3hCJ6Rt6ZQyF1zqQ0DL0sWAMn2Nk0w=", + "lastModified": 1750365781, + "narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=", "owner": "nixos", "repo": "nixpkgs", - "rev": "1e5b653dff12029333a6546c11e108ede13052eb", + "rev": "08f22084e6085d19bcfb4be30d1ca76ecb96fe54", "type": "github" }, "original": { @@ -208,8 +211,7 @@ "flake-parts": "flake-parts", "mmsg": "mmsg", "nixpkgs": "nixpkgs", - "nixpkgs-wayland": "nixpkgs-wayland", - "treefmt-nix": "treefmt-nix" + "nixpkgs-wayland": "nixpkgs-wayland" } }, "systems": { @@ -226,26 +228,6 @@ "repo": "default", "type": "github" } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1739829690, - "narHash": "sha256-mL1szCeIsjh6Khn3nH2cYtwO5YXG6gBiTw1A30iGeDU=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "3d0579f5cc93436052d94b73925b48973a104204", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 6dfc25c..b420722 100644 --- a/flake.nix +++ b/flake.nix @@ -3,10 +3,6 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland"; flake-parts.url = "github:hercules-ci/flake-parts"; - treefmt-nix = { - url = "github:numtide/treefmt-nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; mmsg = { url = "github:DreamMaoMao/mmsg"; inputs.nixpkgs.follows = "nixpkgs"; @@ -16,7 +12,6 @@ outputs = { self, flake-parts, - treefmt-nix, ... } @ inputs: flake-parts.lib.mkFlake {inherit inputs;} { @@ -46,7 +41,6 @@ nativeBuildInputs = old.nativeBuildInputs ++ []; buildInputs = old.buildInputs ++ []; }; - treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix; in { packages.default = maomaowm; overlayAttrs = { @@ -56,7 +50,7 @@ inherit maomaowm; }; devShells.default = maomaowm.overrideAttrs shellOverride; - formatter = treefmtEval.config.build.wrapper; + formatter = pkgs.alejandra; }; systems = ["x86_64-linux" "aarch64-linux"]; }; diff --git a/nix/default.nix b/nix/default.nix index 205379d..d85d9b6 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -1,5 +1,6 @@ { lib, + fetchFromGitHub, libX11, libinput, libxcb, @@ -20,6 +21,15 @@ mmsg, }: let pname = "maomaowm"; + # Use patched wlroots from github.com/DreamMaoMao/wlroots + wlroots-git = wlroots.overrideAttrs (final: prev: { + src = fetchFromGitHub { + owner = "DreamMaoMao"; + repo = "wlroots"; + rev = "afbb5b7c2b14152730b57aa11119b1b16a299d5b"; + sha256 = "sha256-pVU+CuiqvduMTpsnDHX/+EWY2qxHX2lXKiVzdGtcnYY="; + }; + }); in stdenv.mkDerivation { inherit pname; @@ -46,7 +56,7 @@ in pixman wayland wayland-protocols - wlroots + wlroots-git ] ++ lib.optionals enableXWayland [ libX11 diff --git a/treefmt.nix b/treefmt.nix deleted file mode 100644 index e61ce2d..0000000 --- a/treefmt.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ ... }: - -{ - projectRootFile = "flake.nix"; - programs = { - nixfmt.enable = true; - }; -}