터미널 벨 소리를 덜 크게(조용하게) 만들려면 어떻게 해야 합니까?

터미널 벨 소리를 덜 크게(조용하게) 만들려면 어떻게 해야 합니까?

저는 Debian과 Mate를 사용하고 있으며 vim도 많이 사용합니다. 시끄러운 경고음을 비활성화하는 방법에 대한 많은 답변이 있습니다. 이를 메이트 터미널 설정에서는 "터미널 차임"이라고 하지만 실제로 소리 경고는 vim에서 몇 가지 유용한 용도로 사용됩니다. 나의 일반적인 작업 흐름은 조용한 음악과 함께 작업하는 것이며 알람 소리를 더 조용하게 해야 합니다. 시스템 비프음이 아닌 물 떨어지는 소리 같습니다.

가능한 해결 방법의 예: 사운드 파일의 위치를 ​​알아낸 경우 오디오 편집기를 사용하여 편집하고 싶습니다.

답변1

Unix 및 Linux StackExchange를 처음 사용하는 것 같습니다. 환영!

현재 내 MATE 데스크탑(Ubuntu의 데스크탑 관리자로 사용)은 사운드가 활성화되지 않은 가상 머신에 있지만, 원하는 것을 달성하는 데 도움이 될 것으로 생각되는 몇 가지 아이디어를 드릴 수 있습니다.

제가 기억하는 것이 맞다면 VIM에는 자체 내부 사운드 콘텐츠가 있습니다. 내가 언급한 내용이 모두 작동하지 않으면 VIM 사운드에 대해 찾아보세요. 해결책이 아닌 시작할 수 있는 몇 가지 장소는 다음과 같습니다.,두번째, 그리고.

링크가 끊어진 경우:(아카이브 A, "echoerr"을 검색하세요.아카이브 B, "errorbells"를 검색하세요.아카이브 C, "경고음"을 검색하세요. "visualbell" 아래에 있어야 합니다.)

아이디어를 찾고

나의 첫 번째 단계는 설정을 살펴보고 도움이 될 만한 것을 찾는 것이었습니다.

공식적으로 말할 필요는 없지만 설정을 백업해 두었습니다.:gsettings list-recursively > ~/.gsettings_list-recursively.$(date +'%s').bak

이제 설정해 보세요.

bballdave025@DWBMACHINE:~$ gsettings list-recursively | \
  grep "bell\|pitch\|freq\|duration\|audible\|volume" | \
  grep mate | grep -v plugins
org.mate.engrampa.dialogs.batch-add volume-size 0
org.mate.peripherals-keyboard bell-pitch 400
org.mate.peripherals-keyboard bell-custom-file ''
org.mate.peripherals-keyboard bell-mode 'on'
org.mate.peripherals-keyboard click-volume 0
org.mate.peripherals-keyboard bell-duration 100
org.mate.caja.desktop volumes-visible true
org.mate.Marco.general audible-bell true
org.mate.Marco.general visual-bell-type 'fullscreen'
org.mate.Marco.general visual-bell false
bballdave025@DWBMACHINE:~$

시도해 볼 아이디어 1

이미 거기에 있으면 다음을 시도해 볼 수 있습니다.

gsettings set org.mate.peripherals-keyboard bell-custom-file \ 
  "/path/to/quieter/file"

(참고: 위의 방법인 Idea To Try 1을 빠르게 시도했지만 제대로 작동하지 못했습니다.)

2번 시도해 볼 아이디어

그러나 볼륨을 실험해 볼 수 있습니다. 다음은 매뉴얼 페이지의 일부 내용입니다 xset(사용자 이름을 변경하는 방법).X 윈도우 시스템기본 설정/구성).

bballdave025@DWBMACHINE:~$ man xset | grep -B1 -A16 "^OPTIONS"

OPTIONS
       -display display
               This option specifies the server to use; see X(7).

       b       The b option controls bell volume, pitch  and  duration.   This
               option  accepts  up  to three numerical parameters, a preceding
               dash(-), or a 'on/off' flag.  If no parameters  are  given,  or
               the  'on'  flag  is used, the system defaults will be used.  If
               the dash or 'off' are given, the bell will be turned  off.   If
               only  one numerical parameter is given, the bell volume will be
               set to that value, as a percentage of its  maximum.   Likewise,
               the  second  numerical  parameter  specifies the bell pitch, in
               hertz, and the third numerical parameter specifies the duration
               in  milliseconds.  Note that not all hardware can vary the bell
               characteristics.  The X server will set the characteristics  of
               the bell as closely as it can to the user's specifications.

bballdave025@DWBMACHINE4UB20KDX:~$

매개변수 50 400 100을 사용한 것처럼 원래 설정을 백업해 보겠습니다.

