69 lines
2.2 KiB
Bash
Executable file
69 lines
2.2 KiB
Bash
Executable file
#!/bin/sh
|
|
# speedwm-compatcheck
|
|
# compatibility checker used by 'make' when compiling speedwm.
|
|
|
|
BINDIR=$(cat /usr/share/speedwm-bindir)
|
|
|
|
# Check if xrdb exists
|
|
if [ -e "${BINDIR}xrdb" ]; then
|
|
xrdb_exists=true
|
|
else
|
|
printf "\nWARNING: xrdb was not found. .Xresources and Pywal support will not work."
|
|
fi
|
|
|
|
# Check if wmctrl exists
|
|
if [ -e "${BINDIR}wmctrl" ]; then
|
|
wmctrl_exists=true
|
|
else
|
|
printf "\nWARNING: wmctrl was not found. Window management using 'Alt+Tab' will not work."
|
|
fi
|
|
|
|
# Check if xsetroot exists
|
|
if [ -e "${BINDIR}xsetroot" ]; then
|
|
xsetroot_exists=true
|
|
else
|
|
printf "\nerror: ${BINDIR}xsetroot was not found\n" && exit 1
|
|
fi
|
|
|
|
# Check if xwallpaper exists
|
|
if [ -e "${BINDIR}xwallpaper" ]; then
|
|
xwallpaper_exists=true
|
|
else
|
|
printf "\nWARNING: xwallpaper was not found. This means setting your wallpaper and Pywal support won't work."
|
|
fi
|
|
|
|
# Check if xmodmap exists
|
|
if [ -e "${BINDIR}xmodmap" ]; then
|
|
xmodmap_exists=true
|
|
else
|
|
printf "\nWARNING: xmodmap was not found. This means the Alt+Tab script will not be able to remap Alt+hjkl temporarily."
|
|
fi
|
|
|
|
# Check if trayer exists
|
|
if [ -e "${BINDIR}trayer" ]; then
|
|
trayer_exists=true
|
|
elif [ -e "${BINDIR}trayer-srg" ]; then
|
|
trayer_exists=true
|
|
trayer_srg=true
|
|
fi
|
|
|
|
# Check if srg or not.
|
|
if [ "$trayer_exists" = "false" ]; then
|
|
printf "\nWARNING: trayer was not found. This means the systray will not be available.\n"
|
|
elif [ "$trayer_srg" = "true" ]; then
|
|
printf "\nWARNING: Before trayer-srg can be used instead of trayer, you must edit ~/.config/speedwm-de/systray/config and set USE_SRG to true.\n"
|
|
fi
|
|
|
|
# Check if dmenu exists
|
|
dmenu -v > /dev/null || printf "\nWARNING: dmenu was not found. This means running applications will potentially be very inconvenient. It also means most bundled scripts will NOT work unless modified to work with rofi. See help for more information"
|
|
|
|
# Check if slock exists
|
|
slock -v > /dev/null || printf "\nWARNING: slock was not found. This means the shutdown menu can't lock your screen."
|
|
|
|
result="$(echo "$xrdb_exists$wmctrl_exists$xsetroot_exists$xwallpaper_exists$xmodmap_exists$trayer_exists")"
|
|
|
|
case "$result" in
|
|
"truetruetruetruetruetrue") printf "\nAll dependencies were found.\n\n" ;;
|
|
"") printf "\nSome dependencies could not be found." ;;
|
|
esac
|