If you open Emacs in daemon+client mode (run emacs --daemon
once, then emacsclient
to open the window), buffers that you open in one client will be available on all other clients, even concurrently. Judging from a quick test (on hyprland), it also seems to open the file in the client located on the focused screen, but does not automatically open a new client if there is one already running on any screen.
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
They broke that at some point.
Feel free to write a bugreport.
I think it was done on purpose.
Anyway... I figured out a workaround in my script. By focusing one of the windows on the current workspace before I open a new tab it seems to make it the preferred window. It's not foolproof, sometimes it still selects one of the other windows, but it's close enough.
Here's the script in case anybody needs it, should work with any editor that has some sort of -tab
and -window
options if you grep for the correct window name:
#!/bin/bash
WORKSPACE=$(
wmctrl -d |\
grep '*' |\
awk '{print $1}'
)
WINID=$(
wmctrl -l |\
grep ' - Mousepad' |\
grep -E "\s${WORKSPACE}\s"|\
tail -1|\
awk '{print $1}'
)
if [ -z "$WINID" ]; then
exec /usr/bin/mousepad -o window "$@"
else
wmctrl -i -a "$WINID" && \
sleep 0.5 && \
exec /usr/bin/mousepad -o tab "$@"
fi
I guess you could give a few a try.
I use Xed and Geany and they seem to work as expected.