From 648b4ae031d66b9d3258d52d156e4f198052785e Mon Sep 17 00:00:00 2001 From: Solomon Laing Date: Wed, 15 Feb 2023 13:10:02 +1030 Subject: [PATCH] removed some archmetabox stuff and updated dwm. --- .config/x11/xinitrc | 31 +++++++++---------------------- .config/x11/xprofile | 10 ---------- .dwm/start-dwm.sh | 13 +++++++++++++ 3 files changed, 22 insertions(+), 32 deletions(-) create mode 100755 .dwm/start-dwm.sh diff --git a/.config/x11/xinitrc b/.config/x11/xinitrc index 968acb2..cf6af5e 100755 --- a/.config/x11/xinitrc +++ b/.config/x11/xinitrc @@ -1,39 +1,26 @@ #!/bin/sh if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile" ]; then - . "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile" + . "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile" else - . "$HOME/.xprofile" -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 + . "$HOME/.xprofile" fi # start gnome keyring to, used to be done by login manager. eval "$(gnome-keyring-daemon --start)" export SSH_AUTH_SOCK -# My default is still xmonad, maybe dwm in future? -session=${1:-xmonad} +# My default is dwm for now. +session=${1:-dwm} case $session in i3|i3wm) - exec i3;; + exec i3 ;; dwm) - dwmblocks & - exec dwm;; + exec "$HOME/.dwm/start-dwm.sh" ;; xmonad) - exec "$HOME/.xmonad/start-xmonad.sh";; - # No known session, try to run it as command + exec "$HOME/.xmonad/start-xmonad.sh" ;; + # No known session, try to run it as command *) - exec twm;; + exec twm ;; esac diff --git a/.config/x11/xprofile b/.config/x11/xprofile index dfb42f8..6984e84 100755 --- a/.config/x11/xprofile +++ b/.config/x11/xprofile @@ -13,16 +13,6 @@ 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-0 - xrandr --auto -fi - - # I don't use the following but I like it so I'll leave it for now. autostart="" diff --git a/.dwm/start-dwm.sh b/.dwm/start-dwm.sh new file mode 100755 index 0000000..8c6f7e1 --- /dev/null +++ b/.dwm/start-dwm.sh @@ -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