作为一名windows重度用户,娱乐工作几乎都在windows操作系统下度过,又不舍得有些linux操作系统中令人难以割爱的操作,需要对windows”私人订制”一下,Just for fun.
Cygwin中文乱码
(Windows10)在cygwin的终端里配置Options时,无论怎么配置,总是出现要么显示系统文件名(ls等命令)的中文出现乱码,要么使用系统打印命令(ipconfig等命令)的中文输出乱码。最终得到如下的解决方案,在用户家目录下的.bash_profile
文件后面添加如下配置:1
2
3
4export LC_CTYPE=zh_CN.GBK
export LANG=zh_CN.GBK
export OUTPUT_CHARSET=GBK
export LESSCHARSET=latin1
也可以将cygwin的home目录指定到windows中的用户主目录下,将cgwin中
/home/{User}
路径下的文件剪切到windows的用户目录下(备份已有的cygwin内容),删除cygwin中的/home/{User}
目录。使用ln
创建软连接将windows下的用户目录链接到cygwin下的/home/{user}
:
1 ln -s /cygdrive/c/User/{user} /home/{user}
ls等命令高亮
还是用户家目录,在文件.bashrc
中对已有的配置进行修改,将已注释掉的相关别名全部打开,其他的别名也可根据自己的需要开放。
如ls相关命令:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18# Default to human readable figures
alias df='df -h'
alias du='du -h'
# Misc :)
alias less='less -r' # raw control characters
alias whence='type -a' # where, of a sort
alias grep='grep --color' # show differences in colour
alias egrep='egrep --color=auto' # show differences in colour
alias fgrep='fgrep --color=auto' # show differences in colour
# Some shortcuts for different directory listings
alias ls='ls -hF --color=tty' # classify files in colour
alias dir='ls --color=auto --format=vertical'
alias vdir='ls --color=auto --format=long'
alias ll='ls -l' # long list
alias la='ls -A' # all but . and ..
alias l='ls -CF' #
改变系统编辑框颜色
偏爱豆绿色,因为护眼。运行中输入regedit,进入注册表编辑器
修改HKEY_CURRENT_USER/Control Panel/Colors
和HKEY_CURRENT_USER/Control Panel/Desktops/Colors
下的Windows的值为“204 238 208”。
若只完成以上步骤,休眠唤醒后仍会失效,再修改以下项成对应的十六进制颜色编码
即\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\DefaultColors\Standard
项下的Windows
的值设置为cceece
。