File: README.md

package info (click to toggle)
phoc 0.52.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,052 kB
  • sloc: ansic: 107,165; xml: 3,765; sh: 138; makefile: 33; javascript: 5
file content (107 lines) | stat: -rw-r--r-- 2,944 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Phone compositor

[![Code coverage](https://gitlab.gnome.org/World/Phosh/phoc/badges/main/coverage.svg)](https://gitlab.gnome.org/World/Phosh/phoc/-/commits/main)

[wlroots][1] based Phone compositor as used on the Librem5.

Phoc is pronounced like the English word fog.

## Building Phoc

### Dependencies

On a Debian based system run:

```sh
    sudo apt-get -y install build-essential
    sudo apt-get -y build-dep .
```

For an explicit list of dependencies check the `Build-Depends` entry in the
[debian/control][2] file.

### Building

We use the meson (and thereby Ninja) build system for phoc. The quickest
way to get going is to do the following:

```sh
    meson setup _build
    meson compile -C _build
    meson install -C _build --skip-subprojects
```

This assumes you have wlroots installed on your system. If you don't have that
and/or want to build from source run:

```sh
    meson -Dembed-wlroots=enabled --default-library=static _build
    meson compile -C _build
```

This will fetch a matching version of wlroots and build that as well.

## Running

To run from the source tree use

```sh
    ./_build/run
```

### Test

After making source changes run

```sh
    xvfb-run meson test -C _build
```

to see if anything broke.

## Configuration

phoc's behaviour can be configured via `GSettings`. For your convenience,
a set of scripts to manipulate config values is available in `helpers`
directory.

- `scale-to-fit` toggles automatic scaling of applications that don't fit
  the screen. This setting is enabled per application using its reported
  app-id. For instance, to enable scaling of GNOME Maps windows use:

      ./tools/scale-to-fit org.gnome.Maps on

- `auto-maximize` toggles automatic maximization of Wayland windows.
  Disabling it allows windows to be resized and moved, which may be desired
  when running phoc on desktop-like setups.

      ./tools/auto-maximize off

Outputs are configured via `phoc.ini` config file - see [`src/phoc.ini.example`][3]
for more information.

## Debugging

phoc uses glib so the `G_MESSAGES_DEBUG` environment variable can be
used to enable more log messages and `G_DEBUG` to assert on warnings
and criticals. The log domains all start with `phoc-` and are usually
`phoc-<sourcefile>`. All wlroots related messages are logged with
`phoc-wlroots`.
For more details on these environment variables, read the [documentation for GLib][4].

There's also a `PHOC_DEBUG` environment variable to turn on some debugging
features. Use `PHOC_DEBUG=help phoc` to see supported flags.

## API docs

API documentation is available at <https://world.pages.gitlab.gnome.org/Phosh/phoc/>

## Getting in Touch

- Issue tracker: <https://gitlab.gnome.org/World/Phosh/phoc/issues>
- Matrix: <https://matrix.to/#/#phosh:phosh.mobi>

[1]: https://gitlab.freedesktop.org/wlroots/
[2]: debian/control
[3]: src/phoc.ini.example
[4]: https://docs.gtk.org/glib/running.html#environment-variables