commit 2c1b65dca3a7cbde68327d411b7f378b20438860
parent ba77b7cdeb50faa424fc738c58469c2b1ed74887
Author: Ilia Bozhinov <ammen99@gmail.com>
Date: Sat, 11 Apr 2020 10:49:43 +0200
Merge pull request #10 from soreau/minor-fixes
Minor fixes
Diffstat:
3 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/install.sh b/install.sh
@@ -157,11 +157,9 @@ cp $BUILDROOT/start_wayfire.sh.in $BUILDROOT/start_wayfire.sh
if [ ${PREFIX} != '/usr' ]; then
sed -i "s@^LD_.*@export LD_LIBRARY_PATH=${PREFIX}/${DEST_LIBDIR}:\$LD_LIBRARY_PATH@g" $BUILDROOT/start_wayfire.sh
sed -i "s@^PATH.*@export PATH=${PREFIX}/bin:\$PATH@g" $BUILDROOT/start_wayfire.sh
+ sed -i "s@^XDG_.*@export XDG_DATA_DIRS=${PREFIX}/share:\$XDG_DATA_DIRS@g" $BUILDROOT/start_wayfire.sh
fi
-chmod 755 $BUILDROOT/start_wayfire.sh
-$SUDO cp $BUILDROOT/start_wayfire.sh $PREFIX/bin/startwayfire
-
-echo "Installation done. Run $PREFIX/bin/startwayfire to start wayfire."
+$SUDO install -m 755 $BUILDROOT/start_wayfire.sh $PREFIX/bin/startwayfire
ask_confirmation "Do you want to install WCM, a graphical configuration tool for Wayfire [y/n]? "
if [ $yn = Y ]; then
@@ -171,3 +169,14 @@ if [ $yn = Y ]; then
ninja -C build
$SUDO ninja -C build install
fi
+
+SESSIONS_DIR=/usr/share/wayland-sessions
+ask_confirmation "Do you want to install wayfire.desktop to $SESSIONS_DIR/ [y/n]?"
+if [ $yn = Y ]; then
+ cp $BUILDROOT/wayfire.desktop.in $BUILDROOT/wayfire.desktop
+ sed -i "s@^Exec.*@Exec=$PREFIX/bin/startwayfire@g" $BUILDROOT/wayfire.desktop
+ sed -i "s@^Icon.*@Icon=$PREFIX/share/wayfire/icons/wayfire.png@g" $BUILDROOT/wayfire.desktop
+ $SUDO install -m 644 $BUILDROOT/wayfire.desktop $SESSIONS_DIR
+fi
+
+echo "Installation done. Run $PREFIX/bin/startwayfire to start wayfire."
diff --git a/start_wayfire.sh.in b/start_wayfire.sh.in
@@ -4,6 +4,8 @@
LD_LIBRARY_PATH=$LD_LIBRARY_PATH
# path is needed for wf-shell clients
PATH=$PATH
+# path to find .desktop files like wcm
+XDG_DATA_DIRS=$XDG_DATA_DIRS
if [ -d "$XDG_DATA_HOME" ]; then
DEFAULT_LOG_DIR=$XDG_DATA_HOME/wayfire
diff --git a/wayfire.desktop.in b/wayfire.desktop.in
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Version=0.4
+Name=Wayfire Session
+Comment=Use this session to run Wayfire as your desktop environment
+Exec=$PREFIX/bin/startwayfire
+Icon=$PREFIX/share/wayfire/icons/wayfire.png
+Type=Application