diff options
author | tv <tv@krebsco.de> | 2023-09-12 12:56:39 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2023-09-13 16:23:38 +0200 |
commit | fbd485cd86c7e9984819357398f912a2d5510845 (patch) | |
tree | e1a9e2eedacfa25018d6b0eef3f4628a4d503ebc /tv/5pkgs/simple/xdpytools/src | |
parent | 5370e0485788224126861e076110ac705013d2de (diff) |
tv: emigrate
Diffstat (limited to 'tv/5pkgs/simple/xdpytools/src')
-rwxr-xr-x | tv/5pkgs/simple/xdpytools/src/xdpychvt | 11 | ||||
-rwxr-xr-x | tv/5pkgs/simple/xdpytools/src/xdpysel | 49 |
2 files changed, 0 insertions, 60 deletions
diff --git a/tv/5pkgs/simple/xdpytools/src/xdpychvt b/tv/5pkgs/simple/xdpytools/src/xdpychvt deleted file mode 100755 index 84c1907b9..000000000 --- a/tv/5pkgs/simple/xdpytools/src/xdpychvt +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/sh -# usage: xdpychvt {prev,next} -# Changes to the VT based on the selected X display. -# -# This allows switching between X servers when display names and VT numbers -# correlate. A more sophisticated tool would try to determine the correct VT -# by e.g. looking at /proc, but this might not possible when e.g. using -# security.hideProcessInformation. -# - -chvt "$(xdpysel "$1")" diff --git a/tv/5pkgs/simple/xdpytools/src/xdpysel b/tv/5pkgs/simple/xdpytools/src/xdpysel deleted file mode 100755 index e08015576..000000000 --- a/tv/5pkgs/simple/xdpytools/src/xdpysel +++ /dev/null @@ -1,49 +0,0 @@ -#! /bin/sh -# usage: xdpysel {prev,next} -# Print the number of the selected X display. - -find /tmp/.X11-unix -mindepth 1 -maxdepth 1 | -jq -Rrs --arg command "$1" ' - ( - split("\n") | - map( - select(.!="") | - match("^.*/X([0-9]+)$").captures[0].string | - tonumber - ) - ) - as $all_displays | - - ( - env.DISPLAY | - match("^:([0-9]+)(?:[.][0-9]+)?$").captures[0].string | - tonumber - ) - as $current_display | - - ($all_displays | length) as $all_displays_count | - - ($all_displays|index($current_display)) - as $current_index | - - (($current_index + 1) % $all_displays_count) - as $next_index | - - (($all_displays_count + $current_index - 1) % $all_displays_count) - as $prev_index | - - $all_displays[$prev_index] as $prev_display | - $all_displays[$next_index] as $next_display | - - { - prev: $prev_display, - next: $next_display, - }[$command] - as $result | - - if $result | type == "number" then - $result - else - "xdpysel: bad argument: \($command)\n" | halt_error(-1) - end -' |