diff --git a/apps/windows-terminal/icon.svg b/apps/windows-terminal/icon.svg new file mode 100644 index 0000000..db435c4 --- /dev/null +++ b/apps/windows-terminal/icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/apps/windows-terminal/info b/apps/windows-terminal/info new file mode 100644 index 0000000..0783bc3 --- /dev/null +++ b/apps/windows-terminal/info @@ -0,0 +1,20 @@ +# GNOME shortcut name +NAME="Windows Terminal" + +# Used for descriptions and window class +FULL_NAME="The new Windows Terminal" + +# The executable inside windows +WIN_EXECUTABLE="explorer.exe" + +UWP_NAME="Microsoft.WindowsTerminal" + +PACKAGE_FAMILY_NAME="Microsoft.WindowsTerminal_8wekyb3d8bbwe" + +APP_ID="App" + +# GNOME categories +CATEGORIES="WinApps;Windows" + +# GNOME mimetypes +MIME_TYPES="" diff --git a/bin/winapps b/bin/winapps index 6cedf12..b61ca7b 100755 --- a/bin/winapps +++ b/bin/winapps @@ -95,13 +95,26 @@ elif [ "${1}" != "install" ]; then echo "You need to run 'install.sh' first." exit 1 fi + + UWP_CMD="shell:appsFolder\\${PACKAGE_FAMILY_NAME}!${APP_ID}" if [ -n "${2}" ]; then dprint "HOME:${HOME}" FILE=$(echo "${2}" | sed 's|'"${HOME}"'|\\\\tsclient\\home|;s|/|\\|g;s|\\|\\\\|g') dprint "FILE:${FILE}" - xfreerdp ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} +auto-reconnect +clipboard +home-drive -wallpaper /scale:${RDP_SCALE} /dynamic-resolution /${MULTI_FLAG} /wm-class:"${FULL_NAME}" /app:"${WIN_EXECUTABLE}" /app-icon:"${ICON}" /app-cmd:"\"${FILE}\"" 1> /dev/null 2>&1 & + if [ -z "${PACKAGE_FAMILY_NAME}" ]; then + APP_ARGS="\"${FILE}\"" + else + APP_ARGS="${UWP_CMD} \"${FILE}\"" + fi + + xfreerdp ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} +auto-reconnect +clipboard +home-drive -wallpaper /scale:${RDP_SCALE} /dynamic-resolution /${MULTI_FLAG} /wm-class:"${FULL_NAME}" /app:"${WIN_EXECUTABLE}" /app-icon:"${ICON}" /app-cmd:"${APP_ARGS}" 1> /dev/null 2>&1 & else - xfreerdp ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} +auto-reconnect +clipboard +home-drive -wallpaper /scale:${RDP_SCALE} /dynamic-resolution /${MULTI_FLAG} /wm-class:"${FULL_NAME}" /app:"${WIN_EXECUTABLE}" /app-icon:"${ICON}" 1> /dev/null 2>&1 & + if [ -z "${PACKAGE_FAMILY_NAME}" ]; then + APP_ARGS="" + else + APP_ARGS="${UWP_CMD}" + fi + xfreerdp ${RDP_FLAGS} /d:"${RDP_DOMAIN}" /u:"${RDP_USER}" /p:"${RDP_PASS}" /v:${RDP_IP} +auto-reconnect +clipboard +home-drive -wallpaper /scale:${RDP_SCALE} /dynamic-resolution /${MULTI_FLAG} /wm-class:"${FULL_NAME}" /app:"${WIN_EXECUTABLE}" /app-icon:"${ICON}" /app-cmd:"${APP_ARGS}" 1> /dev/null 2>&1 & fi fi diff --git a/installer.sh b/installer.sh index e692b3d..b144f6f 100755 --- a/installer.sh +++ b/installer.sh @@ -37,7 +37,12 @@ function waFindInstalled() { cp "${DIR}/install/ExtractPrograms.ps1" ${HOME}/.local/share/winapps/ExtractPrograms.ps1 for F in $(ls "${DIR}/apps"); do . "${DIR}/apps/${F}/info" - echo "IF EXIST \"${WIN_EXECUTABLE}\" ECHO ${F} >> \\\\tsclient\\home\\.local\\share\\winapps\\installed.tmp" >> ${HOME}/.local/share/winapps/installed.bat + if [ -z "${UWP_NAME}" ]; then + echo "IF EXIST \"${WIN_EXECUTABLE}\" ECHO ${F} >> \\\\tsclient\\home\\.local\\share\\winapps\\installed.tmp" >> ${HOME}/.local/share/winapps/installed.bat + else + echo "powershell.exe if (Get-AppxPackage -Name ${UWP_NAME}) { echo ${F} >> \\\\tsclient\\home\\.local\\share\\winapps\\installed.tmp }" >> ${HOME}/.local/share/winapps/installed.bat + UWP_NAME='' + fi done; echo "powershell.exe -ExecutionPolicy Bypass -File \\\\tsclient\\home\\.local\\share\\winapps\\ExtractPrograms.ps1 > \\\\tsclient\home\\.local\\share\\winapps\\detected" >> ${HOME}/.local/share/winapps/installed.bat echo "RENAME \\\\tsclient\\home\\.local\\share\\winapps\\installed.tmp installed" >> ${HOME}/.local/share/winapps/installed.bat @@ -330,4 +335,4 @@ waConfigureWindows waConfigureApps waConfigureDetectedApps -echo "Installation complete." \ No newline at end of file +echo "Installation complete."