简体   繁体   中英

awesome-wm external monitor and laptop

I use awesome wm with an external monitor on my laptop but sometimes I move and take the laptop only.

My question is: what happens with the clients opened in the external monitor when I disconnect it to move the laptop?

Is there a way to make awesome remember the layout of the screens? currently I'm using arandr every time I plug the screen but it is very annoying to do that every time I move the laptop.

In general any tips about how to handle a setup with an external display and a laptop is what I'm looking for.

Thanks!

Check out autorandr

It's been working perfectly for me when plugging/unplugging monitors.

EDIT: Here's an example of how I used autorandr (on Ubuntu)

git clone https://github.com/wertarbyte/autorandr.git
cd autorandr
make deb
dpkg -i autorandr*.deb

Save my current config (no monitors)

autorandr --save mobile

Plug in additional monitor (and configure your settings)

autorandr --save multi

It should now automatically detect and apply the correct configurations when devices are plugged/unplugged. This works via a udev rule:

cat /lib/udev/rules.d/40-monitor-hotplug.rules
ACTION=="change", SUBSYSTEM=="drm", RUN+="/bin/systemctl start --no-block autorandr.service" 

Nothing happens! All your applications stay open as they were when you had your monitor connected. When you reconnect the monitor everythingi will still be the same.

Take note that this means that you can still go with your mous on the disconnected screen. Your mouse will simply disappear ath the edge of your monitor because awesome still thinks that there are two screens.

If you want awesome to realize that there is only one screen remaining you have to reload the awesome-config. Once you do that, all open clients will be distributed according to your client rules on the available tags.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM