update name

This commit is contained in:
Jason Francis 2019-08-01 10:33:45 -04:00
parent 43a2d18075
commit 2ec122ef32
10 changed files with 34 additions and 13 deletions

View File

@ -1,10 +1,27 @@
# wdisplay # wdisplays
wdisplay is a graphical application for configuring displays in wlroots [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://spdx.org/licenses/MIT.html)
compositors. It borrows some code from [kanshi].
## License wdisplays is a graphical application for configuring displays in Wayland
compositors. It borrows some code from [kanshi]. It should work in any
compositor that implements the wlr-output-management-unstable-v1 protocol, such
as [sway].
MIT ![Screenshot](wdisplays.png)
# Building
Build requirements are:
- GTK+3
- epoxy
- wayland-client
```sh
meson build
ninja -C build
sudo ninja -C build install
```
[kanshi]: https://github.com/emersion/kanshi [kanshi]: https://github.com/emersion/kanshi
[sway]: https://github.com/swaywm/sway

View File

@ -1,4 +1,4 @@
project('wdisplay', 'c') project('wdisplays', 'c')
subdir('protocol') subdir('protocol')
subdir('resources') subdir('resources')

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<gresources> <gresources>
<gresource prefix="/"> <gresource prefix="/">
<file compressed="true" preprocess="xml-stripblanks">wdisplay.ui</file> <file compressed="true" preprocess="xml-stripblanks">wdisplays.ui</file>
<file compressed="true" preprocess="xml-stripblanks">head.ui</file> <file compressed="true" preprocess="xml-stripblanks">head.ui</file>
<file compressed="true">style.css</file> <file compressed="true">style.css</file>
</gresource> </gresource>

View File

@ -228,7 +228,7 @@
<object class="GtkHeaderBar"> <object class="GtkHeaderBar">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property> <property name="can_focus">False</property>
<property name="title" translatable="yes">wdisplay</property> <property name="title" translatable="yes">wdisplays</property>
<property name="has_subtitle">False</property> <property name="has_subtitle">False</property>
<property name="show_close_button">True</property> <property name="show_close_button">True</property>
<child> <child>

View File

@ -24,7 +24,7 @@
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <gdk/gdkwayland.h> #include <gdk/gdkwayland.h>
#include "wdisplay.h" #include "wdisplays.h"
#include "glviewport.h" #include "glviewport.h"
__attribute__((noreturn)) void wd_fatal_error(int status, const char *message) { __attribute__((noreturn)) void wd_fatal_error(int status, const char *message) {
@ -1148,7 +1148,7 @@ static void activate(GtkApplication* app, gpointer user_data) {
state->grabbing_cursor = gdk_cursor_new_from_name(gdk_display, "grabbing"); state->grabbing_cursor = gdk_cursor_new_from_name(gdk_display, "grabbing");
state->move_cursor = gdk_cursor_new_from_name(gdk_display, "move"); state->move_cursor = gdk_cursor_new_from_name(gdk_display, "move");
GtkBuilder *builder = gtk_builder_new_from_resource("/wdisplay.ui"); GtkBuilder *builder = gtk_builder_new_from_resource("/wdisplays.ui");
GtkWidget *window = GTK_WIDGET(gtk_builder_get_object(builder, "heads_window")); GtkWidget *window = GTK_WIDGET(gtk_builder_get_object(builder, "heads_window"));
state->header_stack = GTK_WIDGET(gtk_builder_get_object(builder, "header_stack")); state->header_stack = GTK_WIDGET(gtk_builder_get_object(builder, "header_stack"));
state->stack_switcher = GTK_WIDGET(gtk_builder_get_object(builder, "heads_stack_switcher")); state->stack_switcher = GTK_WIDGET(gtk_builder_get_object(builder, "heads_stack_switcher"));

View File

@ -8,7 +8,7 @@ assert(gdk.get_pkgconfig_variable('targets').split().contains('wayland'), 'Wayla
epoxy = dependency('epoxy') epoxy = dependency('epoxy')
executable( executable(
'wdisplay', 'wdisplays',
[ [
'main.c', 'main.c',
'outputs.c', 'outputs.c',

View File

@ -39,7 +39,7 @@
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h> #include <unistd.h>
#include "wdisplay.h" #include "wdisplays.h"
#include "wlr-output-management-unstable-v1-client-protocol.h" #include "wlr-output-management-unstable-v1-client-protocol.h"
#include "xdg-output-unstable-v1-client-protocol.h" #include "xdg-output-unstable-v1-client-protocol.h"
@ -644,5 +644,9 @@ void wd_state_destroy(struct wd_state *state) {
wl_list_for_each_safe(output, output_tmp, &state->outputs, link) { wl_list_for_each_safe(output, output_tmp, &state->outputs, link) {
wd_output_destroy(output); wd_output_destroy(output);
} }
zwlr_screencopy_manager_v1_destroy(state->copy_manager);
zwlr_output_manager_v1_destroy(state->output_manager);
zxdg_output_manager_v1_destroy(state->xdg_output_manager);
wl_shm_destroy(state->shm);
free(state); free(state);
} }

View File

@ -21,7 +21,7 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
#include "wdisplay.h" #include "wdisplays.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>

BIN
wdisplays.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB