alukongfu 最近的时间轴更新
alukongfu

alukongfu

V2EX 第 407796 号会员,加入于 2019-04-30 09:28:12 +08:00
alukongfu 最近回复了
远程办公吗?
304 天前
回复了 Masterlxj 创建的主题 ? Python ? 想交流一个 CloudFlare 反爬问题
可以参考一下这个 @Masterlxj
304 天前
回复了 Masterlxj 创建的主题 ? Python ? 想交流一个 CloudFlare 反爬问题
如果去掉黄色,你觉得你还会去看吗?
307 天前
回复了 Colderer 创建的主题 ? 职场话题 ? 公司裁员用抽签方式定名单
应该增加随机性,建议老板自掏腰包买彩票给员工,中了的员工就走人。
314 天前
回复了 AA5DE3F034ACCB9E 创建的主题 ? iCloud ? icloud 家人共享,位置共享的问题
关闭定位
@alukongfu 自动检测屏幕接口是否连接的脚本,之前用来插入副屏后自适应分辨率。
#!/bin/bash
export MONITOR2=/sys/class/drm/card0-HDMI-A-1/status

#while inotifywait -e modify,create,delete,open,close,close_write,access $MONITOR2;

while true
do
dmode="$(cat $MONITOR2)"
if [ "${dmode}" = disconnected ]
then
/usr/bin/xrandr --output eDP1 --auto --primary
# echo "${dmode}"
elif [ "${dmode}" = "connected" ]
then
/usr/bin/xrandr --output eDP1 --off --output HDMI1 --auto --primary
# echo "${dmode}"
fi

sleep 5s
done
OP 是不是向在接入新屏幕后自动运行 xrandr 呢?
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   6223 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 03:35 · PVG 11:35 · LAX 20:35 · JFK 23:35
Developed with CodeLauncher
? Do have faith in what you're doing.


http://www.vxiaotou.com