You are not logged in.

#1 2020-06-20 20:17:37

Stargarth
Member
Registered: 2020-02-08
Posts: 21

[SOLVED] Problem with dwmblocks on system start

Hi!

I'm starting dwmblocks from .xinitrc and it glitches out: https://imgur.com/a/QbeyPzF
It naturally starts before dwm, since nothing can start after exec is run. I've added a sleep but it doesn't make a difference.
Relevant content of my .xinitrc

(sleep 3 ; dwmblocks) & 
exec /home/stargarth/other/suckless/dwm/dwm-6.2_my/dwm

Funnily enough, when I run exactly the same command (dwmblocks) from the terminal (after everything is started), it works as expected: https://imgur.com/kmL57Bg
Any idea how could I fix that?

I saw somebody starting dwmblocks from authostart.sh using autostart patch, but I would like to avoid that if possible.

Last edited by Stargarth (2020-06-20 21:43:39)

Offline

#2 2020-06-20 20:24:23

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

Re: [SOLVED] Problem with dwmblocks on system start

I start dwm from a script, called from .xinitrc:

#!/usr/bin/env sh
# Script to start dwm in loop

while true; do
		$HOME/Scripts/dwm-status
    	sleep 2
done &

while true; do
	dwm >/dev/null
	# to log stderrors to a file
	# dwm 2> ~/Build/dwm/dwm.log
done

This has the advantage that you can kill dwm after a recompile and it will restart immediately.

Last edited by jasonwryan (2020-06-20 20:25:13)


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2020-06-20 21:07:08

Stargarth
Member
Registered: 2020-02-08
Posts: 21

Re: [SOLVED] Problem with dwmblocks on system start

Hey jasonwryan!

I tried out your script but unfortunately behavior is exactly the same as in original post hmm .

Edit:

What's even more weird is that when I start X session manually (with startx). Then dwmblocks works as expected yikes.

Last edited by Stargarth (2020-06-20 21:10:47)

Offline

#4 2020-06-20 21:21:29

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

Re: [SOLVED] Problem with dwmblocks on system start

Does the same thing happen with a simple shell status script?

I don't know anything about dwmblocks. You could play with it and see if it is one of the blocks that is the issue.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2020-06-20 21:33:25

Stargarth
Member
Registered: 2020-02-08
Posts: 21

Re: [SOLVED] Problem with dwmblocks on system start

I tried to play with blocks and I have no idea what's causing the issue.

Status update in dwm looks simple, so I think it will be faster to just write my own status program lol.
Thanks for help!

Offline

#6 2020-06-20 21:43:03

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

Re: [SOLVED] Problem with dwmblocks on system start

A status bar in C will be less resource intensive, but I have never noticed my shell script making a negligble dent in any of my machines, despite it looping every 3 seconds.

Please don't use [Closed]; it denotes a thread locked by staff.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB