Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify config example to avoid confusion #32

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vincentaxhe
Copy link

[left] with bottom corners is confusing, left refers to left monitor and just a label. #30

Copy link
Owner

@AndreasBackx AndreasBackx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! I think this is heading in the right direction. However, it currently would make people think that it depends on the output name of the monitor, while you can actually specify the model number and more (depending on what the compositor puts in the output description). This was important to me because some of my monitors are the same model and some other tooling does not support this.

I've left some other comments as well. Let me know what you think.

@@ -49,7 +49,7 @@ cargo install --path . --locked
Default configuration location is `~/.config/waycorner/config.toml`, this needs to be created manually. You can also specify a different location using `--config`. Preview your configuration with the `--preview` flag.

```toml
[left]
[eDP-1]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[eDP-1]
[main-monitor]

Let's maybe name it what it looks like on your desk? Like, your main monitor?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, more look like a label

# Regex to match output descriptions on.
# Regex engine is similar to RE2: https://github.com/rust-lang/regex
#
# Use `swaymsg -t get_outputs` to get a list of outputs in the format:
# Output ${NAME} '${DESCRIPTION}'
description = "" # default, empty means all outputs
description = "eDP-1" # default, empty means all outputs
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description = "eDP-1" # default, empty means all outputs
# This often contains the output name, manufacturer, model, and serial number so
# any of those could be used for matching.
description = "U3219Q F2XWXV2" # default, empty means all outputs

An output is not always stable and it's more reliable to use something like the model number, or even the serial. Let's use that?

Copy link
Author

@vincentaxhe vincentaxhe Jan 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use hyprland, I can not check the swaymsg output looks like, it should base on basic method like xrandr -q, people will get confused here, you mean your output is a json,and the key 'description' value must match "U3219Q F2XWXV2"? In my case hyprctl monitors -j will give this, I donot need description to filter the output, just name will do. if your code read from sys device meta data, It will be universal.

[{
    "id": 0,
    "name": "eDP-1",
    "description": "AU Optronics 0x7490",
    "make": "AU Optronics",
    "model": "0x7490",
    "serial": "",
    "width": 1920,
    "height": 1080,
    "refreshRate": 60.04900,
    "x": 2560,
    "y": 0,
    "activeWorkspace": {
        "id": 1,
        "name": "1"
    },
    "specialWorkspace": {
        "id": 0,
        "name": ""
    },
    "reserved": [0, 0, 0, 0],
    "scale": 1.00,
    "transform": 0,
    "focused": false,
    "dpmsStatus": true,
    "vrr": false,
    "solitary": "0",
    "activelyTearing": false,
    "directScanoutTo": "0",
    "disabled": false,
    "currentFormat": "XRGB8888",
    "mirrorOf": "none",
    "availableModes": ["[email protected]","[email protected]"]
},{
    "id": 1,
    "name": "HDMI-A-1",
    "description": "Philips Consumer Electronics Company PHL 327E8F 0x00003343",
    "make": "Philips Consumer Electronics Company",
    "model": "PHL 327E8F",
    "serial": "0x00003343",
    "width": 2560,
    "height": 1440,
    "refreshRate": 59.95100,
    "x": 0,
    "y": 0,
    "activeWorkspace": {
        "id": 2,
        "name": "2"
    },
    "specialWorkspace": {
        "id": -99,
        "name": "special:special"
    },
    "reserved": [0, 40, 0, 0],
    "scale": 1.00,
    "transform": 0,
    "focused": true,
    "dpmsStatus": true,
    "vrr": false,
    "solitary": "0",
    "activelyTearing": false,
    "directScanoutTo": "0",
    "disabled": false,
    "currentFormat": "XRGB8888",
    "mirrorOf": "none",
    "availableModes": ["[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]","[email protected]"]
}]

description = "" # default, empty means all outputs
description = "eDP-1" # default, empty means all outputs

[HDMI-1]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[HDMI-1]
[side-monitor]

Same as above.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

description = "eDP-1" # default, empty means all outputs

[HDMI-1]
enter_command = [ "xfce4-appfinder" ]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
enter_command = [ "xfce4-appfinder" ]
enter_command = [ "notify-send", "left" ]

Let's have a configuration that will largely work for people who will copy paste it. notify-send is something they likely will have installed. It sends a notification.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean a little variation, it can startup anything, not strict to notify-send some info.

locations = ["right"]

[HDMI-1.output]
description = "HDMI-1"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description = "HDMI-1"
description = "U2515H 9X2VY6A80A8L"

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try avoid this, take a script result or something

Comment on lines +100 to +101
[more]
...
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[more]
...

As said above, let's make sure the configuration works. This will give errors and people will complain about it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments these, just give a hint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants