mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-06-01 12:57:37 +02:00
improve map-touch-display
This commit is contained in:
parent
0a1d7f5dac
commit
44d060c036
|
@ -2,16 +2,12 @@
|
|||
#lang racket
|
||||
|
||||
;; This script is used to map the xinput device(s) of my external touch
|
||||
;; display to the correspondung X screen.
|
||||
;; display to the corresponding X screen.
|
||||
|
||||
(define screen
|
||||
(vector-ref (current-command-line-arguments) 0))
|
||||
(define screen (command-line #:args (screen) screen))
|
||||
|
||||
(define output
|
||||
(with-output-to-string
|
||||
(λ () (system* (find-executable-path "xinput") "--list"))))
|
||||
(define cmd-outp (with-output-to-string (λ () (system* (find-executable-path "xinput") "--list"))))
|
||||
|
||||
(for ([line (string-split output "\n")])
|
||||
(when (string-contains? line "TSTP MTouch")
|
||||
(match-define (list _ id) (regexp-match #px"id=(\\d+)" line))
|
||||
(system* (find-executable-path "xinput") "map-to-output" id screen)))
|
||||
(for ([line (string-split cmd-outp "\n")] #:when (string-contains? line "TSTP MTouch"))
|
||||
(match-define (list _ id) (regexp-match #px"id=(\\d+)" line))
|
||||
(system* (find-executable-path "xinput") "map-to-output" id screen))
|
||||
|
|
Loading…
Reference in a new issue