Further to my previous - I've done some playing around & found away to make zathura work with tabbed under nnn preview-tabbed plugin by doing a xdotool dance, highlighted in bold below in the plugin.
It's a bit ugly but it works (for me anyway) - the sleeps are to allow focus - probably due to my tired old CPU and also I couldn't get the --syncoption under xdotool to work.
Any comments or improvements feel free to chime in.
HTH
preview-tabbed
149 MIME="$(file -bL --mime-type "$FILE")"
150 winclass="$(xdotool search --class tabbed)"
151
152 case "$MIME" in
153 video/* )
154 if type mpv >/dev/null 2>&1 ; then
155 mpv --force-window=immediate --loop-file --wid="$XID" "$FILE" &
156 else
157 term_nuke "$XID" "$FILE"
158 fi
159 ;;
175 application/pdf)
176 if type zathura >/dev/null 2>&1 ; then
177 zathura -e "$XID" "$FILE" &
178 sleep 0.5
179 xdotool windowactivate "$winclass"
180 sleep 0.2
181 xdotool key super+shift+k
182 else
183 term_nuke "$XID" "$FILE"
184 fi
185 ;;
Originally posted by @MaMiMa81 in #1793
Further to my further previous (above) - I've done some further playing around & found away to make zathura work with tabbed under nnn preview-tabbed plugin by using xdotool.
I am posting this as the ongoing issue with zathura & tabbed is unresolved - see here:
zathura - girara issues
I am using zathura-0.5.13 zathura-pdf-poppler-0.3.3 and girara-0.4.5.
The --sync flag under xdotool works for me now and with only a single 200 millisecond sleep to enable zathura to launch & consequently is somewhat less ugly.
Again changes from the currently released plugin are highlighted in bold below.
preview-tabbed
174 ;;
175 application/pdf)
176 if type zathura >/dev/null 2>&1 ; then
177 zathura -e "$XID" "$FILE" &
178 sleep 0.2
179 xdotool search --sync --onlyvisible --classname tabbed windowactivate
180 xdotool search --onlyvisible --name nnn windowactivate
181 else
182 term_nuke "$XID" "$FILE"
183 fi
184 ;;
Originally posted by @MaMiMa81 in #1793
Further to my further previous (above) - I've done some further playing around & found away to make zathura work with tabbed under nnn preview-tabbed plugin by using xdotool.
I am posting this as the ongoing issue with
zathura&tabbedis unresolved - see here:zathura - girara issues
I am using zathura-0.5.13 zathura-pdf-poppler-0.3.3 and girara-0.4.5.
The
--syncflag under xdotool works for me now and with only a single 200 millisecond sleep to enable zathura to launch & consequently is somewhat less ugly.Again changes from the currently released plugin are highlighted in bold below.
preview-tabbed174 ;;
175 application/pdf)
176 if type zathura >/dev/null 2>&1 ; then
177 zathura -e "$XID" "$FILE" &
178 sleep 0.2
179 xdotool search --sync --onlyvisible --classname tabbed windowactivate
180 xdotool search --onlyvisible --name nnn windowactivate
181 else
182 term_nuke "$XID" "$FILE"
183 fi
184 ;;