Closed linux40 closed 4 years ago
Finally I created an opaque frame via image-mode-hook
. Feel free to close this issue, or you want to achieve creating frame from a desktop file.
Thank you for your report.
Well, it would be good getting .desktop files to work with emacsclient in a way that frame parameters can be set. It can be useful to users of EXWM. On the other hand, it is out of scope for EXWM, in the sense that as long as it works for regular Emacs it should work for EXWM.
If someone gets it to work, we should add it to the Wiki. Till then, I'm closing this issue.
As for your image-mode-hook
customization, do you think that it can be useful for other users that want to achieve your same goal? If so, could you add it to the newly created https://github.com/ch11ng/exwm/wiki/Cookbook wiki page?
One problem is whenever you create a new Emacs frame it becomes a new EXWM workspace. Unless that's what is intended you may instead want to preserve a opaque workspace specifically for such use.
It doesn't matter whether frames will become workspaces. The thing I want is an opaque background. My customization is just:
;; -*- lexical-binding: t -*-
(let (frame)
(add-hook 'image-mode-hook
(lambda () (let ((buffer (current-buffer)))
(unless (and frame (frame-live-p frame))
(setq frame (make-frame '((alpha . (100 . 100))))))
(select-frame frame) (switch-to-buffer buffer)))))
But it does have a problem. If I close the workspace without killing the image buffer, an opaque workspace will not be created again.
And I'm going to make mode line display the resolution of images.
I understand. It think this is quite particular, and not any longer related to EXWM.
I'm closing the ticket, but feel free to reopen if you find issues.
I wish to view images in Emacs, while my default alpha rate of frame is 90% which is not decent for viewing an image.
So I try to create a opaque frame via
emacsclient -c -F "((alpha . (100 . 100)))" some.jpg
and it works in terminal.But when it comes to push it into a desktop file as follows and open a image file (e.g. using
xdg-open
), it freezes Emacs.Everything goes well when
-c
is removed, but I could not get an opaque frame in this situation.My EXWM version is
0.23
and Emacs version is27.0.91
.