Make PID files unique for X session.

This commit is contained in:
2016-04-02 15:52:20 +02:00
parent d67a313f94
commit 1c7b0dd9a7
3 changed files with 4 additions and 4 deletions

View File

@@ -4,4 +4,4 @@ redshift_colortemp="6000:3300"
log "starting redshift-gtk"
redshift-gtk -b 1 -l "$redshift_lat_long" -t "$redshift_colortemp" & &>> "$LOGFILE"
printf '%s' $! > "$RUNDIR"/redshift.pid
printf '%s' $! > "$RUNDIR"/redshift.${XDG_SESSION_ID}.pid

View File

@@ -1,6 +1,6 @@
path_wallchanger="$HOME/projects/wallchanger/wallchanger"
wallchanger_pidfile="$RUNDIR/wallchanger.pid"
wallpaper_directory="$HOME/pictures/wallpaper/misc"
wallchanger_pidfile="$RUNDIR/wallchanger.${XDG_SESSION_ID}.pid"
wallpaper_logfile="$LOGDIR/wallpaper.log"
wallpaper_fallback="$HOME/.i3/data/wallpaper/"
wallpaper_interval="10800"

View File

@@ -271,8 +271,8 @@ bindsym XF86AudioPlay exec --no-startup-id mpc toggle
bindsym XF86AudioPrev exec --no-startup-id mpc prev
bindsym XF86AudioNext exec --no-startup-id mpc next
bindsym $mod+o exec --no-startup-id xautorandr ; exec --no-startup-id kill -SIGUSR2 $(cat $RUNDIR/wallchanger.pid)'"
bindsym $mod+p exec --no-startup-id kill -SIGUSR1 $(cat $RUNDIR/wallchanger.pid)
bindsym $mod+o exec --no-startup-id xautorandr ; exec --no-startup-id kill -SIGUSR2 $(cat $RUNDIR/wallchanger.$XDG_SESSION_ID.pid)'"
bindsym $mod+p exec --no-startup-id kill -SIGUSR1 $(cat $RUNDIR/wallchanger.$XDG_SESSION_ID.pid)
################################################################################
### BARS #######################################################################