hhannine / superpaper

A cross-platform multi monitor wallpaper manager.
MIT License
1.15k stars 46 forks source link

Doesn't seem to work on macOS #113

Open douira opened 2 years ago

douira commented 2 years ago

Hi, you stated that you'd be open to people trying this out in macOS. I tried installing it with setup.py and it didn't work. Running it with pyinstaller_wrapper.py yielded a NameError. Could you give hints as to how this project is even supposed to be run on macOS? The documentation doesn't really go into detail beyond dependencies that need to be installed. Thanks

hhannine commented 2 years ago

Thanks for trying to test it. I haven't been able to acquire a Mac just for this purpose so I have not been able to test and package superpaper for macOS.

If you would post the errors you get I could try to help resolve them?

hhannine commented 2 years ago

And yes you were on the right track, you can either install superpaper with pip in the root directory by running pip install --user .

Or alternator run it with python python pyinstaller_wrapper.py

douira commented 2 years ago

python3 setup.py install works but then superpaper is not a command for me.

This is that python3 pyinstaller_wrapper.py:

% python3 pyinstaller_wrapper.py
/Users/douira/Documents/dev/superpaper
/Users/douira/Documents/dev/superpaper
/Users/douira/Documents/dev/superpaper/profiles
Traceback (most recent call last):
  File "/Users/douira/Documents/dev/superpaper/pyinstaller_wrapper.py", line 6, in <module>
    from superpaper.__main__ import main
  File "/Users/douira/Documents/dev/superpaper/superpaper/__main__.py", line 13, in <module>
    from superpaper.cli import cli_logic
  File "/Users/douira/Documents/dev/superpaper/superpaper/cli.py", line 9, in <module>
    from superpaper.data import CLIProfileData
  File "/Users/douira/Documents/dev/superpaper/superpaper/data.py", line 16, in <module>
    import superpaper.wallpaper_processing as wpproc
  File "/Users/douira/Documents/dev/superpaper/superpaper/wallpaper_processing.py", line 1368, in <module>
    def find_window_handles(parent: int = None, window_class: str = None, title: str = None) -> List[int]:
NameError: name 'List' is not defined

This is the result of doing it manually with pip3 install --user .:

douira@hackintosh superpaper % pip3 install --user .
Processing /Users/douira/Documents/dev/superpaper
  Preparing metadata (setup.py) ... done
Requirement already satisfied: Pillow>=7.0.0 in /usr/local/lib/python3.9/site-packages (from superpaper==2.1.0) (9.0.1)
Requirement already satisfied: screeninfo>=0.6.1 in /usr/local/lib/python3.9/site-packages (from superpaper==2.1.0) (0.8)
Requirement already satisfied: numpy>=1.18.0 in /usr/local/lib/python3.9/site-packages (from superpaper==2.1.0) (1.22.2)
Requirement already satisfied: system_hotkey>=1.0.3 in /usr/local/lib/python3.9/site-packages/system_hotkey-1.0.3-py3.9.egg (from superpaper==2.1.0) (1.0.3)
Requirement already satisfied: xcffib>=0.8.0 in /usr/local/lib/python3.9/site-packages/xcffib-0.11.1-py3.9.egg (from superpaper==2.1.0) (0.11.1)
Requirement already satisfied: xpybutil>=0.0.5 in /usr/local/lib/python3.9/site-packages/xpybutil-0.0.6-py3.9.egg (from superpaper==2.1.0) (0.0.6)
Requirement already satisfied: Cython in /usr/local/lib/python3.9/site-packages (from screeninfo>=0.6.1->superpaper==2.1.0) (0.29.28)
Requirement already satisfied: pyobjc-framework-Cocoa in /usr/local/lib/python3.9/site-packages (from screeninfo>=0.6.1->superpaper==2.1.0) (8.2)
Requirement already satisfied: six in /usr/local/lib/python3.9/site-packages (from xcffib>=0.8.0->superpaper==2.1.0) (1.15.0)
Requirement already satisfied: cffi>=1.1.0 in /usr/local/lib/python3.9/site-packages/cffi-1.15.0-py3.9-macosx-12-x86_64.egg (from xcffib>=0.8.0->superpaper==2.1.0) (1.15.0)
Requirement already satisfied: pycparser in /usr/local/lib/python3.9/site-packages/pycparser-2.21-py3.9.egg (from cffi>=1.1.0->xcffib>=0.8.0->superpaper==2.1.0) (2.21)
Requirement already satisfied: pyobjc-core>=8.2 in /usr/local/lib/python3.9/site-packages (from pyobjc-framework-Cocoa->screeninfo>=0.6.1->superpaper==2.1.0) (8.2)
Building wheels for collected packages: superpaper
  Building wheel for superpaper (setup.py) ... done
  Created wheel for superpaper: filename=superpaper-2.1.0-py3-none-any.whl size=285686 sha256=524a01b80d37eee51626203a4085992bb72f351597489a8ecf86a5f8f743c1d3
  Stored in directory: /private/var/folders/_z/wk3w6t650fndyql62__pvrvc0000gq/T/pip-ephem-wheel-cache-88656u2t/wheels/3e/94/13/ba09138ed5c5a4c3d508498a37f5ef49f578d8e9caaaeb9635
