Ok No idea what going on with the attachments other than
PKGBUILD
# Maintainer: Bruno Pagani <[email protected]>
# Maintainer: Caleb Maclennan <[email protected]>
pkgname=pqiv
pkgver=2.12
pkgrel=5
pkgdesc='Powerful image viewer with minimal UI'
arch=(x86_64)
url="https://github.com/phillipberndt/pqiv"
license=(GPL3)
depends=(gtk3 gdk-pixbuf2 glib2 cairo)
optdepends=(
'ffmpeg: rudimentary video support'
'libarchive: archives and cbX comic book support'
'libspectre: PS/EPS support'
'libwebp: WebP support'
'imagemagick: support for various images formats like PSD'
'poppler-glib: rudimentary PDF support'
)
makedepends=(ffmpeg libarchive libspectre libwebp imagemagick poppler-glib)
source=(${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz
keep-above.patch)
sha256sums=('1538128c88a70bbad2b83fbde327d83e4df9512a2fb560eaf5eaf1d8df99dbe5'
'614b0851f36c9365b5e68bbda8138cdd584c7ef4e6e664991631087af1ff1d11')
prepare() {
cd ${pkgname}-${pkgver}
patch -p1 < ../keep-above.patch
}
build() {
cd ${pkgname}-${pkgver}
./configure --backends-build=shared
make
}
package() {
cd ${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
}
keep-above.patch
Common subdirectories: a/backends and b/backends
Common subdirectories: a/.github and b/.github
diff '--color=auto' -u a/GNUmakefile b/GNUmakefile
--- a/GNUmakefile 2020-11-29 11:51:17.000000000 +0000
+++ b/GNUmakefile 2022-09-14 14:47:18.675484079 +0100
@@ -96,7 +96,7 @@
# We need X11 to workaround a bug, see http://stackoverflow.com/questions/18647475
ifeq ($(filter x11, $(shell $(PKG_CONFIG) --errors-to-stdout --variable=target gtk+-$(GTK_VERSION).0; $(PKG_CONFIG) --errors-to-stdout --variable=targets gtk+-$(GTK_VERSION).0)), x11)
- LIBS+=x11
+ LIBS+=x11 xext
endif
# Add backend-specific libraries and objects
Common subdirectories: a/lib and b/lib
diff '--color=auto' -u a/pqiv.c b/pqiv.c
--- a/pqiv.c 2020-11-29 11:51:17.000000000 +0000
+++ b/pqiv.c 2022-09-14 14:47:54.108817635 +0100
@@ -57,6 +57,7 @@
#ifdef GDK_WINDOWING_X11
#include <gdk/gdkx.h>
#include <X11/Xlib.h>
+ #include <X11/extensions/shape.h>
#include <X11/Xutil.h>
#include <cairo/cairo-xlib.h>
@@ -293,10 +294,12 @@
gboolean option_start_fullscreen = FALSE;
gdouble option_initial_scale = 1.0;
gboolean option_start_with_slideshow_mode = FALSE;
+gboolean option_click_through = FALSE;
gboolean option_sort = FALSE;
enum { NAME, MTIME } option_sort_key = NAME;
gboolean option_shuffle = FALSE;
gboolean option_transparent_background = FALSE;
+gboolean option_keep_above = FALSE;
gboolean option_watch_directories = FALSE;
gboolean option_wait_for_images_to_appear = FALSE;
gboolean option_fading = FALSE;
@@ -394,6 +397,7 @@
// implemented for option parsing.
GOptionEntry options[] = {
{ "transparent-background", 'c', 0, G_OPTION_ARG_NONE, &option_transparent_background, "Borderless transparent window", NULL },
+ { "keep-above", 0,0, G_OPTION_ARG_NONE, &option_keep_above, "Keep window above others", NULL },
{ "slideshow-interval", 'd', 0, G_OPTION_ARG_DOUBLE, &option_slideshow_interval, "Set slideshow interval", "n" },
{ "fullscreen", 'f', 0, G_OPTION_ARG_NONE, &option_start_fullscreen, "Start in fullscreen mode", NULL },
{ "fade", 'F', 0, G_OPTION_ARG_NONE, (gpointer)&option_fading, "Fade between images", NULL },
@@ -408,6 +412,7 @@
{ "scale-images-up", 't', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, &option_scale_level_callback, "Scale images up to fill the whole screen", NULL },
{ "window-title", 'T', 0, G_OPTION_ARG_STRING, &option_window_title, "Set the title of the window. See manpage for available variables.", "TITLE" },
{ "zoom-level", 'z', 0, G_OPTION_ARG_DOUBLE, &option_initial_scale, "Set initial zoom level (1.0 is 100%)", "FLOAT" },
+ { "click-through", 0, 0, G_OPTION_ARG_NONE, &option_click_through, "Window does not accept mouse input", NULL },
#ifndef CONFIGURED_WITHOUT_EXTERNAL_COMMANDS
{ "command-1", '1', 0, G_OPTION_ARG_STRING, &external_image_filter_commands[0], "Bind the external COMMAND to key 1. See manpage for extended usage (commands starting with `>' or `|'). Use 2..9 for further commands.", "COMMAND" },
@@ -6746,6 +6751,20 @@
}
#endif
+ if(option_click_through) {
+ Display *display = GDK_SCREEN_XDISPLAY(gdk_screen_get_default());
+ unsigned long window_xid = gdk_x11_window_get_xid(gtk_widget_get_window(GTK_WIDGET(main_window)));
+ Region region = XCreateRegion();
+ XRectangle rectangle = { 0, 0, 1, 1 };
+ XUnionRectWithRegion(&rectangle, region, region);
+ XShapeCombineRegion(display, window_xid, ShapeInput, 0, 0, region, ShapeSet);
+ XDestroyRegion(region);
+ }
+
+ if(option_keep_above) {
+ gtk_window_set_keep_above(main_window, TRUE);
+ }
+
return FALSE;
}/*}}}*/
void handle_input_event(guint key_binding_value);
@@ -7026,7 +7045,6 @@
if(option_transparent_background) {
gtk_window_set_decorated(main_window, !gtk_window_get_decorated(main_window));
}
-
// All other bindings are only handled in fullscreen.
return FALSE;
}
Copy and save into appropriately named files.
You'll most likely need to run makepkg -g
first and replace the sha256sums part of the PKGBUILD with the output.
If anyone knows of a ready made package, preferably qt based, that can do this (image, always on top, no decorations) please do let me know. I can't find one.