Hi,
I could not find documentation on how to change the blinking rate of the cursor, in what configuration file would that be or is this something to submit as a feature?
I don't think it's possible to change this currently, and it would then default to Scintilla's 500ms period. See [SCI_SETCARETPERIOD](https://scintilla.org/ScintillaDoc.html#SCI_SETCARETPERIOD) for the API that one would use to implement this.
Or just stopping the cursor from blinking at all?
20 févr. 2023 22:36:13 Colomban Wendling ***@***.***>:
I don't think it's possible to change this currently, and it would then default to Scintilla's 500ms period. See SCI_SETCARETPERIOD[https://scintilla.org/ScintillaDoc.html#SCI_SETCARETPERIOD] for the API that one would use to implement this.
— Reply to this email directly, view it on GitHub[https://github.com/geany/geany/issues/3410#issuecomment-1437577452], or unsubscribe[https://github.com/notifications/unsubscribe-auth/APGKIZPYK6XT473CYN7XPNLWYP...]. You are receiving this because you authored the thread.[Image de pistage][https://github.com/notifications/beacon/APGKIZI2NPTPNM4Z4USAFJ3WYPPULA5CNFSM...]
As the link @b4n gave says, setting the period to 0 stops blinking.
@b4n could you please tell me the location of the file on Kubuntu which contains the [SCI_SETCARETPERIOD]?
@joomlafun it's defined in *Scintilla.h*, which is bundled with Geany. If you wanna patch Geany, you probably don't have to change anything to the includes, and if you want to make a plugin, you'll just need `#include <Scintilla.h>`.
@b4n Would you know why applying this solution as no effect(setting carret width to 0)? :
I go to tools>config files>filestype.common and replaced #~ caret_width=3 by #~ caret_width=0 however it does not have any effect. It looks like other people cannot seem to change the caret color as well : https://unix.stackexchange.com/questions/594355/how-to-set-the-color-of-the-...)
#~ caret_width=3 by #~ caret_width=0 however it does not have any effect.
Because you have it commented out, remove the `#~` and remove it from the `[styling]` line above.
other people cannot seem to change the caret color as well
Well there is no `cursor_color` setting so no wonder it doesn't work, the second advice there is the best.
@elextr Thanks a lot, you don't know how much it means to me, blinking carrets are not always the best for concentration and Geany is the only reliable alternative for notepad++ on Kubuntu with a save as you type feature
Thanks a lot to everyone here too for all the quick answers !
If I set in `/.config/geany/filedefs/filetypes.common` `caret_width=0`, then the caret is invisible.
But how can I turn off the blinking effect of the caret, so I just see a not-blinking black caret?
On this webpage (https://www.geany.org/manual/gtk/gtk/GtkSettings.html#GtkSettings--gtk-curso...) there is this text: Whether the cursor should blink.
What should I do with `gtk-cursor-blink`?
@ralf3u
What should I do with gtk-cursor-blink?
Whatever you want, since that is for the _GTK_ cursor, not the Scintilla caret it will have no effect :grin:
As @b4n pointed out in the first reply, Geany does not expose the Scintilla blink rate setting at the moment, PR are welcome.
My solution of setting the caret/cursor appearance on Linux Mint 21 Xfce including blinking rate: In the "filetypes.common" file: ``` # Foreground color and appearance of the caret (the blinking or not blinking cursor/point) # NOTICE: only first and third argument is `caret=` is evaluated, so setting the background # color of the caret will be ignored. # Caret appearance: ;;false->beam/hair ;;true->block caret caret=#ff9;;false # Width of the cursor/caret/point->the with arrow/cursor keys movable (blinking or static) # part of the display area) # 0->invisible, 1..3->width in pixels (if you want 4 or more, make it a block caret) caret_width=3 ``` Using `~ $ xfce4-keyboard-settings` dialog box for setting the cursor blinking rate: ![xfce4-keyboard-settings»Keyboard»Behavior-Tab_keyRepeatDelaySpeed-cursorBlinkingDelay_oo0](https://github.com/geany/geany/assets/143121714/ff4600ea-355e-43c6-a257-b85a...)
Hmmm, Scintilla GTK has an undocumented feature[^1] where its initial blink and blink rate are set from GTK settings if available [here](https://github.com/geany/geany/blob/3a92129d61d4d8e96136e29d4709bb638527be40...)
So that would work if you can set `gtk-cursor-blink` and `gtk-cursor-blink-time` (in ms) in GTK settings via your desktop or otherwise. Works on LM (XFCE from @oOosys and Cinnamon for me) which is a GTK focused distro. Others can test on their desktop, for example not sure if a KDE desktop will set GTK settings.
[^1]: here I actually mean a _feature_ not a bug :grin:
@elextr : I have already played around with the mentioned code setting manually the value and removing the check, but this didn't changed anything after compilation of Geany with the changed "ScintillaGTK.cxx" - no idea why this does not work and where to look where it is actually set ...
Turning off cursor blinking works here with Cinnamon, are you restarting Geany each time you change it? Scintilla only loads from the settings at startup.
I don't see why you are playing with the Scintilla code, the Scintilla API provides a means of controlling it from the application, just that Geany does not do so.
Yes, I am restarting Geany or the xfce4-terminal ... no chance to get rid of blinking. OK ... where to look in the code of SciTE which allows explicit setting of it? Once properly located and isolated It should be easy to put the code from SciTE to Geany ...
As I said, turning blinking off works on LM Cinnamon, sounds like you need to raise an issue with LM and maybe upstream XFCE rather than making a way for Geany to force overriding it.
Scite is C++, Geany is C, Scite properties are handled very differently to how Geany settings are handled, so not much code is going to be directly reusable. Better to start from the Scintilla [API](https://www.scintilla.org/ScintillaDoc.html#SCI_SETCARETPERIOD).
github-comments@lists.geany.org