mirror of
https://github.com/eepykate/fet.sh.git
synced 2026-10-15 10:29:31 +00:00
support monads
This commit is contained in:
1 parent
bfeaa7e0eb
commit
0df4d1b969
1 file changed
+4
-3
@@ -25,21 +25,22 @@ while [ ! "$term" ]; do
|
||||
done
|
||||
|
||||
## WM
|
||||
# requires the WM to include 'wm'
|
||||
# requires the WM to include 'wm' or 'monad' (for you leon)
|
||||
pg() {
|
||||
ab=
|
||||
for i in /proc/[0-9]*; do
|
||||
ab="$ab ${i##*/}"
|
||||
read -r a < "$i"/comm
|
||||
case $a in
|
||||
*$1*) echo "$a" "${i##*/}"; break;;
|
||||
*$1*|*${2:-$1}*) echo "$a" "${i##*/}"; break;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
[ "$DISPLAY" ] && {
|
||||
xorg="$(pg Xorg)"
|
||||
xorg="${xorg##* }"
|
||||
aa="$(pg wm)"
|
||||
aa="$(pg wm monad)"
|
||||
# make sure it was started near enough after the X server
|
||||
[ "${aa##* }" -gt "$xorg" ] &&
|
||||
[ "${aa##* }" -lt "$((xorg + 20))" ] &&
|
||||
|
||||
Reference in new issue
Block a user