summaryrefslogtreecommitdiff
path: root/xwindowURI
diff options
context:
space:
mode:
authorepoch <epoch@enzo.thebackupbox.net>2022-02-24 01:35:45 +0000
committerepoch <epoch@enzo.thebackupbox.net>2022-02-24 01:35:45 +0000
commitf43a0d0951c3806da52bdee6c944268a59c28f73 (patch)
treef069b66a562902e17e7718d416779d408c3c6ca3 /xwindowURI
parentb6e986054a5e448b6ec2254bfe26b1bb90f260cb (diff)
downloaduritools-f43a0d0951c3806da52bdee6c944268a59c28f73.tar.gz
uritools-f43a0d0951c3806da52bdee6c944268a59c28f73.zip
xwindowURI now lives in xtools repo
Diffstat (limited to 'xwindowURI')
-rwxr-xr-xxwindowURI35
1 files changed, 0 insertions, 35 deletions
diff --git a/xwindowURI b/xwindowURI
deleted file mode 100755
index 6e9235a..0000000
--- a/xwindowURI
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-if [ ! "$1" ];then
- id="$(xwinID)"
-else
- id="$1"
-fi
-
-class=$(xclass -id "$id")
-#echo "$class"
-
-case "$class" in
-mupdf)
- basename="$(xwintitle "$id" | rev | cut '-d ' -f5- | rev)"
- echo "b: $basename"
- page="$(xwintitle "$id" | tr ' ' '\n' | grep '[0-9][0-9]*/[0-9][0-9]*' | cut -d/ -f1)"
- echo "$page"
- for PID in $(pgrep mupdf);do
- argv1="$(cat /proc/$PID/cmdline | tr '\0' '\n' | sed -n 2p)"
- cd "$(readlink /proc/$PID/cwd)"
- abspath="$(normalpath "$argv1")"
- echo "a: $abspath"
- echo "b: $basename"
- if [ "$(basename "$abspath")" = "$basename" ];then
- printf "file://%s#page=%s\n" "$(uriescape "$abspath")" "$page"
- exit 0
- fi
- done
- ;;
-Navigator)
- xwintitle "$id" | rev | cut '-d ' -f4 | rev
- ;;
-*)
- echo "class: $class"
- ;;
-esac