例)2時間後にsleepさせる場合
~$ sudo pmset schedule sleep "$(date -v +'2H' +'%D %T')"
Password:
Notification Centerへの通知項目追加
OS Xの通知センターにほぼ何でも表示できる「Today Scripts」
How To Add Absolutely Anything To Yosemite’s Notification Center
Top CPU Usage
ps xro %cpu=,comm= | while read cpu comm; ((i++<5)); do echo $cpu% $(basename "$comm"); done
Top RAM Usage
ps xmo rss=,pmem=,comm= | while read rss pmem comm; ((n++<5)); do
size="$[rss/1024]";
short=$[4-${#size}];
size="(${size}M)";
i=0;
while ((i++ < short)); do size=" $size"; done;
pmem="${pmem%%.*}"
if (($pmem >= 20)); then color=$'\e[31m';
elif (($pmem >= 10)); then color=$'\e[33m';
else color=$'\e[32m ';
fi;
echo "$color$pmem% $size $(basename "$comm")"$'\e[0m'"";
done
.screenrc
$ cat ~/.screenrc
startup_message off
chdir
termcapinfo xterm* ti@:te@
defscrollback 15000
#shell -$SHELL
#autodetach on
#defscrollback 15000
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}%{= .y}%l][%{Y}%Y/%m/%d %{Y}%c %{g}]'
screen -t ffserver 1
screen -t ffmpeg 2
screen -t rpi2 3
screen -t shell 4
#screen -X screen -t code
#screen -t log -X tail -f /var/log/syslog