diff --git a/xinitrc b/xinitrc index 79a96eb..00efd2d 100644 --- a/xinitrc +++ b/xinitrc @@ -33,15 +33,15 @@ fi # Forking graphical programs forklog() { - nohup $* | logger & + $* 2>&1 | logger & } forklog redshift forklog dunst forklog xcape -t 100 -e 'Super_L=Scroll_Lock;Shift_L=Escape' forklog feh --bg-scale '/home/felix/Pictures/lain.png' -forklog xautolock -time 1 -locker xsecurelock & -forklog xset dpms 0 0 50 s off & +forklog xautolock -time 1 -locker xsecurelock +forklog xset dpms 0 0 50 s off # Start herbstluftwm in locked mode. Is unlocked after autostart. exec xmonad diff --git a/xmonad/xmonad.hs b/xmonad/xmonad.hs index dd8b63d..eeacfaa 100644 --- a/xmonad/xmonad.hs +++ b/xmonad/xmonad.hs @@ -40,7 +40,10 @@ runInTerminal :: [Char] -> [Char] -> [Char] runInTerminal e n = myTerminal ++ " -name " ++ n ++ " -e " ++ e logged :: [Char] -> [Char] -logged m = "nohup " ++ m ++ " | logger" +logged m = m ++ " 2>&1 | logger" + +silent :: [Char] -> [Char] +silent m = m ++ " > /dev/null 2>&1" -- Whether focus follows the mouse pointer. myFocusFollowsMouse :: Bool @@ -184,9 +187,9 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ -- Restart xmonad , ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart") - , ((0, xF86XK_AudioMute), spawn "sound_control.sh toggle") - , ((0, xF86XK_AudioRaiseVolume), spawn "sound_control.sh up") - , ((0, xF86XK_AudioLowerVolume), spawn "sound_control.sh down") + , ((0, xF86XK_AudioMute), spawn $ silent "sound_control.sh toggle") + , ((0, xF86XK_AudioRaiseVolume), spawn $ silent "sound_control.sh up") + , ((0, xF86XK_AudioLowerVolume), spawn $ silent "sound_control.sh down") , ((0, xF86XK_AudioNext), spawn "mpc -q next") , ((0, xF86XK_AudioPlay), spawn "mpc -q toggle") , ((0, xF86XK_AudioPrev), spawn "mpc -q prev")