diff --git a/app/src/main/java/io/xpipe/app/comp/storage/store/StoreEntryComp.java b/app/src/main/java/io/xpipe/app/comp/storage/store/StoreEntryComp.java index efe9e5cb..d18e5973 100644 --- a/app/src/main/java/io/xpipe/app/comp/storage/store/StoreEntryComp.java +++ b/app/src/main/java/io/xpipe/app/comp/storage/store/StoreEntryComp.java @@ -153,6 +153,7 @@ public abstract class StoreEntryComp extends SimpleComp { name.apply(struc -> struc.get().setTextOverrun(OverrunStyle.CENTER_ELLIPSIS)) .apply(struc -> struc.get().setPadding(new Insets(5, 5, 5, 0))); name.apply(s -> AppFont.header(s.get())); + name.styleClass("name"); return name; } diff --git a/app/src/main/java/io/xpipe/app/core/AppMainWindow.java b/app/src/main/java/io/xpipe/app/core/AppMainWindow.java index d3b39b1c..fb7d1862 100644 --- a/app/src/main/java/io/xpipe/app/core/AppMainWindow.java +++ b/app/src/main/java/io/xpipe/app/core/AppMainWindow.java @@ -1,11 +1,13 @@ package io.xpipe.app.core; +import io.xpipe.app.core.mode.OperationMode; import io.xpipe.app.fxcomps.Comp; import io.xpipe.app.issue.ErrorEvent; import io.xpipe.app.issue.TrackEvent; import io.xpipe.app.prefs.AppPrefs; import io.xpipe.app.prefs.CloseBehaviourAlert; import io.xpipe.app.util.ThreadHelper; +import io.xpipe.core.process.OsType; import javafx.beans.property.BooleanProperty; import javafx.beans.property.SimpleBooleanProperty; import javafx.geometry.Rectangle2D; @@ -247,6 +249,15 @@ public class AppMainWindow { contentR.prefWidthProperty().bind(stage.getScene().widthProperty()); contentR.prefHeightProperty().bind(stage.getScene().heightProperty()); + if (OsType.getLocal().equals(OsType.LINUX)) { + stage.getScene().addEventFilter(KeyEvent.KEY_PRESSED, event -> { + if (event.getCode().equals(KeyCode.W) && event.isControlDown()) { + event.consume(); + OperationMode.close(); + } + }); + } + stage.getScene().addEventHandler(KeyEvent.KEY_PRESSED, event -> { if (AppProperties.get().isDeveloperMode() && event.getCode().equals(KeyCode.F6)) { var newR = content.createRegion(); diff --git a/app/src/main/java/io/xpipe/app/fxcomps/util/Shortcuts.java b/app/src/main/java/io/xpipe/app/fxcomps/util/Shortcuts.java index b0a0129c..f39faea8 100644 --- a/app/src/main/java/io/xpipe/app/fxcomps/util/Shortcuts.java +++ b/app/src/main/java/io/xpipe/app/fxcomps/util/Shortcuts.java @@ -39,14 +39,14 @@ public class Shortcuts { } if (scene.get() != null) { - scene.get().removeEventHandler(KeyEvent.KEY_PRESSED, filter); + scene.get().removeEventFilter(KeyEvent.KEY_PRESSED, filter); SHORTCUTS.remove(region); scene.set(null); } if (s != null) { scene.set(s); - s.addEventHandler(KeyEvent.KEY_PRESSED, filter); + s.addEventFilter(KeyEvent.KEY_PRESSED, filter); } }); } diff --git a/app/src/main/java/io/xpipe/app/util/DesktopShortcuts.java b/app/src/main/java/io/xpipe/app/util/DesktopShortcuts.java index cf3f5a21..72b16199 100644 --- a/app/src/main/java/io/xpipe/app/util/DesktopShortcuts.java +++ b/app/src/main/java/io/xpipe/app/util/DesktopShortcuts.java @@ -50,7 +50,7 @@ public class DesktopShortcuts { var base = DesktopHelper.getDesktopDirectory().resolve(name + ".app"); var content = String.format( """ - #!/bin/bash + #!/usr/bin/env sh "%s" open %s """, exec, target); diff --git a/app/src/main/resources/io/xpipe/app/resources/style/store-entry-comp.css b/app/src/main/resources/io/xpipe/app/resources/style/store-entry-comp.css index fa6c5c14..77d78639 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/store-entry-comp.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/store-entry-comp.css @@ -4,20 +4,17 @@ } .store-entry-grid:failed .jfx-text-field { --fx-text-fill: red; +-fx-text-fill: #ee4829; } -.store-entry-grid:incomplete .jfx-text-field { --fx-text-fill: gray; +.store-entry-grid:incomplete .name { +-fx-text-fill: #ee4829; } .store-entry-grid:incomplete .summary { --fx-text-fill: gray; +-fx-text-fill: #ee4829; } .store-entry-grid:incomplete .information { --fx-text-fill: gray; -} -.store-entry-grid:incomplete .date { --fx-text-fill: gray; +-fx-text-fill: #ee4829; } .store-entry-grid:incomplete .icon { -fx-opacity: 0.5; diff --git a/get-xpipe.ps1 b/get-xpipe.ps1 index 9947f5c3..38900612 100644 --- a/get-xpipe.ps1 +++ b/get-xpipe.ps1 @@ -5,32 +5,6 @@ .DESCRIPTION Retrieves the XPipe msi for the latest or a specified version, and downloads and installs the application to the local machine. - - .NOTES - ===================================================================== - Copyright 2023 Christopher Schnick - Copyright 2017 - 2020 Chocolatey Software, Inc, and the - original authors/contributors from ChocolateyGallery - Copyright 2011 - 2017 RealDimensions Software, LLC, and the - original authors/contributors from ChocolateyGallery - at https://github.com/chocolatey/chocolatey.org - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ===================================================================== - - Environment Variables, specified as $env:NAME in PowerShell.exe and %NAME% in cmd.exe. - For an explicit version of XPipe, please set $env:xpipeVersion = 'versionnumber' - #> [CmdletBinding(DefaultParameterSetName = 'Default')] param( diff --git a/get-xpipe.sh b/get-xpipe.sh index 9332329e..977ea49e 100755 --- a/get-xpipe.sh +++ b/get-xpipe.sh @@ -186,22 +186,6 @@ return 0 2>/dev/null check_architecture "$(uname -m)" || exit 1 -if ! [ -x "$(command -v apt)" ] && ! [ -x "$(command -v rpm)" ] && [ -x "$(command -v pacman)" ]; then - info "Installing from AUR at https://aur.archlinux.org/xpipe.git" - rm -rf "/tmp/xpipe_aur" || true - git clone "https://aur.archlinux.org/xpipe.git" /tmp/xpipe_aur - cd "/tmp/xpipe_aur" - makepkg -si - launch - exit 0 -fi - -if ! [ -x "$(command -v apt)" ] && ! [ -x "$(command -v rpm)" ] && ! [ -x "$(command -v pacman)" ]; then - info "Installation is not supported on this system (no apt, rpm, pacman). Can you try a portable version of XPipe?" - info "https://github.com/xpipe-io/xpipe#portable" - exit 1 -fi - repo="https://github.com/xpipe-io/xpipe" version= while getopts 'sv:' OPTION; do @@ -221,6 +205,26 @@ while getopts 'sv:' OPTION; do esac done +if ! [ -x "$(command -v apt)" ] && ! [ -x "$(command -v rpm)" ] && [ -x "$(command -v pacman)" ]; then + info "Installing from AUR at https://aur.archlinux.org/xpipe.git" + rm -rf "/tmp/xpipe_aur" || true + if [[ -z "$version" ]] ; then + git clone "https://aur.archlinux.org/xpipe.git" /tmp/xpipe_aur + else + git clone --branch "$version" "https://aur.archlinux.org/xpipe.git" /tmp/xpipe_aur + fi + cd "/tmp/xpipe_aur" + makepkg -si + launch + exit 0 +fi + +if ! [ -x "$(command -v apt)" ] && ! [ -x "$(command -v rpm)" ] && ! [ -x "$(command -v pacman)" ]; then + info "Installation is not supported on this system (no apt, rpm, pacman). Can you try a portable version of XPipe?" + info "https://github.com/xpipe-io/xpipe#portable" + exit 1 +fi + download_archive="$( download_release "$repo" "$version" exit "$?" diff --git a/setup.sh b/setup.sh index 2981f49e..e88fa459 100755 --- a/setup.sh +++ b/setup.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash which sdk if [ $? -ne 0 ]; then