Successfully built superpaper
Installing collected packages: superpaper
  WARNING: The script superpaper is installed in '/Users/douira/Library/Python/3.9/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed superpaper-2.1.0
WARNING: You are using pip version 21.3.1; however, version 22.0.3 is available.
You should consider upgrading via the '/usr/local/opt/python@3.9/bin/python3.9 -m pip install --upgrade pip' command.

However, it still reports that superpaper is not a command. zsh: command not found: superpaper

hhannine commented 2 years ago

Thanks. Looks like the script is running with the wrapper and a recent windows code change is causing the error.

It's not immediately clear what the problem is with the install.

hhannine commented 2 years ago

It looks like it is installed but the installation location is not in your path variable The script superpaper is installed in '/Users/douira/Library/Python/3.9/bin' which is not on PATH. That is why it is not recognized as a command but the binary executable should be in the directory stated above.

douira commented 2 years ago

I've added it to my PATH. How it finds the command but spits out the following error:

% superpaper
/Users/douira/Library/Python/3.9/lib/python/site-packages
/Users/douira/Library/Python/3.9/lib/python/site-packages
/Users/douira/Library/Python/3.9/lib/python/site-packages/profiles
Traceback (most recent call last):
  File "/Users/douira/Library/Python/3.9/bin/superpaper", line 5, in <module>
    from superpaper.__main__ import main
  File "/Users/douira/Library/Python/3.9/lib/python/site-packages/superpaper/__main__.py", line 13, in <module>
    from superpaper.cli import cli_logic
  File "/Users/douira/Library/Python/3.9/lib/python/site-packages/superpaper/cli.py", line 9, in <module>
    from superpaper.data import CLIProfileData
  File "/Users/douira/Library/Python/3.9/lib/python/site-packages/superpaper/data.py", line 16, in <module>
    import superpaper.wallpaper_processing as wpproc
  File "/Users/douira/Library/Python/3.9/lib/python/site-packages/superpaper/wallpaper_processing.py", line 1368, in <module>
    def find_window_handles(parent: int = None, window_class: str = None, title: str = None) -> List[int]:
NameError: name 'List' is not defined
hhannine commented 2 years ago

Thanks. I have now resolved the NameError and the changes are in the master branch now.

douira commented 2 years ago

Ok thanks! I did a git pull and ran python3 pyinstaller_wrapper.py which yielded the following output after opening a dialog "Detection of the diagonal size of a display has failed. It will show up as a 23 inch display [etc]" which I answered with "OK":

% python3 pyinstaller_wrapper.py
/Users/douira/Documents/dev/superpaper
/Users/douira/Documents/dev/superpaper
/Users/douira/Documents/dev/superpaper/profiles
Traceback (most recent call last):
  File "/Users/douira/Documents/dev/superpaper/superpaper/tray.py", line 477, in OnInit
    TaskBarIcon(frame)
  File "/Users/douira/Documents/dev/superpaper/superpaper/tray.py", line 109, in __init__
    self.hk = SystemHotkey(check_queue_interval=0.05)
  File "/usr/local/lib/python3.9/site-packages/system_hotkey-1.0.3-py3.9.egg/system_hotkey/system_hotkey.py", line 614, in __init__
    self.conn = xcffib.connect()
  File "/usr/local/lib/python3.9/site-packages/xcffib-0.11.1-py3.9.egg/xcffib/__init__.py", line 527, in __init__
    self.invalid()
  File "/usr/local/lib/python3.9/site-packages/xcffib-0.11.1-py3.9.egg/xcffib/__init__.py", line 559, in invalid
    raise ConnectionException(err)
