1. 10
  1.  

  2. 3

    I quickly threw together an OpenBSD port for xbanish. Once there is an official release and the tree is unlocked I can submit/import it.

    1. 3

      This is one of those things that you see and think, I should have thought of that. Pretty useful.

      1. 1

        There is also unclutter, which has been around for a while (since 1992 or so…) and does the same thing. This project have shorter and generally nicer code in my opinion, but unclutter has a man-page, probably has had most of it’s possible bugs removed and is already available in many package repositories.
        Debian and Ubuntu makes it just an apt-get install unclutter away.

        1. 1

          but unclutter has a man-page, probably has had most of it’s possible bugs removed

          If you read the readme, you’ll note that I wrote xbanish because unclutter doesn’t even work properly anymore.

          1. 1

            Ah, sorry, I completely missed that. Oops…

            Anyway I use unclutter like this: unclutter -idle 1 -root

            This only shows my cursor when I move it, which is what I thought xbanish did and is what I want to happen.

        2. 1

          Thanks for this!

          Only works when I invoke it manually, when put in .xinitrc it does get started normally, but no mouse hiding. Here’s the full .xinitrc:

          setxkbmap -option ctrl:nocaps
          xbanish &
          xrdb -quiet -load $HOME/.Xresources
          xset fp+ $HOME/.fonts && xset fp rehash
          xsetroot -cursor_name left_ptr -solid black && bgs -c /home/sramov/pic/5583922156_87619bb8a1.jpg
          
          ssh-agent xmonad
          
          1. 1

            Ok, file a bug on the Github repo with some debugging info and I’ll look into it.

            1. 1

              Works beautifully when started manually, but when invoked from .xinitrc (on OpenBSD -current with dwm -current) I can reproduce sramovs findings – the cursor does not hide, but the process is running.

              When started with debug from .xinitrc no debug seems to be produced (?). Debug output is produced when started manually though. Still want a github bug issue opened?

              1. 1

                Can you and @sramov try the latest git code? It’s working for me in an xsession with ratpoison.

                1. 1

                  Still the same when started form xinitrc, but it might be related to some window focus thing in dwm:

                  When invoked manually with dwm running I see the cursor hiding on creating a new window only if the cursor is not in the new window area; debuging reports ‘creating new window, snooping on it’ and nothing further when I type in this window. If the cursor is not within the area of a newly created xterm I see ‘creating new window, snooping on it’ and then ‘keystroke 50 hiding cursor’ and any new keystroke is reported.

                  So it seem the keystrokes are not captured from those windows created with a cursor “above”. But if I move the window focus between a few windows and return to new window – then the cursor is correctly hidden when typing and debug reports any keystroke. Want a github issue opened on this peculiar thing?

                  1. 1

                    Just for the record: The above problem is solved with this commit https://github.com/jcs/xbanish/commit/5056afe970aa3c1dfb6af5f879ea649a8af90b15. Thanks!

                    1. 1

                      Nope, still nothing, after trying the latest git head. I’ve tried with all window mangers I use, cwm, xmonad, mcwm etc… The result is always the same. If I put xbanish & in ~/.xinitrc it just doesn’t work. OpenBSD -stable, various OpenBSD -current snapshots, no cigar…

                      I don’t use GitHub, so instead of filing an issue, I am posting here.

                      1. 1

                        Works here: xbanish-1.1 from packages started from xinitrc, dwm via git, latest OpenBSD -current snapshot.

                        1. 1
                          uname -a
                          OpenBSD ouroboros.ramov.inet 5.4 GENERIC.MP#61 amd64
                          
                          pkg_info -qm | grep xbanish
                          xbanish-1.1
                          
                          cat ~/.xinitrc
                          bgs -c $HOME/bgs/fbdtlbl1305772307_crop.jpg
                          setxkbmap -option ctrl:nocaps
                          xbanish &
                          xrdb -load $HOME/.Xresources
                          xset fp+ $HOME/.fonts && xset fp rehash
                          xsetroot -cursor_name left_ptr
                          
                          ssh-agent xmonad
                          

                          I also tried replacing ssh-agent with exec thinking it might have something to do with that, but the result is the same, I just can’t get it to work.

                          Doesn’t matter which window manager I try, xmonad, cwm, dwm… Also tried xinit and startx

                          When I manually start it with -d flag, it seems it only hides the cursor when in xterm. When I switch focus to xombrero for instance, I get no output, even the mouse moves are not reported. Same thing when the cursor is on the root window.

                          Also tried to comment everything in ~/.xinitrc, except for the xbanish & and exec xmonad lines…

                          Would love to get to the bottom of this!