##// END OF EJS Templates
swapped to meson
Tsuki -
r1:60e13e940ee8 default
parent child Browse files
Show More
@@ -0,0 +1,143
1 project(
2 'swindle',
3 'c',
4 version: '0.1',
5 default_options: [
6 'c_std=c11',
7 'buildtype=debugoptimized',
8 ],
9 )
10
11 cc = meson.get_compiler('c')
12
13 add_project_arguments(
14 '-DWLR_USE_UNSTABLE',
15 '-D_POSIX_C_SOURCE=200809L',
16 '-DVERSION="0.1"',
17 '-Wall',
18 '-Wextra',
19 '-Wno-unused-parameter',
20 '-Wno-stringop-truncation',
21 language: 'c',
22 )
23
24 xwayland_opt = get_option('xwayland')
25
26 wayland_server = dependency('wayland-server')
27 wayland_client = dependency('wayland-client')
28 wayland_protocols = dependency('wayland-protocols')
29 wayland_scanner_dep = dependency('wayland-scanner', native: true)
30 wlroots = dependency('wlroots-0.20')
31 xkbcommon = dependency('xkbcommon')
32 libinput = dependency('libinput')
33 lua = dependency('lua5.4')
34 m_dep = cc.find_library('m', required: false)
35
36 swindle_deps = [
37 wayland_server,
38 wlroots,
39 xkbcommon,
40 libinput,
41 lua,
42 m_dep,
43 ]
44
45 if xwayland_opt
46 swindle_deps += dependency('xcb')
47 swindle_deps += dependency('xcb-icccm')
48 add_project_arguments('-DXWAYLAND', language: 'c')
49 endif
50
51 wayland_scanner = find_program(
52 wayland_scanner_dep.get_variable('wayland_scanner'),
53 native: true,
54 )
55 wl_protocol_dir = wayland_protocols.get_variable('pkgdatadir')
56
57 wayland_scanner_server = generator(
58 wayland_scanner,
59 output: '@[email protected]',
60 arguments: ['server-header', '@INPUT@', '@OUTPUT@'],
61 )
62
63 wayland_scanner_private = generator(
64 wayland_scanner,
65 output: '@[email protected]',
66 arguments: ['private-code', '@INPUT@', '@OUTPUT@'],
67 )
68
69 wayland_scanner_enum = generator(
70 wayland_scanner,
71 output: '@[email protected]',
72 arguments: ['enum-header', '@INPUT@', '@OUTPUT@'],
73 )
74
75 cursor_shape_xml = wl_protocol_dir / 'staging/cursor-shape/cursor-shape-v1.xml'
76 pointer_constraints_xml = wl_protocol_dir / 'unstable/pointer-constraints/pointer-constraints-unstable-v1.xml'
77 xdg_shell_xml = wl_protocol_dir / 'stable/xdg-shell/xdg-shell.xml'
78
79 layer_shell_xml = 'protocols/wlr-layer-shell-unstable-v1.xml'
80 output_power_xml = 'protocols/wlr-output-power-management-unstable-v1.xml'
81 dwl_ipc_xml = 'protocols/dwl-ipc-unstable-v2.xml'
82 ext_workspace_xml = 'protocols/ext-workspace-v1.xml'
83
84 cursor_shape_h = wayland_scanner_enum.process(cursor_shape_xml)
85 pointer_constraints_h = wayland_scanner_enum.process(pointer_constraints_xml)
86 layer_shell_h = wayland_scanner_enum.process(layer_shell_xml)
87 output_power_h = wayland_scanner_server.process(output_power_xml)
88 xdg_shell_h = wayland_scanner_server.process(xdg_shell_xml)
89
90 dwl_ipc_h = wayland_scanner_server.process(dwl_ipc_xml)
91 dwl_ipc_c = wayland_scanner_private.process(dwl_ipc_xml)
92 ext_workspace_h = wayland_scanner_server.process(ext_workspace_xml)
93 ext_workspace_c = wayland_scanner_private.process(ext_workspace_xml)
94
95 protocol_headers = [
96 cursor_shape_h,
97 pointer_constraints_h,
98 layer_shell_h,
99 output_power_h,
100 xdg_shell_h,
101 ]
102
103 swindle_sources = [
104 'src/swindle.c',
105 'src/util.c',
106 'src/wlr_ext_workspace_v1.c',
107 'parser/parser.c',
108 dwl_ipc_c,
109 dwl_ipc_h,
110 ext_workspace_c,
111 ext_workspace_h,
112 ]
113
114 executable(
115 'swindle',
116 swindle_sources + protocol_headers,
117 include_directories: include_directories('.', 'include', 'src', 'parser'),
118 dependencies: swindle_deps,
119 install: true,
120 )
121
122 smsg_dwl_ipc_h = custom_target(
123 'smsg-dwl-ipc-unstable-v2-protocol-h',
124 input: dwl_ipc_xml,
125 output: 'dwl-ipc-unstable-v2-protocol.h',
126 command: [wayland_scanner, 'client-header', '@INPUT@', '@OUTPUT@'],
127 )
128
129 smsg_dwl_ipc_c = custom_target(
130 'smsg-dwl-ipc-unstable-v2-protocol-c',
131 input: dwl_ipc_xml,
132 output: 'dwl-ipc-unstable-v2-protocol.c',
133 command: [wayland_scanner, 'private-code', '@INPUT@', '@OUTPUT@'],
134 )
135
136 executable(
137 'smsg',
138 ['smsg/smsg.c', smsg_dwl_ipc_c, smsg_dwl_ipc_h],
139 dependencies: [wayland_client],
140 install: true,
141 )
142
143 install_subdir('example', install_dir: get_option('sysconfdir') / 'swindle', strip_directory: true)
@@ -0,0 +1,6
1 option(
2 'xwayland',
3 type: 'boolean',
4 value: true,
5 description: 'Enable XWayland support',
6 )
@@ -1,20 +1,21
1 syntax: glob
1 syntax: glob
2 swindle
2 swindle
3 smsg/smsg
3 smsg/smsg
4 *.o
4 *.o
5 *-protocol.c
5 *-protocol.c
6 *-protocol.h
6 *-protocol.h
7 smsg/*-protocol.c
7 smsg/*-protocol.c
8 smsg/*-protocol.h
8 smsg/*-protocol.h
9 result
9 result
10 result-*
10 result-*
11 .direnv/
11 .direnv/
12 .vscode/
12 .vscode/
13 .idea/
13 .idea/
14 .cache/
14 .cache/
15 compile_commands.json
15 compile_commands.json
16 tags
16 tags
17 *.swp
17 *.swp
18 *.swo
18 *.swo
19 *~
19 *~
20 include/lua5.4/*
20 include/lua5.4/*
21 build/
@@ -1,56 +1,58
1 ## Swindle
1 ## Swindle
2
2
3
3
4
4
5 > "It's so bad it's not even funny!" -kantiankant, 2026
5 > "It's so bad it's not even funny!" -kantiankant, 2026
6
6
7
7
8 Swindle is a fork of [dwl](https://codeberg.org/dwl/dwl) that was designed from the start with one goal: to make it feel like the poor man's Hyprland. It has the following:
8 Swindle is a fork of [dwl](https://codeberg.org/dwl/dwl) that was designed from the start with one goal: to make it feel like the poor man's Hyprland. It has the following:
9
9
10 * NO cool vfx
10 * NO cool vfx
11 * nearly NO documentation
11 * nearly NO documentation
12 * ZERO good original code
12 * ZERO good original code
13 * only ONE tiling layout (dwindle)
13 * only ONE tiling layout (dwindle)
14
14
15 > Fun fact: I actually took some parts of [MangoWM](https://github.com/mangowm/mango) (such as the ext-workspaces implementation). hence why the LICENSE.mangowm exists
15 > Fun fact: I actually took some parts of [MangoWM](https://github.com/mangowm/mango) (such as the ext-workspaces implementation). hence why the LICENSE.mangowm exists
16
16
17 ## Dependencies
17 ## Dependencies
18
18
19 * libinput
19 * libinput
20 * wayland
20 * wayland
21 * wlroots-0.20 (compiled with the libinput backend)
21 * wlroots-0.20 (compiled with the libinput backend)
22 * xkbcommon
22 * xkbcommon
23 * wayland-protocols (compile-time only)
23 * wayland-protocols (compile-time only)
24 * pkg-config (compile-time only)
24 * pkg-config (compile-time only)
25 * meson (compile-time only)
26 * ninja (compile-time only)
25
27
26 Install these (and their `-devel` versions if your distro has separate
28 Install these (and their `-devel` versions if your distro has separate
27 development packages) and run `make` followed by `doas/sudo make install`, if you wish to install it (installs to /usr/local/bin/ by default).
29 development packages) and run `make` followed by `doas/sudo make install`, if you wish to install it (installs to /usr/local/bin/ by default).
28
30
29 ## Things that are good to have
31 ## Things that are good to have
30
32
31 * [foot](https://codeberg.org/dnkl/foot)
33 * [foot](https://codeberg.org/dnkl/foot)
32
34
33
35
34 ## Known Issues
36 ## Known Issues
35
37
36 N/A
38 N/A
37
39
38 ## Configuration
40 ## Configuration
39
41
40 read example/config.lua. It should give you a basic idea of how configuring swindle works.
42 read example/config.lua. It should give you a basic idea of how configuring swindle works.
41
43
42 > note: it's best to copy /etc/swindle/config.lua into XDG_HOME_DIR/.config/swindle/ before you attempt to
44 > note: it's best to copy /etc/swindle/config.lua into XDG_HOME_DIR/.config/swindle/ before you attempt to
43 start swindle because it (swindle) won't start without it
45 start swindle because it (swindle) won't start without it
44
46
45 ## Checklist
47 ## Checklist
46
48
47 - [ ] separate the trackpad scroll from the mousee scroll
49 - [ ] separate the trackpad scroll from the mousee scroll
48 - [x] Add ability to change your keymap
50 - [x] Add ability to change your keymap
49 - [ ] Add animations via [scenefx](https://github.com/wlrfx/scenefx) when 0.5 drops (in another branch)
51 - [ ] Add animations via [scenefx](https://github.com/wlrfx/scenefx) when 0.5 drops (in another branch)
50 - [ ] Add the ability for the compositor to read a custom path for configs
52 - [ ] Add the ability for the compositor to read a custom path for configs
51 - [ ] Add /etc/swindle/config.lua as a fallback path if $HOME/.config/swindle/config.lua is not found
53 - [ ] Add /etc/swindle/config.lua as a fallback path if $HOME/.config/swindle/config.lua is not found
52
54
53
55
54 ## License
56 ## License
55
57
56 GPL-v3, probably
58 GPL-v3, probably
@@ -1,61 +1,61
1 {
1 {
2 "nodes": {
2 "nodes": {
3 "flake-utils": {
3 "flake-utils": {
4 "inputs": {
4 "inputs": {
5 "systems": "systems"
5 "systems": "systems"
6 },
6 },
7 "locked": {
7 "locked": {
8 "lastModified": 1731533236,
8 "lastModified": 1731533236,
9 "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
9 "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
10 "owner": "numtide",
10 "owner": "numtide",
11 "repo": "flake-utils",
11 "repo": "flake-utils",
12 "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
12 "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
13 "type": "github"
13 "type": "github"
14 },
14 },
15 "original": {
15 "original": {
16 "owner": "numtide",
16 "owner": "numtide",
17 "repo": "flake-utils",
17 "repo": "flake-utils",
18 "type": "github"
18 "type": "github"
19 }
19 }
20 },
20 },
21 "nixpkgs": {
21 "nixpkgs": {
22 "locked": {
22 "locked": {
23 "lastModified": 1786106723,
23 "lastModified": 1786599213,
24 "narHash": "sha256-zDSUbpoeo/9ZmD2+wXnzxoo1+uhL8vxc0b8yuYMKYq0=",
24 "narHash": "sha256-yNJd40f11EzXBjSByCB7IPpeFFAdeoSKKM67dGkfFoU=",
25 "owner": "NixOS",
25 "owner": "NixOS",
26 "repo": "nixpkgs",
26 "repo": "nixpkgs",
27 "rev": "f13ff45afd1bb73e640eaa08a7066dbed07e3238",
27 "rev": "0e251e24a4f24e036a084b6b4b2d2491af4167f4",
28 "type": "github"
28 "type": "github"
29 },
29 },
30 "original": {
30 "original": {
31 "owner": "NixOS",
31 "owner": "NixOS",
32 "ref": "nixos-unstable",
32 "ref": "nixos-unstable",
33 "repo": "nixpkgs",
33 "repo": "nixpkgs",
34 "type": "github"
34 "type": "github"
35 }
35 }
36 },
36 },
37 "root": {
37 "root": {
38 "inputs": {
38 "inputs": {
39 "flake-utils": "flake-utils",
39 "flake-utils": "flake-utils",
40 "nixpkgs": "nixpkgs"
40 "nixpkgs": "nixpkgs"
41 }
41 }
42 },
42 },
43 "systems": {
43 "systems": {
44 "locked": {
44 "locked": {
45 "lastModified": 1681028828,
45 "lastModified": 1681028828,
46 "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
46 "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
47 "owner": "nix-systems",
47 "owner": "nix-systems",
48 "repo": "default",
48 "repo": "default",
49 "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
49 "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
50 "type": "github"
50 "type": "github"
51 },
51 },
52 "original": {
52 "original": {
53 "owner": "nix-systems",
53 "owner": "nix-systems",
54 "repo": "default",
54 "repo": "default",
55 "type": "github"
55 "type": "github"
56 }
56 }
57 }
57 }
58 },
58 },
59 "root": "root",
59 "root": "root",
60 "version": 7
60 "version": 7
61 }
61 }
@@ -1,65 +1,51
1 {
1 {
2 description = "swindle: a dwl fork with Lua config, IPC, and ext-workspace support, plus its smsg client";
2 description = "swindle: a dwl fork with Lua config, IPC, and ext-workspace support, plus its smsg client";
3
4 inputs = {
3 inputs = {
5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
4 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6 flake-utils.url = "github:numtide/flake-utils";
5 flake-utils.url = "github:numtide/flake-utils";
7 };
6 };
8
9 outputs = { self, nixpkgs, flake-utils }:
7 outputs = { self, nixpkgs, flake-utils }:
10 flake-utils.lib.eachDefaultSystem (system:
8 flake-utils.lib.eachDefaultSystem (system:
11 let
9 let
12 pkgs = nixpkgs.legacyPackages.${system};
10 pkgs = nixpkgs.legacyPackages.${system};
13 in
11 in
14 {
12 {
15 packages.default = pkgs.stdenv.mkDerivation rec {
13 packages.default = pkgs.stdenv.mkDerivation rec {
16 pname = "swindle";
14 pname = "swindle";
17 version = "0.1";
15 version = "0.1";
18
19 src = self;
16 src = self;
20
21 nativeBuildInputs = with pkgs; [
17 nativeBuildInputs = with pkgs; [
22 pkg-config
18 pkg-config
23 wayland-scanner
19 wayland-scanner
24 wayland-protocols
20 wayland-protocols
21 meson
22 ninja
25 ];
23 ];
26
27 buildInputs = with pkgs; [
24 buildInputs = with pkgs; [
28 wayland
25 wayland
29 wlroots_0_20
26 wlroots_0_20
30 pixman
27 pixman
31 libxkbcommon
28 libxkbcommon
32 libinput
29 libinput
33 lua5_4
30 lua5_4
34 libxcb
31 libxcb
35 libxcb-wm
32 libxcb-wm
36 ];
33 ];
37
38 enableParallelBuilding = true;
34 enableParallelBuilding = true;
39
35 mesonFlags = [ "-Dxwayland=true" ];
40 postPatch = ''
41 substituteInPlace Makefile \
42 --replace '$(DESTDIR)/etc/swindle' '$(DESTDIR)$(PREFIX)/etc/swindle'
43 '';
44
45 makeFlags = [ "PREFIX=${placeholder "out"}" ];
46
47 meta = with pkgs.lib; {
36 meta = with pkgs.lib; {
48 description = "A dwl fork with Lua configuration, IPC support, and ext-workspace-v1";
37 description = "A dwl fork with Lua configuration, IPC support, and ext-workspace-v1";
49 license = with licenses; [ gpl3Only mit isc ];
38 license = with licenses; [ gpl3Only mit isc ];
50 platforms = platforms.linux;
39 platforms = platforms.linux;
51 mainProgram = "swindle";
40 mainProgram = "swindle";
52 };
41 };
53 };
42 };
54
55 devShells.default = pkgs.mkShell {
43 devShells.default = pkgs.mkShell {
56 inputsFrom = [ self.packages.${system}.default ];
44 inputsFrom = [ self.packages.${system}.default ];
57 packages = with pkgs; [ pkg-config gdb ];
45 packages = with pkgs; [ pkg-config gdb ];
58 };
46 };
59
60 apps.default = flake-utils.lib.mkApp {
47 apps.default = flake-utils.lib.mkApp {
61 drv = self.packages.${system}.default;
48 drv = self.packages.${system}.default;
62 };
49 };
63 });
50 });
64 }
51 }
65
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now