xcffib.ConnectionException: Connection closed, error during parsing display string.
OnInit returned false, exiting...
hhannine commented 2 years ago

Ah unfortunately it is trying to run the hotkey code but the library has no support for MacOS. Did it create a general_settings file already in the /dev/superpaper folder? If it did, open it and modify it to have use hotkeys=false Then try run it again.

hhannine commented 2 years ago

How did it go, did it work?

douira commented 2 years ago

I changed the setting and it does launch now. Here's a list of issues I've experienced so far:

Screenshot of what the wallpaper looks like on the desktop:

applied desktop wallpaper

The too narrow dialog:

too narrow dialog

In general, this application seems very promising and comprehensive! I'm excited to get it to properly work on macOS. I can help test it on my system. (though not really debug it as I'm not well versed in Python)

hhannine commented 2 years ago

Thanks a lot! These are going to take some work so while I am going through these, would you mind writing some instructions for other Mac users how you installed all the dependencies and got it running?

hhannine commented 2 years ago

Another thing I might need help with is figuring out how to address the multiple displays via scripting / terminal commands to set the finished wallpaper programmatically. After quick searching I could not find an answer that distinguishes between single and multiple displays in a way that would allow targeting a correct piece of the image to the correct display. Any clues or testing towards a solution for this would be greatly appreciated.

hhannine commented 2 years ago

I found this:

MacOS 10.9 (or later): Do you use multiple displays and multiple desktops? Do you also want to span panoramic images over multiple displays?
Then disable System Preferences → Mission Control → Displays have separate Spaces. This ensures that a desktop switch, affects all displays rather than just the active one, thereby keeping the panorama desktop in one piece.  

Could you try to change that to see if superpaper can then affect the wallpaper of all your displays?

douira commented 2 years ago

Just checked, I had that setting enabled already.

hhannine commented 2 years ago

The guidance is to disable that setting? Did you have it enabled or disabled?

douira commented 2 years ago

Oh you’re right, I misread that. I’ll try it the other way around later.

hhannine commented 2 years ago

I've pushed an update (e7cd550) which hopefully fixes the bezel config boxes disappearing when you were trying to input sizes. Let me know if it worked if you get an opportunity to test it.

hhannine commented 2 years ago

This AppleScript could enable the 'display spaces' setting to be controlled automatically.

hhannine commented 2 years ago
  • The wallpaper source selection dialog starts off too narrow such that not all of the buttons are visible
  • At some points, it freezes and clicking anywhere doesn't work and and error sound is played. This seems to be related to resizing the folder dialog. The error 213:216: execution error: Can’t get end. (-1728) is printed.

I pushed a fix that hopefully addresses these. If you find that the freezing is not fixed, can you post more output that you get? Possibly while running in the debugging mode in the terminal?

douira commented 2 years ago

I tested it with the separate spaces setting disabled and it didn't change anything in the behavior. (I logged out first to apply the setting properly)

The following error is produced when I click align test

