如何永久将feh的默认背景颜色设置为黑色?
Permanently Set feh Background to Black Instead of Checkerboard
Got it, let's fix that feh background color permanently so you don't have to type --bg-color black every single time. Feh reads user-specific configuration from a file in your .config directory, so we just need to set that up:
- First, make sure the feh config directory exists (it might not be created by default):
mkdir -p ~/.config/feh - Next, create or edit the feh configuration file with your favorite text editor (I'm using nano here for simplicity):
nano ~/.config/feh/config - Add this single line to the file:
--bg-color black - Save and exit the editor (in nano, that's
Ctrl+OthenEnter, followed byCtrl+X).
That's it! Now whenever you open an image with feh, the background will default to black instead of the default checkerboard pattern. If you ever want to switch back or use a different color, just edit that line in the config file—you can even use hex codes, like --bg-color #000000 for pure black if you prefer that syntax.
内容的提问来源于stack exchange,提问作者M. Knepper
相关产品推荐
相关产品推荐

