From 642d97a8d777238bc2c7fd5f9c84054e03952522 Mon Sep 17 00:00:00 2001 From: Uyanide Date: Thu, 1 Jan 2026 04:15:35 +0100 Subject: [PATCH] back to nvim --- config/helix/.config/helix/.gitignore | 1 + config/niri/.config/niri/config/rules.kdl | 2 +- config/scripts/.local/scripts/playlive | 23 ++++++++++--------- .../share/applications/playlive.desktop | 2 +- config/shell/.bash_profile | 2 +- config/shell/.config/fish/prev.d/env.fish | 2 +- 6 files changed, 17 insertions(+), 15 deletions(-) create mode 100644 config/helix/.config/helix/.gitignore diff --git a/config/helix/.config/helix/.gitignore b/config/helix/.config/helix/.gitignore new file mode 100644 index 0000000..9e1976b --- /dev/null +++ b/config/helix/.config/helix/.gitignore @@ -0,0 +1 @@ +runtime \ No newline at end of file diff --git a/config/niri/.config/niri/config/rules.kdl b/config/niri/.config/niri/config/rules.kdl index 6623017..9cb22be 100644 --- a/config/niri/.config/niri/config/rules.kdl +++ b/config/niri/.config/niri/config/rules.kdl @@ -83,7 +83,7 @@ window-rule { match app-id="at.yrlf.wl_mirror" // default-column-width { proportion 1.0; } - open-floating true + // open-floating true // open-maximized-to-edges true // open-on-output "HDMI-A-1" } diff --git a/config/scripts/.local/scripts/playlive b/config/scripts/.local/scripts/playlive index baa453d..4f39cdc 100755 --- a/config/scripts/.local/scripts/playlive +++ b/config/scripts/.local/scripts/playlive @@ -4,10 +4,10 @@ # 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 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: -# - mpv or vlc media player installed. +# - mpv or vlc. # # Usage: # - playlive @@ -22,15 +22,6 @@ if [ -z "${1:-}" ]; then exit 1 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" @@ -53,4 +44,14 @@ mp4_offset=$((offset - 3)) 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" \ No newline at end of file diff --git a/config/scripts/.local/share/applications/playlive.desktop b/config/scripts/.local/share/applications/playlive.desktop index ea4ef85..951b673 100644 --- a/config/scripts/.local/share/applications/playlive.desktop +++ b/config/scripts/.local/share/applications/playlive.desktop @@ -2,7 +2,7 @@ Type=Application Name=Play Live Photo Comment=Play embedded video from Live Photos -Exec=/home/kolkas/.local/scripts/playlive %f +Exec=~/.local/scripts/playlive %f Icon=multimedia-video-player Terminal=false Categories=AudioVideo;Video;Utility; diff --git a/config/shell/.bash_profile b/config/shell/.bash_profile index 8d5b7ec..e500aac 100644 --- a/config/shell/.bash_profile +++ b/config/shell/.bash_profile @@ -48,7 +48,7 @@ fi # Triggered when SSH into the machine if [[ $- == *i* ]]; then # 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 EDITOR="$app" VISUAL="$app" diff --git a/config/shell/.config/fish/prev.d/env.fish b/config/shell/.config/fish/prev.d/env.fish index 8e53ed7..9366544 100644 --- a/config/shell/.config/fish/prev.d/env.fish +++ b/config/shell/.config/fish/prev.d/env.fish @@ -11,7 +11,7 @@ if type -q bat end # Editor -for app in helix nvim vim vi nano +for app in nvim helix vim vi nano if type -q $app set -x -g EDITOR $app set -x -g VISUAL $app