Traceback (most recent call last):
  File "/Users/douira/Documents/dev/superpaper/superpaper/gui.py", line 1244, in onAlignTest
    profile = CLIProfileData(testimage,
TypeError: __init__() takes from 2 to 6 positional arguments but 7 were given
douira commented 2 years ago

The bevel configuration works well now with the latest commit. The file selection dialog is also the right width.

As an addendum to the last comment: With the setting enabled and disabled the same thing happens, the image set to the main screen changes to something weird like this (see screenshot) but the other two screens don't change.

Screenshot 2022-02-23 at 12 30 21

Searching for a multi-screen wallpaper app I also found Fresco before finding this one. Your app has much more features but Fresco does manage to set the wallpaper on all screens. (With the enabled and disabled) Maybe that's something to look into? The website states that the setting (displays have separate spaces) should be disabled, but Fresco also worked with it enabled for me.

I've added an item to the list that would be nice to have:

hhannine commented 2 years ago

Thanks for testing. I've pushed a fix for the align test issue.

I have been looking for a solution how to control the wallpapers of all the displays but no solid answer thus far unfortunately.

  • Is there an option to align all screens to touch at their bevels (but not overlap)?

I've wished for this myself as well at some points, but I've not had the skills or motivation to make it well enough. If the gap is made small enough in the preview, the effect on the wallpaper on the actual displays will be minuscule and in practice overshadowed by the measurement errors.

Actually, this can be done manually with the "Exact positions" tool. It allows for changing the input to pixels which enables you to tune the display positions in pixel-by-pixel precision.

douira commented 2 years ago

Maybe that could be implemented with some kind of snapping? When a screen is dragged close to another one it could snap to exactly touch the other one. (There should of course also be an option to disable this, either with a setting or by holding a key)

As for the other issue with controlling all the screen’s wallpapers, maybe a workaround would be to export an image for each screen that the user can then manually set as the background for each screen? I don’t know anything about how desktop images work internally, so I can’t really help from a technical perspective.

hhannine commented 2 years ago

Yes I thought about some type of snapping implementation but it seemed too daunting to get working well and not worth the time investment, at the time at least. Maybe it will be implemented at some point.

I've seen script snippets like these: https://stackoverflow.com/a/66089467 where the image is set individually piece by piece for each display. This is not a problem in of itself since other platforms use similar behavior, and as you saw Superpaper already is working with stitched together image pieces. The problem seems to be how to figure out what are each of the displays called and how to get positionally sorted list of the displays as recognized by the operating system in order to connect the correct image piece with the correct display.

hhannine commented 2 years ago

Finally found some clues that might be helpful: https://github.com/scriptingosx/desktoppr - wallpaper tool for OSX that supports multiple monitors written in Swift https://pypi.org/project/macos-display/ - Python tool and example for interfacing with OSX for NSScreen

hhannine commented 2 years ago

I completely rewrote the OSX wallpaper code (e0cbb412ba5fa188d05921719b3b72c723a64971), can you test if it works?

Edit: Note the two new OSX dependencies: AppKit PyObjC, both of which should be installable with pip.

douira commented 2 years ago

After installing the two new dependencies the following error occurs on starting the program:

Traceback (most recent call last):
  File "/Users/douira/Documents/dev/superpaper/pyinstaller_wrapper.py", line 6, in <module>
    from superpaper.__main__ import main
  File "/Users/douira/Documents/dev/superpaper/superpaper/__main__.py", line 13, in <module>
    from superpaper.cli import cli_logic
  File "/Users/douira/Documents/dev/superpaper/superpaper/cli.py", line 9, in <module>
    from superpaper.data import CLIProfileData
  File "/Users/douira/Documents/dev/superpaper/superpaper/data.py", line 17, in <module>
    import superpaper.wallpaper_processing as wpproc
  File "/Users/douira/Documents/dev/superpaper/superpaper/wallpaper_processing.py", line 51, in <module>
    from AppKit import NSScreen, NSWorkspace
ImportError: cannot import name 'NSScreen' from 'AppKit' (/usr/local/lib/python3.9/site-packages/AppKit/__init__.py)

I had also tried to start the program before installing the dependencies (before I saw your edit) and a different error was produced:

Traceback (most recent call last):
  File "/usr/local/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python@3.9/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 910, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/douira/Documents/dev/superpaper/superpaper/wallpaper_processing.py", line 1304, in span_single_image_advanced
    set_wallpaper(outputfile, force)
  File "/Users/douira/Documents/dev/superpaper/superpaper/wallpaper_processing.py", line 1392, in set_wallpaper
    set_wallpaper_macos(outputfile, image_piece_list=None, force=force)
  File "/Users/douira/Documents/dev/superpaper/superpaper/wallpaper_processing.py", line 1427, in set_wallpaper_macos
    screens_and_coords.sort(key=lambda x: x[1])
AttributeError: 'zip' object has no attribute 'sort'
hhannine commented 2 years ago

Thanks a lot. I pushed a fix for the latter error. And it seems that I mistakenly included the 'AppKit' as a separate dependecy, as it seems to be a separate package after all. So remove the 'AppKit' module that you just installed.

hhannine commented 2 years ago

Whoops sorry forgot to actually push.. Now the commit is online.

douira commented 2 years ago

I've tested it. After removing it, the error is now the following (it seems it can't find AppKit)

