You are not logged in.

#1 2022-04-28 20:49:04

blusser
Member
Registered: 2022-04-28
Posts: 3

[SOLVED] redshift on start up does not work with dwm

Hi,

i use dwm and i would like to autostart redshift, i can't get it to work.
I use startx to start my gui.

tried modifying my xinitrc like in the wiki:
https://wiki.archlinux.org/title/Dwm#Starting

I modified my xinitrc so it would load my xprofile
like here:
https://wiki.archlinux.org/title/xprofile
I have my xprofile in home.

redshift -P -O 2000

this worked with i3 and lxdm.
I also wrote a script that i tried to run. On it's own it works, but if i try to run it in xinitrc it does not work.
I use a script to set my display resolution, so i know how to run a script from xinitrc.

sh ~/.config/dwm/redshift&

i have also tried in my xinitrc (which works for the rest):

 redshift -P -O 2000&

unfortunately nothing has worked.

here is my script i call from xinitrc:

 #!/bin/bash
redshift -P -O 2000

these are the relevant parts of  my xinitrc (in home):

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi


[ -f /etc/xprofile ] && . /etc/xprofile
[ -f ~/.xprofile ] && . ~/.xprofile

#dwm statusbar
dwmstatus 2>&1 >/dev/null &
#Keyboard layout
setxkbmap de &
#redshift -O3500;
#display resolution
sh ~/.config/dwm/setRes2560_1440_60.sh &
#composiotr
picom -f &
nitrogen --restore &
while true; do
        dwm >/dev/null 2>&1
done
#redshift
sh ~/.config/dwm/redshift&
 exec dwm

Thank you for your help,
blusser

Last edited by blusser (2022-04-29 07:46:18)

Offline

#2 2022-04-28 21:09:26

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] redshift on start up does not work with dwm

Why are you starting dwm in the loop, and then exec'ing it?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2022-04-29 07:45:56

blusser
Member
Registered: 2022-04-28
Posts: 3

Re: [SOLVED] redshift on start up does not work with dwm

I think that is a leftover from wild  copy and pasting. My problem seems to be fixed though. I just booted up and my screen is more red. The xprofile way worked.
The lines after my while loop will never be executed right? It was late yesterday...
I only restarted dwm and I did not reboot everytime I tried a new way. That was my mistake.

Last edited by blusser (2022-04-29 07:51:58)

Offline

Board footer

Powered by FluxBB