2022-03-02 06:38:50 +01:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
# -*- mode: scheme; -*-
|
|
|
|
IFS=" "
|
|
|
|
exec scsh -ll herbstluft.scm -o herbstluft -s "$0" "$@"
|
|
|
|
!#
|
|
|
|
|
|
|
|
(define tag-name "rdp")
|
|
|
|
|
2022-07-02 03:58:59 +02:00
|
|
|
(define fullscreen-arguments
|
|
|
|
'(/f "/floatbar:sticky:off,default:hidden" -toggle-fullscreen))
|
|
|
|
(define windowed-arguments
|
|
|
|
'(/w:1920 /h:1080))
|
|
|
|
|
2022-03-02 06:38:50 +01:00
|
|
|
(dynamic-wind
|
|
|
|
(lambda () (hc add ,tag-name))
|
|
|
|
(lambda ()
|
|
|
|
(hc rule once class=xfreerdp floating=on ,(string-append "tag=" tag-name) switchtag=on)
|
|
|
|
|
2022-07-02 03:58:59 +02:00
|
|
|
(let ((password
|
|
|
|
(run/string (secret-tool lookup service vpn host vpn.relic.com))))
|
|
|
|
(run (xfreerdp /u:WillemsenT /v:R-TWILLEMSE2223.re.sega.internal
|
|
|
|
/sound:sys:pulse +fonts -decorations -wallpaper /video
|
|
|
|
,(string-append "/p:" password)
|
|
|
|
,@(if (member "w" command-line-arguments)
|
|
|
|
windowed-arguments
|
|
|
|
fullscreen-arguments)))))
|
2022-03-02 06:38:50 +01:00
|
|
|
(lambda ()
|
|
|
|
(let ((current-tag (hc-get-attr 'tags.focus.name)))
|
|
|
|
(if (string= current-tag tag-name)
|
|
|
|
(hc use_previous)))
|
|
|
|
(hc merge_tag ,tag-name)))
|
|
|
|
|