1
0
mirror of https://github.com/artizirk/wdisplays.git synced 2025-09-04 14:30:59 +03:00

21 Commits

Author SHA1 Message Date
157b8c51e8 Release 1.1.3 2025-07-25 14:43:47 +03:00
79225e57a3 Merge pull request #13 from Aleksanaa/fixes
Fixed menu scaling issue by disabling the use of GTK popover
2025-07-25 12:53:02 +03:00
4257ef446b Release 1.1.2 2025-07-25 12:43:53 +03:00
cef925b96a Merge pull request #25 from ceamac/fix/C23
Fix C23 issues
2025-07-25 12:37:57 +03:00
Viorel Munteanu
6b7c637875 Fix C23 issues
gcc 15 is more strict and compiles C by default with C23.  `noop` is
used as a default null initializer, but now it must have the correct
type, so add a cast.

See also: https://bugs.gentoo.org/946954
2024-12-28 11:56:49 +02:00
aleksana
50e549465d Fixed menu scaling issue by disabling the use of GTK popover
This fixes https://github.com/artizirk/wdisplays/issues/9
2023-10-08 17:05:31 +08:00
6233901a88 Merge pull request #8 from alex-courtis/add-way-displays
add way-displays to readme
2023-07-26 15:42:56 +03:00
2c5e4d72b5 Merge pull request #7 from bhepple/patch-3
Update README.md - update fedora package location
2023-07-26 15:41:20 +03:00
Alexander Courtis
4cc1d2300d add way-displays to readme 2023-07-03 14:06:16 +10:00
Bob Hepple
7afc947f62 Update README.md - update fedora package location 2023-07-03 12:53:51 +10:00
redtide
1a32d8bbe2 Minor changes to changelog 2023-07-01 14:07:26 +02:00
redtide
64aa4a551d Added CHANGELOG.md (keepachangelog.com format) 2023-07-01 14:01:16 +02:00
redtide
052c492040 Fixed license SPDX ID in main meson.build 2023-07-01 13:37:40 +02:00
redtide
0683283fa5 Updated desktop file
- Removed Version key: it's the version of the Desktop Entry Specification, not the application version and it's not required (see Table 2. Standard Keys in the specification)
- Set a real Name to display in menu for the application, with GenericName and Comment (same page as above)
- Italian translation strings
2023-07-01 12:45:24 +02:00
redtide
919726a2e5 Bump to current development version, use semver 2023-07-01 12:37:16 +02:00
redtide
aefde05389 Added .editorconfig and .clang-format 2023-07-01 12:35:38 +02:00
redtide
c15e5870d9 Ignore QtCreator files 2023-07-01 12:34:46 +02:00
redtide
73f3cc2dd2 Merge pull request #2 from WhyNotHugo/output-name-bottom-left
Move the output name overlay to the bottom left
2023-07-01 09:52:32 +02:00
redtide
9f8508b31e Merge pull request #1 from somini/patch-1
Move icon to the app_id name
2023-07-01 09:52:11 +02:00
somini
f4cf935e49 Install icon to the app_id location
This is so that the desktop files picks it up correctly.

Thanks, @WhyNotHugo and @jbeich.
2023-04-02 11:57:39 +01:00
Hugo Osvaldo Barrera
59edbbd155 Move the output name overlay to the bottom left
The output name overlay renders on the top left by default. At the same
time, wdisplays renders the output previews on its top left corner too.

The results is that the overlay covered the output previews, making
seeing it and interacting with it tricky.

Moving the output name to the bottom left makes sure there's never any
overlap between it and the draggable previews shows for each output.
2022-02-25 17:37:46 +01:00
12 changed files with 121 additions and 15 deletions

4
.clang-format Normal file
View File

@@ -0,0 +1,4 @@
---
IndentWidth: '2'
...

14
.editorconfig Normal file
View File

@@ -0,0 +1,14 @@
# EditorConfig configuration
# http://editorconfig.org
# Top-most EditorConfig file
root = true
# UTF-8 charset, set indent to spaces with width of four,
# with no trailing whitespaces and a newline ending every file.
[*]
charset = utf-8
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

1
.gitignore vendored
View File

@@ -1 +1,2 @@
/build/
*.user

72
CHANGELOG.md Normal file
View File

