每当滑块移动时从 YAD 滑块传递变量,而不单击确定

Pass variable from YAD slider bar whenever slider is moved, without clicking Ok

我是 运行 Arch Linux,拥有所有最新更新,并且安装了一个简单有效的程序 sct 让我可以调整屏幕色温。来自 https://github.com/faf0/sct.

我使用 YAD (Yet Another Dialog) 调整发送到 sct 的变量如下

#! /bin/bash

VALUE=$(yad --title="Select Colour Temperature" \
--geometry=800x100+280+200 --window-icon="colour_temp.png" \
--scale \
--mark=NIGHT:3000 --mark=MID:5000 --mark=DAY:6500 \
--value="2400" --min-value="2000" --max-value="6500" --step="100")

#--print-partial. This option seems of no help; if run from the command prompt partial values are dumped after the 'Ok' dialog clicked.

./sct/xsct $VALUE

当我在 YAD gui 上单击“确定”时,这让我可以看到所选色温的结果。

如何在不单击“确定”的情况下移动滑块时动态更新屏幕色温?

到今天为止,使用 yad 是不可能的。 yad 显示对话框和 returns。您可以根据自己的目的编写自己的 GTK+ 对话框应用程序。