Traceback (most recent call last):
  File "/Users/douira/Documents/dev/superpaper/pyinstaller_wrapper.py", line 6, in <module>
    from superpaper.__main__ import main
  File "/Users/douira/Documents/dev/superpaper/superpaper/__main__.py", line 13, in <module>
    from superpaper.cli import cli_logic
  File "/Users/douira/Documents/dev/superpaper/superpaper/cli.py", line 9, in <module>
    from superpaper.data import CLIProfileData
  File "/Users/douira/Documents/dev/superpaper/superpaper/data.py", line 17, in <module>
    import superpaper.wallpaper_processing as wpproc
  File "/Users/douira/Documents/dev/superpaper/superpaper/wallpaper_processing.py", line 51, in <module>
    from AppKit import NSScreen, NSWorkspace
ModuleNotFoundError: No module named 'AppKit'
hhannine commented 2 years ago

It seems that pyobjc needs a cleanup after the incorrect package is removed: I found this to do that: pip install --upgrade --force-reinstall PyObjC PyObjC-core

douira commented 2 years ago

Oh thanks that works! It actually starts now and is capable of setting the wallpaper image on all three screens, even with the "displays are separate spaces" setting enabled. However, the center screen's wallpaper is glitched (but less so than before):

the layout:

Screenshot 2022-02-25 at 13 39 50

the applied center wallpaper: Screenshot 2022-02-25 at 13 40 08

The other two match what the layout says they should.

hhannine commented 2 years ago

Great! Thanks!

Does the center wallpaper get cut off the same way regardless of the image used or every time? If it does, can you run superpaper in the terminal with debugging and post the logging you get?

douira commented 2 years ago

Ok so I've tested it again and now this glitch doesn't happen. I can't reproduce it right now.

I've found out how to reproduce the issue where it freezes and makes an error sound: When I click "cancel" in the browse file dialog it closes but then the main window hangs and only beeps when I click it.

hhannine commented 2 years ago

Great!

I can't simply reproduce it on Windows, can you tell me your specific steps to reproduce it?

douira commented 2 years ago
hhannine commented 2 years ago

Thansks. Weird, those steps are not producing any issues on Windows. Can you post the debugging log whilst running in the terminal?

douira commented 2 years ago

This is the debug console output:

