summaryrefslogtreecommitdiff
path: root/ffc
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2023-02-27 00:14:25 -0600
committerzachir <zachir@librem.one>2023-02-27 00:14:25 -0600
commit42feda400d8fd77e460aacca9e99af70c188b7c9 (patch)
tree587cb169c7abeaf99447848807df90369d9d4c2b /ffc
parentc6387e7152f44e8a37ce7d1304893c149b37386c (diff)
Add check to determine display server without flags
Diffstat (limited to 'ffc')
-rwxr-xr-xffc13
1 files changed, 13 insertions, 0 deletions
diff --git a/ffc b/ffc
index fd004be..117523c 100755
--- a/ffc
+++ b/ffc
@@ -21,6 +21,19 @@ while getopts "hwxd:u:" o; do case "${o}" in
esac done
#}}}
+#{{{ Check display server if -w or -x not provided
+if [ -z "$DMENU" ]; then
+ if [ -n "$WAYLAND_DISPLAY" ]; then
+ DMENU="bemenu"
+ elif [ -n "$DISPLAY" ]; then
+ DMENU="dmene"
+ else
+ print "Can't tell if Wayland or X; what gives?\n"
+ exit 1
+ fi
+fi
+#}}}
+
#{{{ Native Profiles
if [ -f ~/.mozilla/firefox/profiles.ini ]; then
NATIVE_PROFILES=`grep 'Path=' ~/.mozilla/firefox/profiles.ini | cut -d'.' -f2`