You are not logged in.

#1 2015-10-30 17:08:06

somepeople4
Member
From: Waterloo, Canada
Registered: 2015-10-06
Posts: 13
Website

[SOLVED] Xmonad Setting Cursor Issue; Small Non-Lethal Bug

I have a small issue with the cursor in Xmonad:
It does not show up until I start a program (like "google-chrome-stable").
And while it appears as a themed pointer inside the program, it reverts to the default big "X" whenever the cursor is outside the window (e.g. when it is on Xmobar).

Here's what I know:

1. By default Xmonad doesn't provide a cursor, and that I'm supposed to set one myself. And I have, in my ~/.xinitrc.

2. There are few other that have the same issue. I have found this thread and this thread, yet I have tried their solutions and have not worked. Their solutions are very similar to what the wiki article says about this issue. Namely, it is simply adding the following line to ~/.xinitrc.

xsetroot -cursor_name -left_ptr

3. One difference I may have with other cases is that I specify all rendering to be done using my NVIDIA driver instead of the integrated Intel driver (my laptop comes with two). I do this using xrandr, located in the top two lines of my .xinitrc file. I'm not sure if this changes anything.

4. If I remove the line to set cursor completely, nothing changes! This means that the command is probably wrong, somehow.

5. I mentioned that I use a theme, and it is all done in .Xresources.

What I don't understand is how everyone else's configuration seem to work and mine doesn't, with almost identical code.

Thanks,
David

Last edited by somepeople4 (2015-10-31 00:48:25)

Offline

#2 2015-10-30 17:12:02

Fuxino
Member
From: Slovakia
Registered: 2014-09-26
Posts: 198

Re: [SOLVED] Xmonad Setting Cursor Issue; Small Non-Lethal Bug

somepeople4 wrote:
xsetroot -cursor_name -left_ptr

Shouldn't this be:

xsetroot -cursor_name left_ptr

(without the "-" before left_ptr)?

Offline

#3 2015-10-30 17:21:18

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: [SOLVED] Xmonad Setting Cursor Issue; Small Non-Lethal Bug

Also, if you set up the cursor theme that you want in your ~/.Xdefault or ~/.Xresources file it will change it to something other than the X.

! Xcursor*theme: Flatbed-Green-Huge
! Xcursor*theme: Silver_3D
! Xcursor.theme: ComixCursors-Orange-Huge
 Xcursor.theme: Exliz-full
! Xcursor*theme: crystalgreen
! Xcursor*theme: CG 
!Xcursor.theme: oxygen
Xcursor.size: 128

HTH


Knute

Offline

#4 2015-10-30 17:25:51

somepeople4
Member
From: Waterloo, Canada
Registered: 2015-10-06
Posts: 13
Website

Re: [SOLVED] Xmonad Setting Cursor Issue; Small Non-Lethal Bug

Fuxino wrote:
somepeople4 wrote:
xsetroot -cursor_name -left_ptr

Shouldn't this be:

xsetroot -cursor_name left_ptr

(without the "-" before left_ptr)?

Oh yes, I copied it wrong. My files don't have the second dash. Sorry about that.

David

Offline

#5 2015-10-30 17:29:14

somepeople4
Member
From: Waterloo, Canada
Registered: 2015-10-06
Posts: 13
Website

Re: [SOLVED] Xmonad Setting Cursor Issue; Small Non-Lethal Bug

Knute wrote:

Also, if you set up the cursor theme that you want in your ~/.Xdefault or ~/.Xresources file it will change it to something other than the X.

HTH

Yes, I set it in ~/.Xresources:

Xcursor.theme: Simple-and-Soft
Xcursor.size: 32

But it only applies to when the cursor is inside a window (e.g. Chrome). When I move outside of it, like on top of Xmobar, it goes back to being an X.

There are cases where it reverts inside the program as well: like in Sublime-Text 2, the cursor always appears as an X on the side pane.

David

Offline

#6 2015-10-30 17:54:52

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: [SOLVED] Xmonad Setting Cursor Issue; Small Non-Lethal Bug

You can also set that up in either your gtk or qt theme as well.
There are apps that can help you set those with gui's.


Knute

Offline

#7 2015-10-30 18:48:51

Fuxino
Member
From: Slovakia
Registered: 2014-09-26
Posts: 198

Re: [SOLVED] Xmonad Setting Cursor Issue; Small Non-Lethal Bug

Do you have xorg-xsetroot installed?

Offline

#8 2015-10-30 19:00:26

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] Xmonad Setting Cursor Issue; Small Non-Lethal Bug

Fuxino wrote:

Do you have xorg-xsetroot installed?

Put differently: have you tried spawning a terminal in xmonad and running the command there?

Offline

#9 2015-10-31 00:47:54

somepeople4
Member
From: Waterloo, Canada
Registered: 2015-10-06
Posts: 13
Website

Re: [SOLVED] Xmonad Setting Cursor Issue; Small Non-Lethal Bug

OH MY GOSH I DIDN'T THINK I'D HAVE TO INSTALL THAT.

Yes, installing that totally fixed it. Thank you so much. This was so frustrating, and now I feel so dumb! D:

Thank you guys for the quick replies and the help.

David

Offline

#10 2015-10-31 08:13:40

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] Xmonad Setting Cursor Issue; Small Non-Lethal Bug

Instead, you can import XMonad.Util.Cursor (from xmonad-contrib) and use

startupHook = setDefaultCursor xC_left_ptr

in your xmonad config.

Offline

Board footer

Powered by FluxBB