Dual monitor usage at JWM

 



I'm designing a GUI tool for using dual monitors in a JWM environment, which I'll include in a future release. Arandr and Lxrandr are good tools, but they require users to perform some manual operations. This requires further research for those unfamiliar with them. Furthermore, they aren't designed for JWM, meaning dual monitors in a JWM session will be inconsistent. For example, when dual monitors are active, one monitor might have a panel while the other doesn't. To simplify things and improve dual monitor usage, I'm developing a GUI tool, as mentioned earlier. Until then, I'll try to help those who want to use dual monitors with commands here. The operations I'll describe here are valid for Besgnulinux JWM sessions.

Let's begin if you want to use dual monitors in a Besgnulinux JWM environment.

I will explain it using HDMI-1 and VGA-1; you should replace these with your own monitors. To find your monitor connections and with two monitors connected, first enter the following command into the terminal.

xrandr | grep -w "connected" | awk '{print $1}'

This is the output I get from this command; it might be different for you.

VGA-1

HDMI-1

We get the resolution with the command below.

xrandr --current | grep '*' | awk '{print $1}'

This is the output I got; yours might be different.

1440x900_60.00

Now we will place the outputs we obtained from these two commands into the command below.

xrandr --output HDMI-1 --mode 1440x900_60.00 --output VGA-1 --auto --right-of HDMI-1

In this configuration, HDMI-1 is the first monitor, VGA-1 is the second monitor, and VGA-1 is on the right.

If you want to do the opposite, i.e., make HDMI-1 the second one, the command should be as follows.

xrandr --output VGA-1 --mode 1440x900_60.00 --output HDMI-1 --auto --right-of VGA-1

If you want to move it from the right to the left, simply change the word "right" to "left".

If you understand the dual monitor operation so far, let's now integrate it with Besgnulinux JWM. To do this, simply execute the command below. Enter the entire command into the terminal at once.

cp -a ~/.config/jwm/tray.xml ~/.config/jwm/tray3.xml
sed -i 's|screen=.*|screen="1"|g' ~/.config/jwm/tray3.xml
sed -i '/tray3/d' ~/.config/jwm/jwmrc
sed -i "/tray.xml/a $HOME/.config/jwm/tray3.xml" ~/.config/jwm/jwmrc

To make it run at startup, add a desktop file like this to the "autostart" directory. This file will execute the command you added to the `Exec="` line every time the computer starts.

cat >~/.config/autostart/userrandr-auto.desktop<< EOF
[Desktop Entry]
Type=Application
Name=Besrandr automatic start
Comment=Start xrandr with the settings made using Besrandr
Exec=bash -c "xrandr --output HDMI-1 --mode 1440x900_60.00 --output VGA-1 --auto --right-of HDMI-1"
EOF


If you wish to disable it, use the commands below.

sed -i '/tray3/d' ~/.config/jwm/jwmrc
rm -r ~/.config/autostart/userrandr-auto.desktop

This process will make dual monitors more functional in the Besgnulinux JWM environment. As I mentioned earlier, in the next version, it will be possible to perform this process and more, namely using dual monitors compatible with JWM, via a GUI interface.




No comments:

Post a Comment

Shared by The Distrowrite Project
In an era where modern operating systems seem to demand an ever-increasing amount of hardware resources just to perform basic tasks, there is a refreshing movement within the open-source community that prioritises efficiency, speed, and simplicity. At the forefront of this movement sits Besgnulinux, a project that has consistently proven that you do not need the latest multi-core processor or gigabytes of idle memory to enjoy a modern computing experience. The full article

Password

Name: besgnulinux

Password: live
! Lightness !

! Speed !

! Stable !

! Useful !

 

For Besgnulinux, these four features come before.

 

Efficient operation of computers.

 

To meet the basic needs of the user.

 

A continuous, stable system.

 

Lightness does not mean limiting basic tools.

 

Instead, the vehicles that are light, fast and fixed are integrated into the system.

Categories

Blog Archive

Last Comments

Copyright © BesGnuLinux | Powered byBloggerDesign by wpmagg | Blogger Theme by NewBloggerThemes