#xrandr doesnt run in .xinitrc
8 messages · Page 1 of 1 (latest)
you should put all the commands you want to run before your exec command
When the shell ran exec dwm, the shell's instance was replaced by the command dwm, that's what the exec command does.
Hence, anything that came after the exec line was not processed by the shell.
You could write it like this,
exec sleep 2 && xrandr --output HDMI-1-0 --mode 1920x1080 --rate 180 && xrandr --output eDP-1 --off && dwm
as Andy suggested, just putting the lines before the exec line is easiest.
also if you need to run something that's supposed to run for a long time, like flameshot, you can write it like this flameshot &, the ampersand makes it run in the background
but i dont think xrandr commands need that
this won't work either, it'll replace the shell with sleep 2 lol
hah you're right, it apparently only works with & but not the and operator
yeah my bad