% python3 pyinstaller_wrapper.py --debug
/Users/douira/Documents/dev/superpaper
/Users/douira/Documents/dev/superpaper
/Users/douira/Documents/dev/superpaper/profiles
Input images: None
Input profile: None
Input perspective: None
Input spangroups: None
Input offsets: None
User defined command: None
Debugging: True
use_hotkeys: False
hk_binding_next: ('control', 'super', 'w')
hk_binding_pause: ('control', 'super', 'shift', 'p')
get_display_data output: NUM_DISPLAYS = 3, RES_ARR = [(1080, 1920), (3360, 1890), (1440, 2560)], OFF_ARR = [(0, 0), (1080, 0), (4440, 0)]
Display(resolution=(1080, 1920), digital_offset=(0, 0), phys_size_mm=(286, 509), detected_phys_size_mm=(286, 509), ppi=95.9160839160839, ppi_norm_resolution=None, ppi_norm_offset=None, ppi_norm_bezels=(0, 0), perspective_angles=(0, 0), name=None)
Display(resolution=(3360, 1890), digital_offset=(1080, 0), phys_size_mm=(509, 286), detected_phys_size_mm=(509, 286), ppi=167.66994106090374, ppi_norm_resolution=None, ppi_norm_offset=None, ppi_norm_bezels=(0, 0), perspective_angles=(0, 0), name=None)
Display(resolution=(1440, 2560), digital_offset=(4440, 0), phys_size_mm=(286, 509), detected_phys_size_mm=(286, 509), ppi=127.88811188811188, ppi_norm_resolution=None, ppi_norm_offset=None, ppi_norm_bezels=(0, 0), perspective_angles=(0, 0), name=None)
config.sections: ['-457503068716442097']
DisplaySystem loaded: P.N.Offs: [(0.0, 681.1706712336338), (1362.3413424672676, 1039.6815508302832), (4768.194698635437, 0.0)], bezel_mmṣ: [(15.0, 0.0), (10.0, 9.38), (0.0, 20.0)], user_diagonal_inches: [21.5, 31.5, 27.0], use_perspective: True, def_perspective: perspective
update_bezels: (99.01768172888016, 0.0)
update_bezels: (66.01178781925344, 61.919056974459735)
update_bezels: (0.0, 132.02357563850688)
Updating diagonal_inches
Updated PPI = 102.46079860847898 and phys_size_mm = (267.73166296334045, 475.96740082371633) based on diagonal size: 21.5 inches
Display(resolution=(1080, 1920), digital_offset=(0, 0), phys_size_mm=(267.73166296334045, 475.96740082371633), detected_phys_size_mm=(286, 509), ppi=102.46079860847898, ppi_norm_resolution=(1888, 3356), ppi_norm_offset=(0.0, 681.1706712336338), ppi_norm_bezels=(99.01768172888016, 0.0), perspective_angles=(0, 0), name=None)
Updated PPI = 122.38373167123879 and phys_size_mm = (697.3475872533519, 392.2580178300104) based on diagonal size: 31.5 inches
Display(resolution=(3360, 1890), digital_offset=(1080, 0), phys_size_mm=(697.3475872533519, 392.2580178300104), detected_phys_size_mm=(509, 286), ppi=122.38373167123879, ppi_norm_resolution=(3360, 1890), ppi_norm_offset=(1362.3413424672676, 1039.6815508302832), ppi_norm_bezels=(66.01178781925344, 61.919056974459735), perspective_angles=(0, 0), name=None)
Updated PPI = 108.78553926332337 and phys_size_mm = (336.2211581400089, 597.7265033600157) based on diagonal size: 27.0 inches
Display(resolution=(1440, 2560), digital_offset=(4440, 0), phys_size_mm=(336.2211581400089, 597.7265033600157), detected_phys_size_mm=(286, 509), ppi=108.78553926332337, ppi_norm_resolution=(1888, 3356), ppi_norm_offset=(4768.194698635437, 0.0), ppi_norm_bezels=(0.0, 132.02357563850688), perspective_angles=(0, 0), name=None)
There was an error parsing the profile: default_profile /Users/douira/Documents/dev/superpaper/profiles/.DS_Store
'utf-8' codec can't decode byte 0x80 in position 3131: invalid start byte
There was an error when loading profile '.DS_Store'.
Would you like to delete it? Choosing 'No' will just ignore the profile.
There was an error parsing the profile:
removing: /Users/douira/Documents/dev/superpaper/profiles/.DS_Store
get_display_data output: NUM_DISPLAYS = 3, RES_ARR = [(1080, 1920), (3360, 1890), (1440, 2560)], OFF_ARR = [(0, 0), (1080, 0), (4440, 0)]
Display(resolution=(1080, 1920), digital_offset=(0, 0), phys_size_mm=(286, 509), detected_phys_size_mm=(286, 509), ppi=95.9160839160839, ppi_norm_resolution=None, ppi_norm_offset=None, ppi_norm_bezels=(0, 0), perspective_angles=(0, 0), name=None)
Display(resolution=(3360, 1890), digital_offset=(1080, 0), phys_size_mm=(509, 286), detected_phys_size_mm=(509, 286), ppi=167.66994106090374, ppi_norm_resolution=None, ppi_norm_offset=None, ppi_norm_bezels=(0, 0), perspective_angles=(0, 0), name=None)
Display(resolution=(1440, 2560), digital_offset=(4440, 0), phys_size_mm=(286, 509), detected_phys_size_mm=(286, 509), ppi=127.88811188811188, ppi_norm_resolution=None, ppi_norm_offset=None, ppi_norm_bezels=(0, 0), perspective_angles=(0, 0), name=None)
config.sections: ['-457503068716442097']
DisplaySystem loaded: P.N.Offs: [(0.0, 681.1706712336338), (1362.3413424672676, 1039.6815508302832), (4768.194698635437, 0.0)], bezel_mmṣ: [(15.0, 0.0), (10.0, 9.38), (0.0, 20.0)], user_diagonal_inches: [21.5, 31.5, 27.0], use_perspective: True, def_perspective: perspective
update_bezels: (99.01768172888016, 0.0)
update_bezels: (66.01178781925344, 61.919056974459735)
update_bezels: (0.0, 132.02357563850688)
Updating diagonal_inches
Updated PPI = 102.46079860847898 and phys_size_mm = (267.73166296334045, 475.96740082371633) based on diagonal size: 21.5 inches
Display(resolution=(1080, 1920), digital_offset=(0, 0), phys_size_mm=(267.73166296334045, 475.96740082371633), detected_phys_size_mm=(286, 509), ppi=102.46079860847898, ppi_norm_resolution=(1888, 3356), ppi_norm_offset=(0.0, 681.1706712336338), ppi_norm_bezels=(99.01768172888016, 0.0), perspective_angles=(0, 0), name=None)
Updated PPI = 122.38373167123879 and phys_size_mm = (697.3475872533519, 392.2580178300104) based on diagonal size: 31.5 inches
Display(resolution=(3360, 1890), digital_offset=(1080, 0), phys_size_mm=(697.3475872533519, 392.2580178300104), detected_phys_size_mm=(509, 286), ppi=122.38373167123879, ppi_norm_resolution=(3360, 1890), ppi_norm_offset=(1362.3413424672676, 1039.6815508302832), ppi_norm_bezels=(66.01178781925344, 61.919056974459735), perspective_angles=(0, 0), name=None)
Updated PPI = 108.78553926332337 and phys_size_mm = (336.2211581400089, 597.7265033600157) based on diagonal size: 27.0 inches
Display(resolution=(1440, 2560), digital_offset=(4440, 0), phys_size_mm=(336.2211581400089, 597.7265033600157), detected_phys_size_mm=(286, 509), ppi=108.78553926332337, ppi_norm_resolution=(1888, 3356), ppi_norm_offset=(4768.194698635437, 0.0), ppi_norm_bezels=(0.0, 132.02357563850688), perspective_angles=(0, 0), name=None)
running profile job with profile: landscape
['/Users/douira/Documents/wallpapers/vector and abstract/painted landscape.png']
use_hotkeys: False
hk_binding_next: ('control', 'super', 'w')
hk_binding_pause: ('control', 'super', 'shift', 'p')
get_display_data output: NUM_DISPLAYS = 3, RES_ARR = [(1080, 1920), (3360, 1890), (1440, 2560)], OFF_ARR = [(0, 0), (1080, 0), (4440, 0)]
Display(resolution=(1080, 1920), digital_offset=(0, 0), phys_size_mm=(286, 509), detected_phys_size_mm=(286, 509), ppi=95.9160839160839, ppi_norm_resolution=None, ppi_norm_offset=None, ppi_norm_bezels=(0, 0), perspective_angles=(0, 0), name=None)
Display(resolution=(3360, 1890), digital_offset=(1080, 0), phys_size_mm=(509, 286), detected_phys_size_mm=(509, 286), ppi=167.66994106090374, ppi_norm_resolution=None, ppi_norm_offset=None, ppi_norm_bezels=(0, 0), perspective_angles=(0, 0), name=None)
Display(resolution=(1440, 2560), digital_offset=(4440, 0), phys_size_mm=(286, 509), detected_phys_size_mm=(286, 509), ppi=127.88811188811188, ppi_norm_resolution=None, ppi_norm_offset=None, ppi_norm_bezels=(0, 0), perspective_angles=(0, 0), name=None)
config.sections: ['-457503068716442097']
DisplaySystem loaded: P.N.Offs: [(0.0, 681.1706712336338), (1362.3413424672676, 1039.6815508302832), (4768.194698635437, 0.0)], bezel_mmṣ: [(15.0, 0.0), (10.0, 9.38), (0.0, 20.0)], user_diagonal_inches: [21.5, 31.5, 27.0], use_perspective: True, def_perspective: perspective
update_bezels: (99.01768172888016, 0.0)
update_bezels: (66.01178781925344, 61.919056974459735)
update_bezels: (0.0, 132.02357563850688)
Updating diagonal_inches
Updated PPI = 102.46079860847898 and phys_size_mm = (267.73166296334045, 475.96740082371633) based on diagonal size: 21.5 inches
Display(resolution=(1080, 1920), digital_offset=(0, 0), phys_size_mm=(267.73166296334045, 475.96740082371633), detected_phys_size_mm=(286, 509), ppi=102.46079860847898, ppi_norm_resolution=(1888, 3356), ppi_norm_offset=(0.0, 681.1706712336338), ppi_norm_bezels=(99.01768172888016, 0.0), perspective_angles=(0, 0), name=None)
Updated PPI = 122.38373167123879 and phys_size_mm = (697.3475872533519, 392.2580178300104) based on diagonal size: 31.5 inches
Display(resolution=(3360, 1890), digital_offset=(1080, 0), phys_size_mm=(697.3475872533519, 392.2580178300104), detected_phys_size_mm=(509, 286), ppi=122.38373167123879, ppi_norm_resolution=(3360, 1890), ppi_norm_offset=(1362.3413424672676, 1039.6815508302832), ppi_norm_bezels=(66.01178781925344, 61.919056974459735), perspective_angles=(0, 0), name=None)
Updated PPI = 108.78553926332337 and phys_size_mm = (336.2211581400089, 597.7265033600157) based on diagonal size: 27.0 inches
Display(resolution=(1440, 2560), digital_offset=(4440, 0), phys_size_mm=(336.2211581400089, 597.7265033600157), detected_phys_size_mm=(286, 509), ppi=108.78553926332337, ppi_norm_resolution=(1888, 3356), ppi_norm_offset=(4768.194698635437, 0.0), ppi_norm_bezels=(0.0, 132.02357563850688), perspective_angles=(0, 0), name=None)
use_hotkeys: False
hk_binding_next: ('control', 'super', 'w')
hk_binding_pause: ('control', 'super', 'shift', 'p')
get_ppi_norm_offsets: [(0.0, 681.1706712336338), (1362.3413424672676, 1039.6815508302832), (4768.194698635437, 0.0)]
get_ppi_norm_crops: [(0, 681, 1290, 2974), (1362, 1040, 4722, 2930), (4768, 0, 6388, 2880)]
G_A_DSYS.use_perspective: True, prof.perspective: disabled
Canvas size: [5880, 2560]
Removing images matching with: 'landscape-a-crop'
use_hotkeys: False
hk_binding_next: ('control', 'super', 'w')
hk_binding_pause: ('control', 'super', 'shift', 'p')
bezels_to_bitmap: bez_rects: ((11, 253), (0, 0))
bezels_to_bitmap: bez_rects: ((7, 215), (370, 7))
bezels_to_bitmap: bez_rects: ((0, 0), (179, 15))
bezels_to_bitmap: bez_rects: ((11, 253), (0, 0))
bezels_to_bitmap: bez_rects: ((7, 215), (370, 7))
bezels_to_bitmap: bez_rects: ((0, 0), (179, 15))
^C

