Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
crschnick committed Aug 9, 2023
1 parent c84db86 commit 06f62c9
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ protected Comp<?> createName() {
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;
}

Expand Down
11 changes: 11 additions & 0 deletions app/src/main/java/io/xpipe/app/core/AppMainWindow.java
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -247,6 +249,15 @@ private void setupContent(Comp<?> content) {
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();
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/io/xpipe/app/fxcomps/util/Shortcuts.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ public void handle(KeyEvent ke) {
}

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);
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/io/xpipe/app/util/DesktopShortcuts.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ private static void createMacOSShortcut(String target, String name) throws Excep
var base = DesktopHelper.getDesktopDirectory().resolve(name + ".app");
var content = String.format(
"""
#!/bin/bash
#!/usr/bin/env sh
"%s" open %s
""",
exec, target);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
26 changes: 0 additions & 26 deletions get-xpipe.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
36 changes: 20 additions & 16 deletions get-xpipe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 "$?"
Expand Down
2 changes: 1 addition & 1 deletion setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

which sdk
if [ $? -ne 0 ]; then
Expand Down

0 comments on commit 06f62c9

Please sign in to comment.