From 90ddbc3e74e24182a34ad239aed9b26fb271e9bb Mon Sep 17 00:00:00 2001 From: Anjandev Momi Date: Mon, 2 Nov 2020 14:59:54 -0500 Subject: [PATCH] move dwm.log to $XDG_CACHE_HOME --- scripts/core/sxmo_xinit.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/core/sxmo_xinit.sh b/scripts/core/sxmo_xinit.sh index 3142d2d..c6ffb3f 100755 --- a/scripts/core/sxmo_xinit.sh +++ b/scripts/core/sxmo_xinit.sh @@ -18,10 +18,14 @@ envvars() { [ -z "$XDG_PICTURES_DIR" ] && export XDG_PICTURES_DIR=~/Pictures } -setupxdgruntimedir() { +setupxdgdir() { mkdir -p $XDG_RUNTIME_HOME chmod 700 $XDG_RUNTIME_HOME chown "$USER:$USER" "$XDG_RUNTIME_HOME" + + mkdir -p "$XDG_CACHE_HOME/sxmo/" + chmod 700 "$XDG_CACHE_HOME" + chown "$USER:$USER" "$XDG_CACHE_HOME" } xdefaults() { @@ -69,16 +73,17 @@ customxinit() { } startdwm() { + exec dbus-run-session sh -c " $0 daemonsneedingdbus; . $0 customxinit; - dwm 2> ~/.dwm.log + dwm 2> "$XDG_CACHE_HOME/sxmo/dwm.log" " } xinit() { envvars - setupxdgruntimedir + setupxdgdir xdefaults daemons startdwm