From e6172d13f45fe8176b57fcd91a4937ba64dcd367 Mon Sep 17 00:00:00 2001 From: Solomon Laing Date: Tue, 8 Nov 2022 08:43:11 +1030 Subject: [PATCH] updated autostart stuff and added dwm autostart things --- .config/x11/xprofile | 30 ++++++++++++------------------ .dwm/autostart.sh | 24 ++++++++++++++++++++++++ .xmonad/xmonad.hs | 14 +++----------- 3 files changed, 39 insertions(+), 29 deletions(-) create mode 100644 .dwm/autostart.sh diff --git a/.config/x11/xprofile b/.config/x11/xprofile index 0b27554..879afec 100755 --- a/.config/x11/xprofile +++ b/.config/x11/xprofile @@ -1,37 +1,31 @@ #!/bin/sh +# start universal things here like keyboard map, cursor, and default screenlayout # keyboard layout setxkbmap -layout dvorak -options ctrl:nocaps & -# wallpaper -nitrogen --restore & - -# compositor -picom --experimental-backend & - -# red light at night -redshift-gtk -l 34.92866:138.59863 & - # cursor xsetroot -cursor_name left_ptr -# start thunar daemon so it doesn't take years to load -thunar --daemon & +# numlock +numlockx + +# set default desktop window layout +"$HOME/.screenlayout/default.sh" + # handle some nvidia stuff for archmetabox HOST=$(cat /etc/hostname) if [ "$HOST" = "archmetabox" ] ; then - # this is specifically for the laptop so check hostname - xrandr --setprovideroutputsource modesetting NVIDIA-G0 - xrandr --auto + # this is specifically for the laptop so check hostname + xrandr --setprovideroutputsource modesetting NVIDIA-G0 + xrandr --auto fi -if [ "$HOST" = "archdesktop" ] ; then - "$HOME"/.screenlayout/normal_3_screen.sh -fi +# I don't use the following but I like it so I'll leave it for now. autostart="" for program in $autostart; do - pidof -s "$program" || "$program" & + pidof -s "$program" || "$program" & done >/dev/null 2>&1 diff --git a/.dwm/autostart.sh b/.dwm/autostart.sh new file mode 100644 index 0000000..6d32820 --- /dev/null +++ b/.dwm/autostart.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +# Place things in here that I would usually start from within xmonad, things +# that aren't in .xprofile + +############################################################################### +# System Applications +############################################################################### + +# Dunst - notifications +dunst & + +# Network Manager Applet +nm-applet + +# Compostitor with special stuff +picom --experimental-backend & + +############################################################################### +# Startup Applications +############################################################################### + +nextcloud & +element-desktop --hidden & diff --git a/.xmonad/xmonad.hs b/.xmonad/xmonad.hs index fe0ec07..18936b1 100644 --- a/.xmonad/xmonad.hs +++ b/.xmonad/xmonad.hs @@ -577,21 +577,13 @@ myLogHook = fadeInactiveLogHook fadeAmount -- By default, do nothing. myStartupHook = do - -- System apps also in .xprofile - spawnOnce "setxkbmap us &" - spawnOnce "$HOME/.screenlayout/default.sh" + -- System / Background apps + spawnOnce "redshift-gtk -l 34.92866:138.59863 &" spawnOnce "picom --experimental-backend &" - spawnOnce "numlockx" - spawnOnce "xsetroot -cursor_name left_ptr" - spawnOnce "xmodmap -pke $HOME/.config/x11/.Xmodmap" - -- for the life of me I can't work out how to source .zprofile while using a login manager... - -- so source it here :D - spawnOnce "source $HOME/.config/shell/profile" + spawnOnce "thunar --daemon &" -- Startup apps (tray) and settings spawnOnce "blueberry-tray &" - spawnOnce "/usr/lib/kdeconnectd &" - spawnOnce "kdeconnect-indicator &" spawnOnce "dunst &" -- notification daemon spawnOnce "nm-applet" spawnOnce "protonmail-bridge"