Comments (7)
Can you describe what happens on i3
when starting v1.8.0?
- What are the symptomes: do you have a crash? Just a blank content window?
- What is printed to the console?
- Can you run
pympress --log=debug
and report what is displayed in~/.cache/pympress.log
?
I think setting windows fullscreen does not really mean anything on i3
, from what I remember from #59. I think a good way to handle this would be to disable the start_fullscreen
functionality if we detect we’re on i3
.
from pympress.
As to 1.5.1, I think if you have specific needs like i3
support, you’ll need to update pympress with e.g. pip
as I don’t have much control over which versions are shipped in each OS version.
from pympress.
As to 1.5.1, I think if you have specific needs like
i3
support, you’ll need to update pympress with e.g.pip
as I don’t have much control over which versions are shipped in each OS version.
The problem with the pip
approach is that you need to install Python 3.9 to be able to run the latest pympress
version. Because, using Python 3.8 (my default version for Ubuntu 20.04), you get the following error:
Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/opt/pympress/pympress/__main__.py", line 63, in <module>
gettext.install('pympress', util.get_locale_dir())
File "/opt/pympress/pympress/util.py", line 116, in get_locale_dir
return __get_resource_path('share', 'locale')
File "/opt/pympress/pympress/util.py", line 106, in __get_resource_path
root = importlib_resources.files('pympress')
AttributeError: module 'importlib.resources' has no attribute 'files'
Hence, a simpler solution is just to create the ~/.config/pympress
, as described in my first post.
That's why I think it could be useful to document this solution in case future users encounter the same problem.
Can you describe what happens on
i3
when starting v1.8.0?
For 1.8.0, I don't have any bug.
However, the first time I ran pympress
, without argument, the Content and Presenter windows have been placed in the same monitor and the Content window have been set to full-screen.
Hence, I end up with a black screen. Once I understood what was going on, typing F11 and disabling the startup full-screen options fixed this behavior.
I think setting windows fullscreen does not really mean anything on
i3
, from what I remember from #59. I think a good way to handle this would be to disable thestart_fullscreen
functionality if we detect we’re oni3
.
I also think that it is a better behavior.
The simplest way could be to check if one of the running process is named i3
, but maybe that on some systems, i3
is run as a service with another name.
On Ubuntu, there is external command such as wmctrl -m
which gives the X window manager name. It relies on the EWMH spec, however I didn't find ways to retrieve this information using PyGi
for instance.
So, I don't know what could be a reliable way to detect that i3
is running. Do you have any ideas?
from pympress.
The problem with the
pip
approach is that you need to install Python 3.9 to be able to run the latestpympress
version. Because, using Python 3.8 (my default version for Ubuntu 20.04), you get the following error:
We should support python 3.8. I’ll look into that.
from pympress.
Current master should run fine on python 3.8, which solves that part of the issue. I’ll release 1.8.1 soon and you can just upgrade with pip.
To detect i3
, if it is freedesktop-compliant it should set XDG_CURRENT_DESKTOP
. Can you check the value it has? I’m guessing i3
?
from pympress.
Current master should run fine on python 3.8, which solves that part of the issue. I’ll release 1.8.1 soon and you can just upgrade with pip.
Thanks, I will try that.
To detect
i3
, if it is freedesktop-compliant it should setXDG_CURRENT_DESKTOP
. Can you check the value it has? I’m guessingi3
?
For me, echo $XDG_CURRENT_DESKTOP
returns XFCE
.
I use Xfce
4.14 as my desktop environment and i3
as my window manager, instead of the default xfwm4
.
From what I understand, XDG_CURRENT_DESKTOP
returns the desktop environment, hence it cannot be used to check if i3
is used.
However, by checking the other environment variable defined in my shell, I see that this one exists: I3SOCK=/run/user/1000/i3/ipc-socket.2178
. According to the documentation:
You can override the default path through the environment-variable I3SOCK or by specifying the ipc-socket directive. This is discouraged, though, since i3 does the right thing by default.
So, I guess that it is automatically defined when using i3
. Thus, maybe that it can be used like that?
import os
...
if os.environ.get("I3SOCK"):
... # Disable the start_fullscreen functionality
from pympress.
To be more precise, my problem is fixed when replacing:
Lines 498 to 499 in a3cf735
with:
if os.environ.get("I3SOCK"):
c_full, p_full = False, False
elif not c_full and not p_full:
return
from pympress.
Related Issues (20)
- Pympress crashes on start on Fedora 38 beta. HOT 1
- get_primary_monitor() returns None HOT 2
- Notes are misaligned HOT 2
- Improve Annotations HOT 9
- Undo Clears Slide HOT 4
- Incorrect rendering of greek and math symbols on windows in plots generated with R HOT 14
- First slide in presenter mode. HOT 3
- [Windows] Not loading the proper language HOT 1
- Setup proper visual testing
- Support proper Hi-DPI on Windows HOT 2
- Annotation support for line breaks
- Allow configuring thresholds for colors on elapsed time for estimated time HOT 2
- Help needed for installation under nobara linux
- No video when note slide located at bottom of page HOT 7
- Slide deck overview missing every 2nd slide HOT 5
- Recomend using pipx instead of pip HOT 3
- Shortcuts page in version 1.7.1 shows wrong keys: Shift and Ctrl are mixed HOT 7
- Play gif via animate package does not start animation loop when displayed via Pympress HOT 9
- Save PDF with the Highlights HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pympress.