#!/bin/sh # speedwm-compatcheck # compatibility checker used by 'make' when compiling speedwm. BINDIR="$(dirname $(command -v status))/" # Check if xrdb exists if [ -e "${BINDIR}xrdb" ]; then xrdb_exists=true else printf "Error: ${BINDIR}xrdb was not found\n" && exit 1 fi # Check if wmctrl exists if [ -e "${BINDIR}wmctrl" ]; then wmctrl_exists=true else printf "Error: ${BINDIR}wmctrl was not found\n" && exit 1 fi # Check if xsetroot exists if [ -e "${BINDIR}xsetroot" ]; then xsetroot_exists=true else printf "Error: ${BINDIR}xsetroot was not found\n" && exit 1 fi # Check if xwallpaper exists if [ -e "${BINDIR}xwallpaper" ]; then xwallpaper_exists=true else printf "Error: ${BINDIR}xwallpaper was not found\n" && exit 1 fi # Check if xmodmap exists if [ -e "${BINDIR}xmodmap" ]; then xmodmap_exists=true else printf "Error: ${BINDIR}xmodmap was not found\n" && exit 1 fi # Check if dmenu exists command -v dmenu > /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 command -v slock > /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")"