Use dotter

This commit is contained in:
Kristofers Solo
2024-08-28 09:02:07 +03:00
parent d888080cc7
commit a42ded1119
1200 changed files with 1231 additions and 2261 deletions

23
local/bin/imv-open Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/sh
FIFO_PATH="$1"
IMAGE="$2"
MAINWINDOW="$(xdotool getactivewindow)"
IMV_PID="$(pgrep nsxiv)"
if [ ! "$IMV_PID" ]; then
nsxiv -aio "$IMAGE" &
IMV_PID=$!
fi
sleep 0.5
xdotool windowactivate "$MAINWINDOW"
while read -r path; do
imv-msg "$IMV_PID" close all
imv-msg "$IMV_PID" open "$path"
done <"$FIFO_PATH"
imv-msg "$IMV_PID" quit
[ -e "$FIFO_PATH" ] && rm -f -- "$FIFO_PATH"