Cursor shows as "I" (text selection beam) instead of normal pointer, and won't click on anything. The cursor moves but doesn't respond to clicks.
xdotool key EscapeThis sends an Escape key to cancel whatever is holding the cursor in text selection mode.
xdotool key Escapexsetroot -cursor_name left_ptrxdotool keyup Super_L Alt_L Control_L Shift_Lxdotool getactivewindow getwindownamekillall dunst 2>/dev/null; dunst &# Mod+Shift+Q (if configured)
# or
killall dwmThe IBeam cursor typically appears when:
- st terminal is in text selection mode and something prevents it from exiting
- A modifier key gets stuck (Shift, Alt, etc.)
- Text selection was initiated but not properly cancelled
- A notification or dialog box grabbed focus incorrectly
Modify st/config.h to ensure Escape always works:
{ ControlMask, XK_bracketleft, "\033", 0, 0}, // Ctrl+[ also sends EscapeSave as ~/bin/fix-cursor:
#!/bin/sh
xdotool key Escape
xsetroot -cursor_name left_ptr
xdotool keyup Super_L Alt_L Control_L Shift_LMake executable: chmod +x ~/bin/fix-cursor
Bind to a key in dwm/config.h:
{ MODKEY|ShiftMask, XK_c, spawn, SHCMD("fix-cursor") },In st, avoid accidental text selection mode by:
- Being careful with middle-click (paste) operations
- Not holding Shift while clicking
- Using Escape regularly to clear selection states
Could add a visual indicator when in selection mode (advanced)
Create a cron job or timer that periodically runs:
*/5 * * * * DISPLAY=:0 xsetroot -cursor_name left_ptrMost Common Fix: Just press Escape key or run xdotool key Escape
- st source:
st/st.c(selection handling) - dwm keybindings:
dwm/config.h - xdotool manual:
man xdotool