It doesn't print anything between clicking "browse" and when I had to force quit it so it may not be very useful.

I've noticed some other issues: (added to the list)

douira commented 1 year ago

Hi I'm back. I just pulled the most recent changes and am running into the following error when running pip3 install --user .:

Processing /Users/douira/Documents/dev/superpaper
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      wxPython import failed; refer to the install instructions.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I've also tried to run pip3 install --upgrade Pillow screeninfo numpy wxpython PyObjC beforehand but that fails because wx is missing. It installs the other packages successfully though. However, running python3 ./pyinstaller_wrapper.py fails because of missing wx.

hhannine commented 1 year ago

Hi! I wonder if your python has updated and is causing an issue when trying to install wxpython with pip? Do you get an error when trying to install wxpython? Can you try a previous version of python to see if that helps?

hhannine commented 1 year ago

Do you have 'attrdict3' installed? Here's some related discussion https://github.com/wxWidgets/Phoenix/issues/2296

douira commented 1 year ago

Do you have 'attrdict3' installed? Here's some related discussion wxWidgets/Phoenix#2296

Ok after installing that transitive dependency myself it compiled wxpython for really long but now it's working again. Thanks!

hhannine commented 1 year ago

Can you check if in the current git version the bezel config popups work for you? I had to make a change to make them work on my Linux system, and now they do work both on Linux and Windows. I'm hoping that Mac would as well, because it'll need a more complex fix if it doesn't..

douira commented 1 year ago

It works (I'm assuming this is what you mean) but the input field for the number is too small.

Screenshot 2022-12-13 at 21 20 40
hhannine commented 1 year ago

Thanks! I pushed a change to possibly fix it, how does it look now?

douira commented 1 year ago

yes that's much better now. Cool!

On 13. Dec 2022, at 21:27, Henri Hänninen @.***> wrote:

Thanks! I pushed a change to possibly fix it, how does it look now?

— Reply to this email directly, view it on GitHub https://github.com/hhannine/superpaper/issues/113#issuecomment-1349642059, or unsubscribe https://github.com/notifications/unsubscribe-auth/AECTWFVUMLFFMR7HGXPPGR3WNDL35ANCNFSM5O2WT5FA. You are receiving this because you authored the thread.