Fix distorted screen when opening files in GUI

Fixes: https://github.com/sayanarijit/xplr/issues/111
pull/113/head v0.5.8
Arijit Basu 3 years ago committed by Arijit Basu
parent 8ddc000895
commit 2437fd67cf

2
Cargo.lock generated

@ -1630,7 +1630,7 @@ dependencies = [
[[package]]
name = "xplr"
version = "0.5.7"
version = "0.5.8"
dependencies = [
"anyhow",
"chrono",

@ -1,6 +1,6 @@
[package]
name = "xplr"
version = "0.5.7" # Update config.yml, config.rs and default.nix
version = "0.5.8" # Update config.yml, config.rs and default.nix
authors = ["Arijit Basu <sayanarijit@gmail.com>"]
edition = "2018"
description = "A hackable, minimal, fast TUI file explorer"

@ -1020,6 +1020,7 @@ impl Config {
pub fn is_compatible(&self) -> Result<bool> {
let result = match self.parsed_version()? {
(0, 5, 8) => true,
(0, 5, 7) => true,
(0, 5, 6) => true,
(0, 5, 5) => true,
@ -1036,7 +1037,8 @@ impl Config {
pub fn upgrade_notification(&self) -> Result<Option<&str>> {
let result = match self.parsed_version()? {
(0, 5, 7) => None,
(0, 5, 8) => None,
(0, 5, 7) => Some("App version updated. Fixed distorted screen when opening files in GUI"),
(0, 5, 6) => Some("App version updated. Fixed piping and in-built terminal support"),
(0, 5, 5) => Some("App version updated. Significant reduction in CPU usage"),
(0, 5, 4) => Some("App version updated. Significant reduction in CPU usage"),

@ -1,4 +1,4 @@
version: v0.5.7
version: v0.5.8
general:
show_hidden: false
read_only: false
@ -926,9 +926,20 @@ modes:
help: open in gui
messages:
- BashExecSilently: |
OPENER="$(which xdg-open)"
${OPENER:-open} "${XPLR_FOCUS_PATH:?}" &> /dev/null
if [ -z "$OPENER" ]; then
if command -v xdg-open; then
OPENER=xdg-open
elif command -v open; then
OPENER=open
else
echo 'LogError: $OPENER not found' >> "${XPLR_PIPE_MSG_IN:?}"
exit 1
fi
fi
$OPENER "${XPLR_FOCUS_PATH:?}" &> /dev/null &
- SwitchMode: default
- ClearScreen
- Refresh
on_alphabet: null
on_number: null

Loading…
Cancel
Save