xset q b > ~/.xset_q_b.$(date +'%s').bak

하지만 제 기억이 맞다면 벨소리는 xset[이전 데스크탑의] 내부 벨소리를 의미하는 것 같습니다. 나는 다음과 같은 것을 실행했던 것을 기억하는 것 같습니다

xset b 10 400 1000 

하지만 로그아웃하고 재설정해도 아무런 변화가 없습니다.

내 생각엔 그게 그들이 가지고 있는 이유인 것 같아

Note that not all hardware can vary the bell characteristics

(참고: 위의 방법인 Idea To Try 2를 빠르게 시도했지만 제대로 작동하지 못했습니다.)

시도해볼 아이디어 3

내 설정에서는 "터미널 벨소리"가 파일을 가리키는 것 같습니다. 파일을 찾으려면 몇 가지 명령을 사용하겠습니다.

bballdave025@DWBMACHINE:~$ gsettings list-recursively | grep -i theme | grep -i sound
org.gnome.desktop.sound theme-name 'Yaru'
org.mate.sound theme-name 'Yaru'
org.gnome.evolution.plugin.mail-notification notify-sound-use-theme true
bballdave025@DWBMACHINE:~$ 
bballdave025@DWBMACHINE:~$ #  Oh, yeah, I should have done another
bballdave025@DWBMACHINE:~$ #+ `grep mate`, but this might help
bballdave025@DWBMACHINE:~$ #+ others with different desktop managers

이제 링 파일을 찾을 차례입니다.

bballdave025@DWBMACHINE:~$ find /usr/share -type f -iname "*bell*" | grep Yaru
/usr/share/sounds/Yaru/stereo/bell.oga
bballdave025@DWBMACHINE:~$

여기에 빠르고 더러운 일이 있습니다 (나는 이것을 권장하지 않습니다!) 할 것이다

sudo mv /usr/share/sounds/Yaru/stereo/bell.oga \
  /usr/share/sounds/Yaru/stereo/bell.oga.disabled
sudo cp /path/to/your/nicer/file.ogg /usr/share/sounds/Yaru/stereo/bell.oga

하지만 내 생각엔 네가 따라가는 게 좋을 것 같아새 프로필 만들기 지침EOS StackEchange의 @elmato(나는 이것을 추천한다!). 간단히.

sudo mkdir -p /usr/share/sounds/mytheme/stereo
sudo touch /usr/share/sounds/mytheme/index.theme

사운드 파일을 얻거나 만드십시오. 내가 뭔가 할게sox

# get into your home directory, then install sox
cd
sudo apt-get install -y sox

# 1.5 seconds of an A3 plucked on a guitar at 0.1 of max volume
sox -n bell.ogg synth 1.5 pluck A3 vol 0.1

# write the `index.theme` file
sudo nano /usr/share/sounds/myprofile/index.theme

cat파일은 아래 명령에서 볼 수 있는 것과 같아야 합니다 .

$ cat /usr/share/sounds/myprofile/index.theme 
[Sound Theme]
Name=myprofile
Directories=stereo

[stereo]
OutputProfile=stereo
$ 

이제 원하는 파일을 복사하세요. my 를 사용하겠지만 bell.ogg파일 확장자가 에서 로 변경된 것을 확인하세요. 저는 기타 픽 파일을 생성하는 홈 디렉토리에 있습니다. 그런 다음 새 사운드 프로필을 얻기 위해 설정을 변경하는 명령을 실행하겠습니다. (이를 초과하는 모든 항목은 기본값으로 되돌아갑니다.).ogg.ogabell.oga

sudo cp bell.ogg /usr/share/sounds/mytheme/stereo/bell.oga

gsettings set org.mate.sound theme-name mytheme

기본값으로 되돌리려면 다음을 사용하세요.

gsettings reset org.mate.sound theme-name

(참고: 저는 위의 방법인 Idea To Try 3을 빠르게 시도했고 정말 잘 작동했습니다.)

전체 기본 테마를 사용해 보세요. 작동하지 않으면 시도해 보세요 gsettings set org.mate.peripherals-keyboard bell-custom-file "/path/to/quieter/file". 작동하는지 알려주세요.

편집하다:가상 머신에서 사운드를 활성화하고 얻을 수 있었습니다시도해볼 아이디어 3일하다. 터미널에서 너무 여러 번 뒤로 이동하면 기타가 치는 소리가 들립니다. 싫어하는 일을 할 때도 vim기타 연주 소리가 들립니다 .

빠르고 확실하게 불완전한 테스트를 통해서도시도해 볼 아이디어 1...도 아니다2번 시도해 볼 아이디어내가 원하는 결과를 주었다.

관련 정보