ターミナルベルの音をあまり大きく(静かに)するにはどうすればよいですか?

ターミナルベルの音をあまり大きく(静かに)するにはどうすればよいですか?

私は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回試してみるアイデア私が望む結果を与えた。

おすすめ記事