예를 들어 글꼴과 같은 Linux 콘솔의 몇 가지 기본 설정을 변경할 수 있습니다 dpkg-reconfigure console-setup
.
그러나 깜박임 속도, 색상 및 모양과 같은 것을 변경하고 싶습니다 (항상 커서가 블록이되기를 원합니다). 나는 사람들이 이것을 성취하는 것을 보았다. 나는 그 사람들에게 그 방법을 물어볼 기회가 없었습니다.
터미널 에뮬레이터 창을 의미하는 것이 아니라 Linux 텍스트 콘솔을 의미합니다. Ctrl+ Alt+F-key
저는 현재 Debian 파생 제품인 Linux Mint를 사용하고 있습니다. 그래도 Fedora에서도 어떻게하는지 알고 싶습니다.
편집 : 나는 무언가에 있을지도 모른다
이 웹 사이트 에서 필요한 변경을 수행하는 방법을 배웠습니다 . 하지만 아직 끝나지 않았습니다.
지금은 사용 echo -e "\e[?16;0;200c"
하기로 결정 했지만 문제가 있습니다. vim
또는 같은 응용 프로그램을 실행 irssi
하거나 화면 세션을 연결할 때 커서가 깜박이는 회색 밑줄로 되돌아갑니다.
물론 tty
다른 모든 텍스트 콘솔에는 영향을 미치지 않습니다.
그렇다면 어떻게 이러한 변경 사항을 영구적으로 만들 수 있습니까? 다른 콘솔에 어떻게 채울 수 있습니까?
GitHub Gist : Linux 콘솔의 커서 모양, 색상 및 깜박임 속도를 변경하는 방법
내 .bashrc
파일 (또는 /etc/bashrc
) 에서 다음 커서 서식 설정을 정의합니다 .
##############
# pretty prompt and font colors
##############
# alter the default colors to make them a bit prettier
echo -en "\e]P0000000" #black
echo -en "\e]P1D75F5F" #darkred
echo -en "\e]P287AF5F" #darkgreen
echo -en "\e]P3D7AF87" #brown
echo -en "\e]P48787AF" #darkblue
echo -en "\e]P5BD53A5" #darkmagenta
echo -en "\e]P65FAFAF" #darkcyan
echo -en "\e]P7E5E5E5" #lightgrey
echo -en "\e]P82B2B2B" #darkgrey
echo -en "\e]P9E33636" #red
echo -en "\e]PA98E34D" #green
echo -en "\e]PBFFD75F" #yellow
echo -en "\e]PC7373C9" #blue
echo -en "\e]PDD633B2" #magenta
echo -en "\e]PE44C9C9" #cyan
echo -en "\e]PFFFFFFF" #white
clear #for background artifacting
# set the default text color. this only works in tty (eg $TERM == "linux"), not pts (eg $TERM == "xterm")
setterm -background black -foreground green -store
# http://linuxgazette.net/137/anonymous.html
cursor_style_default=0 # hardware cursor (blinking)
cursor_style_invisible=1 # hardware cursor (blinking)
cursor_style_underscore=2 # hardware cursor (blinking)
cursor_style_lower_third=3 # hardware cursor (blinking)
cursor_style_lower_half=4 # hardware cursor (blinking)
cursor_style_two_thirds=5 # hardware cursor (blinking)
cursor_style_full_block_blinking=6 # hardware cursor (blinking)
cursor_style_full_block=16 # software cursor (non-blinking)
cursor_background_black=0 # same color 0-15 and 128-infinity
cursor_background_blue=16 # same color 16-31
cursor_background_green=32 # same color 32-47
cursor_background_cyan=48 # same color 48-63
cursor_background_red=64 # same color 64-79
cursor_background_magenta=80 # same color 80-95
cursor_background_yellow=96 # same color 96-111
cursor_background_white=112 # same color 112-127
cursor_foreground_default=0 # same color as the other terminal text
cursor_foreground_cyan=1
cursor_foreground_black=2
cursor_foreground_grey=3
cursor_foreground_lightyellow=4
cursor_foreground_white=5
cursor_foreground_lightred=6
cursor_foreground_magenta=7
cursor_foreground_green=8
cursor_foreground_darkgreen=9
cursor_foreground_darkblue=10
cursor_foreground_purple=11
cursor_foreground_yellow=12
cursor_foreground_white=13
cursor_foreground_red=14
cursor_foreground_pink=15
cursor_styles="\e[?${cursor_style_full_block};${cursor_foreground_black};${cursor_background_green};c" # only seems to work in tty
# http://www.bashguru.com/2010/01/shell-colors-colorizing-shell-scripts.html
prompt_foreground_black=30
prompt_foreground_red=31
prompt_foreground_green=32
prompt_foreground_yellow=33
prompt_foreground_blue=34
prompt_foreground_magenta=35
prompt_foreground_cyan=36
prompt_foreground_white=37
prompt_background_black=40
prompt_background_red=41
prompt_background_green=42
prompt_background_yellow=43
prompt_background_blue=44
prompt_background_magenta=45
prompt_background_cyan=46
prompt_background_white=47
prompt_chars_normal=0
prompt_chars_bold=1
prompt_chars_underlined=4 # doesn't seem to work in tty
prompt_chars_blinking=5 # doesn't seem to work in tty
prompt_chars_reverse=7
prompt_reset=0
#start_prompt_coloring="\e[${prompt_chars_bold};${prompt_foreground_black};${prompt_background_green}m"
start_prompt_styles="\e[${prompt_chars_bold}m" # just use default background and foreground colors
end_prompt_styles="\e[${prompt_reset}m"
PS1="${start_prompt_styles}[\u@\h \W] \$${end_prompt_styles}${cursor_styles} "
##############
# end pretty prompt and font colors
##############
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다