On 2026-09-27 09:30:29, Sadeep wrote:
> Having display issues with fvwm (v2.2.5, the one in the base system).
> On a 32" external monitor, it only uses the top half of the screen. I
> have a 3x3 fvvwm desktop. On start-up, only the 1st quadrant is used:
> 
> .xsession content:
> 
> export LANG=en_US.UTF-8
> xsetroot -def
> srandrd ~/.config/srandrd/handler.sh &
> ssh-agent fvwm
> 
> srandr handler:
> 
> #!/bin/sh
> 
> if [ "$SRANDRD_OUTPUT" = "HDMI-2" ]; then
>     case "$SRANDRD_EVENT" in
>         connected)
>             xrandr --output eDP-1 --off --output HDMI-2 --auto
>             xinput set-prop /dev/wsmouse "Device Accel Constant Deceleration" 
> 0.3
>             ;;
>         disconnected)
>             xrandr --output HDMI-2 --off --output eDP-1 --auto
>             xinput set-prop /dev/wsmouse "Device Accel Constant Deceleration" 
> 1.0
>             ;;
>     esac
> fi
> 

Problem was with the srandrd handler. I didn't restart fvwm:

# Only trigger on HDMI-2 events
if [ "$SRANDRD_OUTPUT" = "HDMI-2" ]; then
    case "$SRANDRD_EVENT" in
        connected)
            xrandr --output eDP-1 --off --output HDMI-2 --auto --primary
            xinput set-prop /dev/wsmouse "Device Accel Constant Deceleration" 
0.3
            ;;
        disconnected)
            xrandr --output HDMI-2 --off --output eDP-1 --auto --primary
            xinput set-prop /dev/wsmouse "Device Accel Constant Deceleration" 
1.0
            ;;
    esac
fi

~/.fehbg
pkill -USR1 -x fvwm

Fixed it. Added the following to .xsession to get it working at login as
well:

# If the external display is connected, switch to it
if xrandr | grep -q '^HDMI-2 connected'; then
    xrandr --output eDP-1 --off --output HDMI-2 --auto --primary
    xinput set-prop /dev/wsmouse "Device Accel Constant Deceleration" 0.3
fi

~/.fehbg &
srandrd ~/.config/srandrd/handler.sh &
picom --backend xrender &
exec ssh-agent fvwm

If there's a better way, please let me know.

-- 
Sadeep

Reply via email to