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]

你可能感兴趣的:(Unix,shell)