summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2020-05-26 18:16:42 -0400
committerLuke Smith <luke@lukesmith.xyz>2020-05-26 18:16:42 -0400
commita8ff531a3c4671dda3f2710ffdebde9820635912 (patch)
tree4e3809b5164f7e09c4ead48394c8ae3798aea148
parentc153ac7fb427cf517db6d5e5bff0857ee894d407 (diff)
downloadeibhear-a8ff531a3c4671dda3f2710ffdebde9820635912.tar.gz
eibhear-a8ff531a3c4671dda3f2710ffdebde9820635912.tar.zst
eibhear-a8ff531a3c4671dda3f2710ffdebde9820635912.zip
libxft failsafe
I have no reason why libxft-bgra is not installing correctly on some machines. Here's a (dumb) failsafe that prompts user intervention.
-rw-r--r--.zprofile11
1 files changed, 9 insertions, 2 deletions
diff --git a/.zprofile b/.zprofile
index 8a7d276..840aeec 100644
--- a/.zprofile
+++ b/.zprofile
@@ -118,8 +118,15 @@ ex=🎯:\
[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shortcutrc ] && shortcuts >/dev/null 2>&1 &
-# Start graphical server on tty1 if not already running.
-[ "$(tty)" = "/dev/tty1" ] && ! ps -e | grep -qw Xorg && exec startx
+if pacman -Qs libxft-bgra >/dev/null 2>&1; then
+ # Start graphical server on tty1 if not already running.
+ [ "$(tty)" = "/dev/tty1" ] && ! pidof Xorg >/dev/null 2>&1 && exec startx
+else
+ echo "\033[31mIMPORTANT\033[0m: Note that \033[32m\`libxft-bgra\`\033[0m must be installed for this build of dwm.
+Please run:
+ \033[32myay -S libxft-bgra\033[0m
+and replace \`libxft\`"
+fi
# Switch escape and caps if tty and no passwd required:
sudo -n loadkeys ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/ttymaps.kmap 2>/dev/null