removed some archmetabox stuff and updated dwm.

This commit is contained in:
Solomon Laing 2023-02-15 13:10:02 +10:30
parent 7bc48e0a0d
commit 648b4ae031
3 changed files with 22 additions and 32 deletions

View File

@ -6,31 +6,18 @@ else
. "$HOME/.xprofile" . "$HOME/.xprofile"
fi fi
if [ -f /etc/hostname ]; then
HOST=$(cat /etc/hostname)
else
HOST=$(hostname)
fi
if [ "$HOST" = "archmetabox" ] ; then
# this is specifically for the laptop so check hostname
xrandr --setprovideroutputsource modesetting NVIDIA-G0
xrandr --auto
fi
# start gnome keyring to, used to be done by login manager. # start gnome keyring to, used to be done by login manager.
eval "$(gnome-keyring-daemon --start)" eval "$(gnome-keyring-daemon --start)"
export SSH_AUTH_SOCK export SSH_AUTH_SOCK
# My default is still xmonad, maybe dwm in future? # My default is dwm for now.
session=${1:-xmonad} session=${1:-dwm}
case $session in case $session in
i3|i3wm) i3|i3wm)
exec i3 ;; exec i3 ;;
dwm) dwm)
dwmblocks & exec "$HOME/.dwm/start-dwm.sh" ;;
exec dwm;;
xmonad) xmonad)
exec "$HOME/.xmonad/start-xmonad.sh" ;; exec "$HOME/.xmonad/start-xmonad.sh" ;;
# No known session, try to run it as command # No known session, try to run it as command

View File

@ -13,16 +13,6 @@ numlockx
# set default desktop window layout # set default desktop window layout
"$HOME/.screenlayout/default.sh" "$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-0
xrandr --auto
fi
# I don't use the following but I like it so I'll leave it for now. # I don't use the following but I like it so I'll leave it for now.
autostart="" autostart=""

13
.dwm/start-dwm.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
# Script to start dwm in loop
while true; do
dwmblocks
sleep 2
done &
while true; do
dwm >/dev/null
# to log stderrors to a file
# dwm 2> ~/Build/dwm/dwm.log
done