Micro text editor colors

Quick question: Anyone knows how to make the micro text editor honor the terminal color scheme?

Why do I never find these things until after I ask a question? No matter how much I look?

To make micro follow the 16 color palette in the terminal settings:

  1. start micro
  2. ctrl+e
  3. type “set colorscheme simple” without the “”
  4. quit micro
6 Likes

Just so you can mark your own answer as a solution? :rofl: Just kidding… I’m glad you figured it out and this may be useful to others who use micro.

2 Likes

I use set colorscheme solarized. That also changes with terminal color palette but I think it is only in a different order.
I have pywal set to generate colors from a wallpaper and micro changes every time to the new colors (urxvt - not sure about other terminals).

Sounds just like my setup. My only problem is that I cannot start terminal apps from launchers (such as the htop icon in the menu) because then it will disregard the color settings.

Launcher can be usualy changed.
Try changing the launcher to a terminal with the shell command eg. urxvt -e htop.
I don’t know which terminal you use so not sure if it works for you.

       -e command [arguments]
           Run the command with its command-line arguments in the urxvt window; also
           sets the window title and icon name to be the basename of the program being
           executed if neither -title (-T) nor -n are given on the command line. If
           this option is used, it must be the last on the command-line. If there is
           no -e option then the default is to run the program specified by the SHELL
           environment variable or, failing that, sh(1).

           Please note that you must specify a program with arguments. If you want to
           run shell commands, you have to specify the shell, like this:

             urxvt -e sh -c "shell commands"

Examle of micro in my i3 config

set $mod Mod4
set $terminal urxvt
bindsym $mod+F4 exec $terminal -e 'micro'

That is exactly what I do, But I suspect it’s because I run fish shell that commands ran like that bypasses the fish config and uses bash. Hence ignores the color scheme pywal has created in fish conf.

Fish, Bash should have nothing to do with terminal’s color schemes. It should be in .Xresources and/or it should be merged with xrdb command.
At least that is what is pywal chaning on my system.

1 Like

These are my last two lines in my fish.conf:

cat ~/.cache/wal/sequences
neofetch

Problem is that if i create a launcher that runs “alacritty -e htop” it ignores the line in fish.conf. It very obviously uses the default theme for alacritty.

edit: as for .xresources, that file has not been created by default for at least 5 years. It is almost only tiling window managers and occasional ancient apps (like urxvt) that uses it.

Edit: Ah. Cracked it:
I have to specify the shell like so:

alacritty -e fish -c htop
1 Like