argus.py 可以仍是昔日素心悠游的少年

argus.py 可以仍是昔日素心悠游的少年


有的时候, 会扫一眼来信的签名。


有的是纯工作单位和联系电话, 如偶像的; 有的啥也没有, 连“这个人很懒,
什么也没有留下“也没有; 有的是莫名其妙的名字, 也不知道啥意思, 如果来
信是讨教问题的, 就感觉像是蒙个猪头的家伙闯入你家门, 问“你说我这病咋治
“, 你说我要把下脉, 对面的先生大摇其头, 说可不能让你见了我的真面目。


签名各种各样, 没创意的居多。而建一每次的签名总能让我目光停留。 所以,
私底下以为, 这个工程师的心底里是个文学青年。


建一的某个签名是: 我已不是昔日素心悠游的少年。


其实, 你可以是的, 永远都可以。


We carry our laptop computer to different places, such as workshop,
office, home, etc., where we connect it with different monitors. We
click the mouse to setup the resolution, position, ratation for every
monitor repeatly.


With Arugus, the untility for saving your current setting of
display/monitor, you can collect automaticlly for all the
display/monitor connected to your computer into a shell code, which
later you can run to restore the setting.


What you need is just remember the name of the shell code, which
brings you all the information of your favorate working environment as
soon as you run it.


An simple example is as the follow.


I have a Dell display in 23 inch, which can rotate vertically for
programmer easilly browsing a large scale of code with out pagedown
or pageup, as well as rotate horizantally for watching movie without
black edge.


I turn the monitor left, before setting up the layout (position and
mode and rotation) for it with System->Monitors in Ubuntu. Then, I run


: ~ $ arugus.py -s programming.sh


to cteate a file named programming.sh excutable.


: ~ $ cat programming.sh
: #!/bin/bash
: xrandr --output VGA1 --pos 0x0 --mode 1920x1080 --rotate left
: xrandr --output LVDS1 --pos 0x1920 --mode 1280x800 --rotate normal


I turn the monitor horizatally, then also set up the current layout
manually with GUI System->Monitors. I save the current setting as movie.sh.




: ~ $ arugus.py -s movie.sh
: ~ $ cat movie.sh
: #!/bin/bash
: xrandr --output VGA1 --pos 0x0 --mode 1920x1080 --rotate normal
: xrandr --output LVDS1 --pos 248x1080 --mode 1280x800 --rotate normal


Once completed the steps above, we can switch the working condition
with running the corresponding shell code. 


When I watch movie,


: ~$ ./movie.sh


when I input code,


: ~$ ./programming.sh


In my office, in my classroom with projector, or in my workshop, I can
switch my laptop to the suitable state.


We can return whatever we have been, if we remember. Yesterday once
more.


Dependency:


xrandr, you usually have.


python, you usually have.


bash, you usually have.

 

[https://github.com/younggift/argus]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值