this post was submitted on 20 Oct 2023
19 points (100.0% liked)
Linux
48313 readers
913 users here now
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
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I use i3-wm and just set my laptop display and external monitor to their native modes manually with xrandr. Been doing it this way for years without an issue. The only time I've seen the output get chopped like you mention is with mirroring, where you have to use the lowest common mode - but I don't mirror, I set each display independently as a separate output for i3 (but on the same X DISPLAY).
I also don't use a login manager, I login to a VTY and startx, old school but simple and reliable.
I also don't mirror, just switch from laptop to external and vice versa. Strange because lighdtm doesn't break anything for XFCE, quite interesting what is the reason
maybe I'm just one of very few that have external resolution lower than host
Ah, I thought you were displaying on both outputs, not switching between them, hence my mirroring comment. I suspect XFCE, not the DM, detects the output change and takes care of it. You might need to emulate that behavior with a hook of some type that you have to setup yourself with the tiling WM, and you might have to
--off
the unused display. I'd be willing to bet you can find some sort of hook script out there that can do this, I seem to recall an autorandr program I used in the past where you could set up output profiles. I hope that helps, maybe a little bit.I use dummy script to toggle monitors (from archwiki)
Hm, never used arandr but it's similar to XFCE utlity on the first sight.
You setup profile where one display is enabled, another disabled, name him "external" and active in arandr every time connecting to external monitor, correct?
You aren't.
How do you have your displays set up? Your xrandr command didn't seem complete. You say you aren't mirroring; are you then using both the laptop and external monitor at the same time? If so, I'd expect a command more like:
or if it's really not auto-detecting⋮
Can you post your full
xrandr
command? Also,arandr
andgrandr
can be a little easier to fiddle with if you're trying to arrange things.I turn of internal display and enable external by script, I don't use mirroring or extending
Here is xrandr output:
spoiler
So I played around arandr and resolved initial issue...but got another one (as always). I added script to my bspwmrc file:
So if i plug external monitor and reload bspwm (which also reloads polybar), it adds second pane to my polybar (1 2 3 4 5 1 2 3 4 5), but works.
Now smth interesting, when I unplug external monitor and then again reload bspwm, it switches to internal one but now cuts window for every application.
Great! Looks like progress.
I do suggest looking at autorandr (or similar). autorandr stores your X geometry as profiles, and can detect changes and run scripts.
I haven't used bspwm in a long while; I ended up preferring herbstluftwm, but IIRC you have to tell bspwm to configure each screen and delete unused workspaces when you change. It felt more fussy to me, which is why I landed on hlwm.
Anyway, try adding a line to tell bspwm to "remove" the monitors you aren't using. It doesn't detect and remove these itself. Add the lines (after your desktop
DP-1 -d
setting:Swap out
eDP-1
withDP-1
when going in the other direction.The
bspc wm -o
is pretty important; it tells bspwm to re-lay everything out (or, at least, that's what I guess it's doing). In any case, it fixed a lot of issues when I ran it when changing layouts.I found the bspwm community to be largely unhelpful, and containing some caustic people. It very much has a "give a man a fish" mentality. Given how fussy the wm itself is, even after quite an amount of time scripting it, I still felt as if I were casting about most of the time, getting things right only by trial and error, and not being able to reliably predict how my commands would affect the wm.
If you find yourself in this situation, try herbstluftwm. The community is more helpful, and the WM itself seems more intuitive. For instance, while it allows you to define virtual monitors, it does require fewer commands to deal with physical monitor change events. You still get the "all configuration is done with commands", but it seems more... sane and consistent. It's just my opinion, but I appreciate the WM, whereas with bspwm I just felt like I was fighting it all the time.
Sir, you are magician, addition to script did the trick!
Will definitely play with autorandr, because if I understood you correctly, it can automatically reload bspwm listening to certain events.
Right now I'm trying master (or understand, at least) QEMU, can you recommend me some combination with sane defaults (for ex mint + installer for herb) I can play on vm?
Thank you!
Defaults for herbstluftwm? Sure, but what'd be helpful if to translate a bspwm config. Are you using sxhkd?
I can't help with VM stuff; I'm not experienced with them.
Post your bspwm and sxhkd configs.
Yes.
It's easy way to learn things without fear to break something, can herbstluftwm use sxhkd?
Easily but why?