#!/bin/bash set -e if [ ! -e ~/.config ]; then mkdir ~/.config; fi shell_components="lxqt-policykit-agent qterminal lxqt-runner lxqt-panel swaybg lxqt-notificationd" shell_packages="lxqt-policykit qterminal lxqt-runner lxqt-panel lubuntu-artwork swaybg lxqt-notificationd" miriway_config="${XDG_CONFIG_HOME:-$HOME/.config}/miriway-shell.config" miriway_settings="${XDG_CONFIG_HOME:-$HOME/.config}/miriway-shell.settings" unset need_install for component in $shell_components do if ! command -v "$component" > /dev/null then echo May need to install "$component" need_install=1 fi done if [ -e "${miriway_config}" ]; then echo WARNING Overwriting "${miriway_config}" fi if [ -e "${miriway_settings}" ]; then echo WARNING Overwriting "${miriway_settings}" fi read -p"OK to proceed? [y/n] " yn case $yn in [Yy] ) echo Proceeding...;; [Nn] ) exit 1;; esac if [ -n "$need_install" ] then if command -v apt > /dev/null then sudo apt install $shell_packages fonts-font-awesome lxqt-branding-debian elif command -v dnf > /dev/null then sudo dnf install $shell_packages fontawesome-fonts elif command -v apk > /dev/null then sudo apk add $shell_packages font-awesome else echo ERROR: I cannot find an install tool for this system fi fi # Ensure we have a config file with the fixed options cat < "${miriway_config}" x11-window-title=LXQt/Miriway idle-timeout=600 env-hacks=MIR_ANCHOR_RECTANGLE_UNCONSTRAINED=1 app-env-amend=XDG_SESSION_TYPE=wayland:GTK_USE_PORTAL=0:XDG_CURRENT_DESKTOP=LXQt:GTK_A11Y=none shell-component=swaybg --mode fill --output '*' --image /usr/share/lubuntu/wallpapers/lubuntu-default-wallpaper.jpg shell-component=miriway-unsnap lxqt-notificationd shell-component=miriway-unsnap lxqt-policykit-agent shell-component=miriway-unsnap lxqt-panel EOT cat < "${miriway_settings}" command_ctrl_alt=t:miriway-unsnap qterminal command_shell_meta=a:miriway-unsnap lxqt-runner command_shell_plain=F12:miriway-unsnap qterminal -d command_plain=XF86MonBrightnessUp:miriway-unsnap lxqt-config-brightness -i command_plain=XF86MonBrightnessDown:miriway-unsnap lxqt-config-brightness -d command_meta=Left:@dock-left command_meta=Right:@dock-right command_meta=Space:@toggle-maximized command_meta=Home:@workspace-begin command_meta=End:@workspace-end command_meta=Page_Up:@workspace-up command_meta=Page_Down:@workspace-down command_ctrl_alt=BackSpace:@exit EOT