You are not logged in.
Statuscolor is a patch, not a script. I think you mean the script that sets the status? I don't think that's possible, why would you want to do this?
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
Yeah, I mean the script to set colors. Just experimenting, trying to keep files to a minimum.
So, not possible? But why?
There is no such thing as a script to set colors. You use a script to write information to your root window which DWM reads and copies into the statusbar. You just use 'codes' so that DWM knows when to use which color (if you patched DWM with the statuscolor patch). I don't think it's possible to use xinitrc for that purpose as I think it's only read/run once: when X starts. Your statusbar script needs to keep running, unless you only want to have the information from when X starts..
Maybe it can work, I honestly can't say it 100% sure. Think of things like a loop and whatnot.
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
You can definitely set status info from xinitrc.
while :; do xsetroot -name "$(date)"; sleep 1; done &
exec dwmIf you want colors, you'd just modify the "date" command to suit what you want.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Of course it doesn't "\x01" is not a shell command.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
No, anything you can put in a script, you can put in xinitrc. xinitrc is interpreted by bash (or your default shell).
But `xsetroot -name $(\x01 date)` wouldn't work any better in an outside script than it would in xinitrc. `\x01 date` is not a shell command.
It sounds like you need help writing your status script - if so there are several threads with many examples. But the question you asked here is whether the status script stuff can be put in xinitrc. To that the answer is a simple 'yes'. But if it wouldn't work in your status script, it also wouldn't work in xinitrc.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
^ That's what I meant with "I am not 100% sure" ![]()
OTOH, I do think that once you start incorporating battery information, WiFi, music etc, an external script is just easier. Especially if you're going to use functions for these.
If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres
Offline
I never put any of that in xinitrc - it just seemed cluttered and ugly. So yes IMHO I'd say a separate script (or program) is better for organization - but it makes no difference in terms of functionality. Xinitrc is a shell script.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline