From d84a8820177784961e4da89eb06a6f3dd1cad040 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Sat, 20 Jul 2019 10:33:02 +0000 Subject: [PATCH] Move x* to xsession --- etc/xmonad.hs | 4 ---- home-manager.nix | 17 +++++++++++++++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/etc/xmonad.hs b/etc/xmonad.hs index 1422e76..9e0640d 100644 --- a/etc/xmonad.hs +++ b/etc/xmonad.hs @@ -18,10 +18,6 @@ main = xmonad $ defaultConfig startup = do setWMName "LG3D" spawn "xrandr --auto && xrandr --output DP-1.3 --above DP-2" - spawn "xsetroot -solid '#000000'" - spawn "xinput --disable $(xinput | grep -o 'Synaptics TouchPad.*id=[0-9]*' | cut -d '=' -f 2)" - spawn "xinput --set-prop 15 'Device Accel Constant Deceleration' 0.20" - spawn "xhost +local" windowManage = composeAll [ className =? "Emacs" --> doShift "1:emacs" diff --git a/home-manager.nix b/home-manager.nix index 749ed94..97d12a4 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -72,7 +72,20 @@ in { options = [ "ctrl:nocaps" "grp:rctrl_toggle" ]; }; - xsession.enable = true; - xsession.windowManager.command = "exec xmonad"; + xsession = { + enable = true; + windowManager.command = "exec xmonad"; + initExtra = '' + touchpad=$(xinput | grep -o 'TouchPad.*id=[0-9]*' | cut -d '=' -f 2) + trackpoint=$(xinput | grep -o 'TrackPoint.*id=[0-9]*' | cut -d '=' -f 2) + + xsetroot -solid '#000000' + + xinput --disable $touchpad + xinput --set-prop $trackpoint 'Device Accel Constant Deceleration' 0.20 + + xhost +local + ''; + }; }; }