btop icon indicating copy to clipboard operation
btop copied to clipboard

How to config theme on my Mac

Open barnett-yuxiang opened this issue 1 year ago • 2 comments

i try

brew install btop

and here is my path files

➜  ~ tree ~/.config/btop 
/Users/crystal/.config/btop
├── btop.conf
└── themes
    ├── HotPurpleTrafficLight.theme
    ├── adapta.theme
    ├── adwaita.theme
    ├── ayu.theme
    ├── dracula.theme
    ├── dusklight.theme
    ├── elementarish.theme
    ├── everforest-dark-hard.theme
    ├── flat-remix-light.theme
    ├── flat-remix.theme
    ├── greyscale.theme
    ├── gruvbox_dark.theme
    ├── gruvbox_dark_v2.theme
    ├── gruvbox_material_dark.theme
    ├── horizon.theme
    ├── kyli0x.theme
    ├── matcha-dark-sea.theme
    ├── monokai.theme
    ├── night-owl.theme
    ├── nord.theme
    ├── onedark.theme
    ├── paper.theme
    ├── solarized_dark.theme
    ├── solarized_light.theme
    ├── tokyo-night.theme
    ├── tokyo-storm.theme
    ├── tomorrow-night.theme
    └── whiteout.theme

2 directories, 29 files

how to change a nice theme

image

not very ok

barnett-yuxiang avatar Nov 24 '23 07:11 barnett-yuxiang

I had the same issue with the defaults, and it seems to be related to the truecolor = True setting not working well in Terminal.app, which doesn't seem to support 24-bit colours.

So you have 2 options:

  • Disable truecolour by setting truecolor = False in btop.conf (which looks good)
  • Switch to some other terminal emulator like iTerm2 which supports 24-bit colour (which looks even better!)

Once that is done, the "Default" theme looks perfectly fine, but otherwise set color_theme to one of the other theme names if you prefer something else, in btop.conf.

Ideally, btop would we able to detect true colour support and toggle this automatically, but not sure how practical that would be.

Good luck!

mbhutton avatar Jan 04 '24 22:01 mbhutton

Perhaps btop should be able to toggle this automatically based on the COLORTERM env variable? I.e. to use truecolor only when COLORTERM is set to truecolor?

That approach is used elsewhere, eg: https://dandavison.github.io/delta/tips-and-tricks/24-bit-color-truecolor.html

mbhutton avatar Jan 05 '24 00:01 mbhutton