Adding hide terminal cursor patch
This commit is contained in:
parent
ba7f4f98e2
commit
b0660ecf47
@ -15,6 +15,8 @@ Refer to [https://st.suckless.org/](https://st.suckless.org/) for details on the
|
||||
|
||||
### Changelog:
|
||||
|
||||
2021-06-09 - Added the hide terminal cursor patch
|
||||
|
||||
2021-05-16 - Added swapmouse patch
|
||||
|
||||
2021-05-11 - Added default cursor patch
|
||||
@ -147,6 +149,9 @@ Refer to [https://st.suckless.org/](https://st.suckless.org/) for details on the
|
||||
- [hidecursor](https://st.suckless.org/patches/hidecursor/)
|
||||
- hides the X cursor whenever a key is pressed and show it back when the mouse is moved in the terminal window
|
||||
|
||||
- [hide-terminal-cursor](https://www.reddit.com/r/suckless/comments/nvee8h/how_to_hide_cursor_in_st_is_there_a_patch_for_it/)
|
||||
- hides the terminal cursor when the window loses focus (as opposed to showing a hollow cursor)
|
||||
|
||||
- [invert](https://st.suckless.org/patches/invert/)
|
||||
- adds a keybinding that lets you invert the current colorscheme of st
|
||||
- this provides a simple way to temporarily switch to a light colorscheme if you use a dark colorscheme or visa-versa
|
||||
|
@ -163,6 +163,12 @@
|
||||
*/
|
||||
#define HIDECURSOR_PATCH 0
|
||||
|
||||
/* This patch hides the terminal cursor when the window loses focus (as opposed to showing a hollow
|
||||
* cursor).
|
||||
* https://www.reddit.com/r/suckless/comments/nvee8h/how_to_hide_cursor_in_st_is_there_a_patch_for_it/
|
||||
*/
|
||||
#define HIDE_TERMINAL_CURSOR_PATCH 0
|
||||
|
||||
/* This patch adds a keybinding that lets you invert the current colorscheme of st.
|
||||
* This provides a simple way to temporarily switch to a light colorscheme if you use a dark
|
||||
* colorscheme or visa-versa.
|
||||
|
5
x.c
5
x.c
@ -1995,8 +1995,13 @@ xdrawcursor(int cx, int cy, Glyph g, int ox, int oy, Glyph og)
|
||||
xdrawglyph(og, ox, oy);
|
||||
#endif // LIGATURES_PATCH
|
||||
|
||||
#if HIDE_TERMINAL_CURSOR_PATCH
|
||||
if (IS_SET(MODE_HIDE) || !IS_SET(MODE_FOCUSED))
|
||||
return;
|
||||
#else
|
||||
if (IS_SET(MODE_HIDE))
|
||||
return;
|
||||
#endif // HIDE_TERMINAL_CURSOR_PATCH
|
||||
|
||||
/*
|
||||
* Select the right color for the right mode.
|
||||
|
Loading…
Reference in New Issue
Block a user