Skip to content

Commit

Permalink
Add initial support for Miriway
Browse files Browse the repository at this point in the history
Miriway is a new generic compositor built on the Mir compositor
library that is designed to be used as part of composable desktop
environments.
  • Loading branch information
Conan-Kudo committed Nov 3, 2024
1 parent cdf9368 commit 63828e8
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 0 deletions.
1 change: 1 addition & 0 deletions configurations/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ install(FILES
install(DIRECTORY
labwc
firstrun
miriway
DESTINATION "${CMAKE_INSTALL_DATADIR}/lxqt/wayland"
COMPONENT Runtime
)
42 changes: 42 additions & 0 deletions configurations/miriway/lxqt-miriway-wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/sh

unset WAYLAND_DISPLAY
unset DISPLAY

port=0
while [ -e "${XDG_RUNTIME_DIR}/wayland-${port}" ]; do
let port+=1
done
wayland_display=wayland-${port}

export WAYLAND_DISPLAY=${wayland_display}

if command -v Xwayland > /dev/null
then
export MIR_SERVER_ENABLE_X11=1
MIR_SERVER_XWAYLAND_PATH=$(which Xwayland)
export MIR_SERVER_XWAYLAND_PATH
fi

export MIRIWAY_CONFIG_DIR="lxqt"

miriway-shell --display-config=static="${XDG_CONFIG_HOME}/miriway-shell.display-config" --add-wayland-extensions=all --lockscreen-app="lxqt-leave --lockscreen" &
miriway_pid=$!

# Wait until the server starts
until [ -O "${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY}" ]
do
if ! kill -0 ${miriway_pid} &> /dev/null
then
echo "ERROR: miriway-shell [pid=${miriway_pid}] is not running"
exit 1
fi
inotifywait -qq --timeout 5 --event create "$(dirname "${XDG_RUNTIME_DIR}/${WAYLAND_DISPLAY}")"
done

lxqt-session "$@"
lxqt_session_exit_code=$?

kill $miriway_pid

exit $lxqt_session_exit_code
21 changes: 21 additions & 0 deletions configurations/miriway/miriway-shell.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
x11-window-title=LXQt (Miriway)
idle-timeout=600

shell-component=dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_SESSION_TYPE XDG_CURRENT_DESKTOP

shell-alt=Space:lxqt-runner
shell-alt=F2:lxqt-runner
shell-meta=l:lxqt-leave --lockscreen

meta=p:pcmanfm-qt
meta=Return:qterminal
meta=f:featherpad

meta=Left:@dock-left
meta=Right:@dock-right
meta=Space:@toggle-maximized
meta=Home:@workspace-begin
meta=End:@workspace-end
meta=Page_Up:@workspace-up
meta=Page_Down:@workspace-down
ctrl-alt=BackSpace:@exit
9 changes: 9 additions & 0 deletions startlxqtwayland.in
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,15 @@ elif [ "$COMPOSITOR" = "kwin_wayland" ]; then
# WARNING: Option '--no-kactivities' can result in crashes with animations and corner actions.
exec ${COMPOSITOR}_wrapper --exit-with-session lxqt-session --xwayland

elif [ "$COMPOSITOR" = "miriway" ]; then
export XDG_CURRENT_DESKTOP="LXQt:$COMPOSITOR:mir"
if [ ! -f "$XDG_CONFIG_HOME/lxqt/miriway-shell.config" ]; then
cp "$share_dir"/lxqt/wayland/miriway/miriway-shell.config "$XDG_CONFIG_HOME/lxqt/miriway-shell.config"
if echo "$valid_layouts" | grep -q "$trylayout"; then
echo "keymap=$trylayout" >> "$XDG_CONFIG_HOME/lxqt/miriway-shell.config"
fi
exec "${share_dir}/lxqt/wayland/miriway/lxqt-${COMPOSITOR}-wrapper"

elif [ "$COMPOSITOR" = "wayfire" ]; then
if [ ! -f "$XDG_CONFIG_HOME/lxqt/wayland/lxqt-wayfire.ini" ]; then
cp "$share_dir"/lxqt/wayland/lxqt-wayfire.ini "$XDG_CONFIG_HOME"/lxqt/wayland/
Expand Down

0 comments on commit 63828e8

Please sign in to comment.