From fe61af8f62554e172e18d462561569c326250206 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Thu, 22 Jul 2021 22:20:53 +0200 Subject: [PATCH] Use xprofile to start necessary init apps --- home/.config/x11/xprofile | 23 ++++++++++++++++++++++- home/.config/xmonad/xmonad.hs | 14 +++++++------- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/home/.config/x11/xprofile b/home/.config/x11/xprofile index 85946fc..b9b13cb 100644 --- a/home/.config/x11/xprofile +++ b/home/.config/x11/xprofile @@ -3,4 +3,25 @@ # This file runs when a DM logs you into a graphical session # if you use startx/xinit this file should also be soruced. -xrandr --output eDP-1 --auto --output HDMI-1 --auto --left-of eDP-1 +# Set monitor order +xrandr --output HDMI-1 --auto --output eDP-1 --right-of HDMI-1 --auto + +# Set the background with a custom `setbg` script +setbg & + +# xcompmgr to allow transparency +xcompmgr & + +# Dunst for notifications +dunst & + +# Run network manager applet to show connectivity +nm-applet & + +# Run trayer-srg for systemtray bar +# if installed normally, use `trayer`, not `trayer-srg` command +trayer-srg --monitor 0 --edge top --align right --widthtype request --padding 0 --transparent true --tint 0x282c34 --alpha 0 --height 23 & + +# Enable running applications from chroot +xhost +local: + diff --git a/home/.config/xmonad/xmonad.hs b/home/.config/xmonad/xmonad.hs index 04fbed6..ae706b2 100644 --- a/home/.config/xmonad/xmonad.hs +++ b/home/.config/xmonad/xmonad.hs @@ -314,16 +314,16 @@ myManageHook = composeAll -- Perform an arbitrary action each time xmonad starts or is restarted -- with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize -- per-workspace layout choices. +-- +-- I don't really use this because I define these applications +-- in ~/.config/x11/xprofile instead, that way it will apply for +-- all WMs, not just for XMonad myStartupHook :: X () myStartupHook = do - spawnOnce "setbg &" - spawnOnce "nm-applet &" - spawnOnce "dunst &" - spawnOnce "trayer-srg --monitor 0 --edge top --align right --widthtype request --padding 0 --transparent true --tint 0x282c34 --alpha 0 --height 23 &" - spawnOnce "$HOME/.config/xmonad/scripts/autostart.sh" - --spawnOnce "emacs --daemon &" - --spawnOnce "urxvtd -q -o -f &" + -- Automatically run autostart.sh script which will start + -- .desktop applications defined in ~/.config/autostart + spawnOnce "$HOME/.config/xmonad/scripts/autostart.sh &" ------------------------------------------------------------------------------- -- Log hook: this sends info to xmobar process(es)