Comments (5)
I tried xterm and urxvt and they do the same thing as st here - the cursor color stays the same across ":set bg=light/dark".
The reason Alacritty behaves differently seems to be it automatically reverses cursor color, rather than use a set one.
Here's a StackExchange question with answers on the same issue.
A solution would be to set the defaultbg, defaultcs etc to their their own indexes after 255 in st's config.h:
static const char *colorname[] = {
[256] = "#282828",
[258] = "#ebdbb2",
};
unsigned int defaultbg = 256;
static unsigned int defaultcs = 258;
// If you want to set cursor color with Xresources, you need this:
ResourcePref resources[] = {
// Luke removed the cursorColor line earlier today
// If you want to set the cursor color with Xresources, put it back
{ "cursorColor", STRING, &colorname[258] },
};
... and put this in .vimrc:
" set st cursor and background to contrasting colors on start
silent !echo -ne "\033]4;258;\#3c3836\x7\033]4;256;\#fbf1c7\x7"
" reset cursor and background when vim exits
autocmd VimLeave * silent !echo -ne "\033]104;258\x7\033]104;256\x7"
" You can also change colors depending on Vim mode:
" use an orange cursor in insert mode
let &t_SI = "\033]4;258;orange\x7"
" use red cursor otherwise
let &t_EI = "\033]4;258;red\x7"
]4;colorindex;colorname
is one of few a OSC escape codes st implements
]104;colorindex
resets color index to default
from st.
Did you set these colors in Xresources or in the source code?
I just activated gruvbox light colors from Xresources and I don't get this problem in neovim. Mind showing exactly what your settings/changes are?
from st.
Did you set these colors in Xresources or in the source code?
I just activated gruvbox light colors from Xresources and I don't get this problem in neovim. Mind showing exactly what your settings/changes are?
I just changed Xresources to gruvbox light and problem disappeared. Yet I want to use dark scheme for the terminal itself. In Vim I change color-scheme to light on daylight, dark scheme otherwise. Do I need to change Xresources for this? I don't understand how this works. I basically use morhetz/gruvbox
plugin. Doesn't it overwrite all those values?
In alacritty default color-scheme for terminal is dark, yet the problem doesn't happen.
from st.
So you want a dark terminal but a light vim? Your problem is probably that the vim colorscheme doesn't set a cursor color for each them. I guess you can add that manually if you'd like (I suppose it's possible, but I don't know about or use vim colorschemes).
from st.
@terriblephrases Thank you for clarifying the problem.
from st.
Related Issues (20)
- Unicode rendering/CJK input issues HOT 3
- zsh: segmentation fault st HOT 1
- st emoji support HOT 1
- don't want to copy my username and pc's name with <a-o> HOT 1
- makepkg cannot clone git:// sources anymore, please update source= in PKGBUILD to git+https://
- Bidi support HOT 1
- Update st to 0.8.5 HOT 1
- sixel support
- There is a row of gaps at the bottom HOT 1
- Composed input handling bug. Undefined behavior. Random action/command execution. HOT 1
- libxft-bgra seems to be removed from the AUR HOT 1
- Mouse buttons all act the same HOT 1
- Apply scrollback reflow patch ? HOT 8
- Problem showing emojis in st and dmenu HOT 2
- ctrl-l doesn't work when a program is running HOT 2
- applied a colorscheme with pywal and now it won't go away for anything in this world HOT 1
- regular text looks dim and thin HOT 2
- Add support for reloading xrdb HOT 1
- new version: st 0.9.2 HOT 1
- ControlMask is not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from st.