back to nvim
This commit is contained in:
+1
@@ -0,0 +1 @@
|
|||||||
|
runtime
|
||||||
@@ -83,7 +83,7 @@ window-rule {
|
|||||||
match app-id="at.yrlf.wl_mirror"
|
match app-id="at.yrlf.wl_mirror"
|
||||||
|
|
||||||
// default-column-width { proportion 1.0; }
|
// default-column-width { proportion 1.0; }
|
||||||
open-floating true
|
// open-floating true
|
||||||
// open-maximized-to-edges true
|
// open-maximized-to-edges true
|
||||||
// open-on-output "HDMI-A-1"
|
// open-on-output "HDMI-A-1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
# Play the video embedded in a live photo file (or so-called Motion Photo).
|
# Play the video embedded in a live photo file (or so-called Motion Photo).
|
||||||
# The literal tags differ between manufacturers, so this script looks for
|
# The literal tags differ between manufacturers, so this script looks for
|
||||||
# the common 'ftyp' box that indicates the start of an MP4 video stream
|
# the common 'ftyp' box that indicates the start of an MP4 video stream
|
||||||
# instead of "MotionPhotoVideo" or "EmbeddedVideo" or something.
|
# instead of "MotionPhotoVideo" or "EmbeddedVideo" or anything else.
|
||||||
#
|
#
|
||||||
# Requirements:
|
# Requirements:
|
||||||
# - mpv or vlc media player installed.
|
# - mpv or vlc.
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
# - playlive <file>
|
# - playlive <file>
|
||||||
@@ -22,15 +22,6 @@ if [ -z "${1:-}" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
play_cmd=()
|
|
||||||
if command -v mpv >/dev/null 2>&1; then
|
|
||||||
play_cmd=(mpv --title="Live Photo View" --keep-open=no --loop-file=no --loop-playlist=no --idle=no)
|
|
||||||
elif command -v vlc >/dev/null 2>&1; then
|
|
||||||
play_cmd=(vlc --play-and-exit)
|
|
||||||
else
|
|
||||||
echo "Error: No suitable media player found." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
file="$1"
|
file="$1"
|
||||||
|
|
||||||
@@ -53,4 +44,14 @@ mp4_offset=$((offset - 3))
|
|||||||
|
|
||||||
tail -c "+$mp4_offset" "$file" > "$tmp_video"
|
tail -c "+$mp4_offset" "$file" > "$tmp_video"
|
||||||
|
|
||||||
|
play_cmd=()
|
||||||
|
if command -v mpv >/dev/null 2>&1; then
|
||||||
|
play_cmd=(mpv --title="Live Photo View: $file" --keep-open=yes --loop-file=yes --loop-playlist=no --idle=yes)
|
||||||
|
elif command -v vlc >/dev/null 2>&1; then
|
||||||
|
play_cmd=(vlc --meta-title="Live Photo View: $file")
|
||||||
|
else
|
||||||
|
echo "Error: No suitable media player found." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
"${play_cmd[@]}" "$tmp_video"
|
"${play_cmd[@]}" "$tmp_video"
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
Type=Application
|
Type=Application
|
||||||
Name=Play Live Photo
|
Name=Play Live Photo
|
||||||
Comment=Play embedded video from Live Photos
|
Comment=Play embedded video from Live Photos
|
||||||
Exec=/home/kolkas/.local/scripts/playlive %f
|
Exec=~/.local/scripts/playlive %f
|
||||||
Icon=multimedia-video-player
|
Icon=multimedia-video-player
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Categories=AudioVideo;Video;Utility;
|
Categories=AudioVideo;Video;Utility;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ fi
|
|||||||
# Triggered when SSH into the machine
|
# Triggered when SSH into the machine
|
||||||
if [[ $- == *i* ]]; then
|
if [[ $- == *i* ]]; then
|
||||||
# Set EDITOR and VISUAL, mainly for sudoedit
|
# Set EDITOR and VISUAL, mainly for sudoedit
|
||||||
for app in helix nvim vim vi nano; do
|
for app in nvim helix vim vi nano; do
|
||||||
if command -v "$app" >/dev/null 2>&1; then
|
if command -v "$app" >/dev/null 2>&1; then
|
||||||
EDITOR="$app"
|
EDITOR="$app"
|
||||||
VISUAL="$app"
|
VISUAL="$app"
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ if type -q bat
|
|||||||
end
|
end
|
||||||
|
|
||||||
# Editor
|
# Editor
|
||||||
for app in helix nvim vim vi nano
|
for app in nvim helix vim vi nano
|
||||||
if type -q $app
|
if type -q $app
|
||||||
set -x -g EDITOR $app
|
set -x -g EDITOR $app
|
||||||
set -x -g VISUAL $app
|
set -x -g VISUAL $app
|
||||||
|
|||||||
Reference in New Issue
Block a user