@@ -0,0 +1,72 @@
# Changelog
The format is based on [Keep a Changelog][1].
This project tries to adhere to [Semantic Versioning][2].
## [Unreleased]
## [1.1.3] - 2025-07-25
### Fixed
Fixed tiny GTK dropdown menu on Hyprland (Aleksanaa)
## [1.1.2] - 2025-07-25
### Fixed
Fixed compilation error with new GCC (ceamac)
## [1.1.1] - 2023-07-01
### Added
Added QtCreator files to .gitignore (redtide)
.editorconfig and .clang-format (redtide)
this file (redtide)
### Changed
Install icon to the app_id location (somini)
Move the output name overlay to the bottom left (WhyNotHugo)
Bump to current development version, use semver (redtide)
Updated desktop file (redtide)
### Fixed
Fixed license SPDX ID in main meson.build
## [1.1] - 2023-04-18
### Added
Added categories to the program shortcut (IntinteDAO)
### Changed
Add package links (Jason Francis)
Backport GTK4 changes (Jason Francis)
Create WdHeadForm class (Jason Francis)
Update README (Jason Francis)
Use correct versions when binding globals (Simon Ser)
## [v1.0] - 2020-05-09
First release after <https://github.com/MichaelAquilina/wdisplays> fork
(backup of the original, deleted repository at <https://github.com/cyclopsian/wdisplays>)
### Changed
Update application ID and readme (Jason Francis)
[1]: https://keepachangelog.com/en/1.0.0/
[2]: https://semver.org/spec/v2.0.0.html
[Unreleased]: https://github.com/artizirk/wdisplays/compare/1.1.3...HEAD
[1.1.3]: https://github.com/artizirk/wdisplays/compare/1.1.2...1.1.3
[1.1.2]: https://github.com/artizirk/wdisplays/compare/1.1.1...1.1.2
[1.1.1]: https://github.com/artizirk/wdisplays/compare/1.1...1.1.1
[1.1]: https://github.com/artizirk/wdisplays/compare/1.0...1.1
[1.0]: https://github.com/artizirk/wdisplays/releases/tag/1.0

View File

@@ -20,7 +20,7 @@ Check your distro for a `wdisplays` package. Known distro packages:
- [Alpine](https://pkgs.alpinelinux.org/package/edge/testing/x86_64/wdisplays)
- [Arch](https://aur.archlinux.org/packages/wdisplays-git/)
- [Debian](https://packages.debian.org/sid/wdisplays)
- [Fedora](https://copr.fedorainfracloud.org/coprs/wef/wdisplays/)
- [Fedora](https://packages.fedoraproject.org/pkgs/wdisplays/wdisplays)
- [FreeBSD](https://svnweb.freebsd.org/ports/head/x11/wdisplays/)
- [Nix](https://github.com/NixOS/nixpkgs/tree/master/pkgs/tools/graphics/wdisplays)
- [OpenSUSE](https://build.opensuse.org/package/show/home%3AMWh3/wdisplays)
@@ -70,7 +70,8 @@ It's intended to be the Wayland equivalent of an xrandr GUI, like [ARandR].
Sway, like i3, doesn't save any settings unless you put them in the config
file. See man `sway-output`. If you want to have multiple configurations
depending on the monitors connected, you'll need to use an external program
like [kanshi]. Integration with that and other external daemons is planned.
like [kanshi] or [way-displays]. Integration with that and other external
daemons is planned.
### How do I add support to my compositor?
@@ -79,6 +80,7 @@ get support for this in wlroots compositors. See the diff here for a sample
implementation on top of tinywl: [tinywl-output-management].
[kanshi]: https://github.com/emersion/kanshi
[way-displays]: https://github.com/alex-courtis/way-displays
[Sway]: https://swaywm.org
[Wayfire]: https://wayfire.org
[ARandR]: https://christian.amsuess.com/tools/arandr/

View File

@@ -1,7 +1,10 @@
# SPDX-FileCopyrightText: 2020 Jason Francis <jason@cycles.network>
# SPDX-License-Identifier: CC0-1.0
project('network.cycles.wdisplays', 'c', license: 'MIT', version: '1.0')
project('network.cycles.wdisplays', 'c',
license: 'GPL-3.0-or-later',
version: '1.1.3'
)
conf = configuration_data({
'app_id': meson.project_name(),

View File

@@ -36,9 +36,12 @@ if scour.found()
'@INPUT@', '@OUTPUT@'],
install: true,
install_dir: icondir)
else
install_data(icon, install_dir: icondir)
endif
else
install_data(icon,
rename: '@0@.svg'.format(meson.project_name()),
install_dir: icondir
)
endif
install_data(
configure_file(input: 'wdisplays.desktop.in',

View File

@@ -1,8 +1,12 @@
[Desktop Entry]
Version=@version@
Type=Application
Name=wdisplays
Comment=Wlroots display configuration
Categories=GTK;Settings;DesktopSettings;
Exec=wdisplays
Icon=@app_id@
Name=Displays
GenericName=Displays configuration
Comment=wlroots displays configuration
Name[it]=Schermi
GenericName[it]=Impostazioni degli schermi
Comment[it]=Impostazioni degli schermi per wlroots

View File

@@ -195,6 +195,7 @@ static void wd_head_form_init(WdHeadForm *form) {
g_menu_append(rotate_menu, "Rotate 180°", "head.rotate(180)");
g_menu_append(rotate_menu, "Rotate 270°", "head.rotate(270)");
gtk_menu_button_set_menu_model(GTK_MENU_BUTTON(priv->rotate_button), G_MENU_MODEL(rotate_menu));
gtk_menu_button_set_use_popover(GTK_MENU_BUTTON(priv->rotate_button), false);
static const GVariantType * const mode_types[] = {
G_VARIANT_TYPE_INT32,
@@ -255,6 +256,7 @@ void wd_head_form_update(WdHeadForm *form, const struct wd_head *head,
g_menu_append_item(mode_menu, item);
}
gtk_menu_button_set_menu_model(GTK_MENU_BUTTON(priv->mode_button), G_MENU_MODEL(mode_menu));
gtk_menu_button_set_use_popover(GTK_MENU_BUTTON(priv->mode_button), false);
// Mode entries
int w = head->custom_mode.width;
int h = head->custom_mode.height;

View File

@@ -1039,6 +1039,7 @@ static void activate(GtkApplication* app, gpointer user_data) {
g_menu_append(main_menu, "_Show Screen Contents", "app.capture-screens");
g_menu_append(main_menu, "_Overlay Screen Names", "app.show-overlay");
gtk_menu_button_set_menu_model(GTK_MENU_BUTTON(state->menu_button), G_MENU_MODEL(main_menu));
gtk_menu_button_set_use_popover(GTK_MENU_BUTTON(state->menu_button), false);
g_signal_connect(state->info_bar, "response", G_CALLBACK(info_response), state);
/* first child of GtkInfoBar is always GtkRevealer */

View File

@@ -526,7 +526,7 @@ static void output_manager_handle_done(void *data,
static const struct zwlr_output_manager_v1_listener output_manager_listener = {
.head = output_manager_handle_head,
.done = output_manager_handle_done,
.finished = noop,
.finished = (void (*)(void *, struct zwlr_output_manager_v1 *))noop,
};
static void registry_handle_global(void *data, struct wl_registry *registry,
uint32_t name, const char *interface, uint32_t version) {
@@ -553,7 +553,7 @@ static void registry_handle_global(void *data, struct wl_registry *registry,
static const struct wl_registry_listener registry_listener = {
.global = registry_handle_global,
.global_remove = noop,
.global_remove = (void (*)(void *, struct wl_registry *, uint32_t))noop,
};
void wd_add_output_management_listener(struct wd_state *state, struct
@@ -603,10 +603,10 @@ static void output_name(void *data, struct zxdg_output_v1 *zxdg_output_v1,
static const struct zxdg_output_v1_listener output_listener = {
.logical_position = output_logical_position,
.logical_size = noop,
.done = noop,
.logical_size = (void (*)(void *, struct zxdg_output_v1 *, int32_t, int32_t))noop,
.done = (void (*)(void *, struct zxdg_output_v1 *))noop,
.name = output_name,
.description = noop
.description = (void (*)(void *, struct zxdg_output_v1 *, const char *))noop
};
void wd_add_output(struct wd_state *state, struct wl_output *wl_output,

View File

@@ -132,7 +132,7 @@ void window_map(GtkWidget *widget, gpointer data) {
&layer_surface_listener, output);
zwlr_layer_surface_v1_set_anchor(output->overlay_layer_surface,
ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP |
ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM |
ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT);
resize(output);