You are not logged in.

#1 2020-10-24 15:45:19

louisld
Member
Registered: 2020-10-24
Posts: 26

Rofi won't show when used with sxhkd

Hello,

I have bspwm and skhkd. I use rofi to launch applications and it was working perfectly fine until I made a system upgrade. After I made this upgrade rofi won't appear when I use through sxhkd. However it does appear when started from console.

I use this to launch rofi in sxhkdrc :

super + shift + {i,o,p}
    rofi -show {run,drun,window} -theme $HOME/rofi-collection/nord/nord.rasi

Do you have any idea on how to solve this problem ?

Offline

#2 2020-10-24 16:34:24

seth
Member
Registered: 2012-09-03
Posts: 51,240

Re: Rofi won't show when used with sxhkd

Broken lazy grab?
Test whether the shortcut still works in general (eg. w/ an xterm) and if so, to pre-sleep a second or so (sleep 1; rofi …)

Offline

#3 2020-10-24 16:37:35

louisld
Member
Registered: 2020-10-24
Posts: 26

Re: Rofi won't show when used with sxhkd

Yes the shorcut works in general. But with

super + shift + {i,o,p}
    sleep 1;rofi -show {run,drun,window} -theme $HOME/rofi-collection/nord/nord.rasi

it still doesn't work.

Offline

#4 2020-10-24 20:19:30

seth
Member
Registered: 2012-09-03
Posts: 51,240

Re: Rofi won't show when used with sxhkd

Some environment?
Does

bash -c "rofi -show {run,drun,window} -theme $HOME/rofi-collection/nord/nord.rasi"

work?
What about just omitting the theme (nb. "$HOME")?

Offline

#5 2020-10-24 20:30:08

louisld
Member
Registered: 2020-10-24
Posts: 26

Re: Rofi won't show when used with sxhkd

None of this works. Using bash works in the console but not with sxhkd. I don't understand why... And it used to work, that's the most surprising.

Offline

#6 2020-10-24 20:35:32

seth
Member
Registered: 2012-09-03
Posts: 51,240

Re: Rofi won't show when used with sxhkd

until I made a system upgrade

pacman log?

As for "works in general" - did you test this with sth. like xterm that would require an intact $PATH?

Offline

#7 2020-10-24 20:46:39

louisld
Member
Registered: 2020-10-24
Posts: 26

Re: Rofi won't show when used with sxhkd

I don't have the pacman logs. I did the upgrade a month ago and today I made another upgrade to see if it will fix rofi. I tested it with alacritty and it works fine.

Offline

#8 2020-10-24 20:52:01

seth
Member
Registered: 2012-09-03
Posts: 51,240

Re: Rofi won't show when used with sxhkd

/var/log/pacman.log has timestamps
sxhkd got updated in early august, rofi in september - you could try to downgrade rofi, https://wiki.archlinux.org/index.php/Do … g_packages

Offline

#9 2020-10-24 21:08:58

louisld
Member
Registered: 2020-10-24
Posts: 26

Re: Rofi won't show when used with sxhkd

I didn't know pacman keep that much logs. Here what I got :

[2020-06-20T11:11:21+0200] [ALPM] installed rofi (1.5.4-1)
[2020-09-20T00:04:54+0200] [ALPM] upgraded rofi (1.5.4-1 -> 1.6.0-1)
[2020-09-20T19:00:31+0200] [ALPM] reinstalled rofi (1.6.0-1)
[2020-10-24T17:23:56+0200] [PACMAN] Running 'pacman -R rofi rofi-wifi-menu-git'
[2020-10-24T17:24:02+0200] [PACMAN] Running 'pacman -S rofi'

I tried to downgrade to rofi 1.5.4 which is the version I primary installed but there is no change.

Offline

#10 2020-10-25 09:14:50

seth
Member
Registered: 2012-09-03
Posts: 51,240

Re: Rofi won't show when used with sxhkd

[2020-06-20T11:11:21+0200] [ALPM] installed rofi (1.5.4-1)
[2020-09-20T00:04:54+0200] [ALPM] upgraded rofi (1.5.4-1 -> 1.6.0-1)

sxhkd will have seen an update in that period, so try to downgrade that (as well)

Offline

#11 2020-10-25 09:18:30

louisld
Member
Registered: 2020-10-24
Posts: 26

Re: Rofi won't show when used with sxhkd

I will try to downgrade sxhkd.

I made a few other tests and when I start bspwm with startx, rofi actually works while when I start it with sddm it doesn't work. My .xinitrc is just :

exec bspwm

EDIT : downgrading sxhkd changed nothing.

Last edited by louisld (2020-10-25 09:28:38)

Offline

#12 2020-10-25 16:09:41

kaptenen
Member
Registered: 2009-12-06
Posts: 287
Website

Re: Rofi won't show when used with sxhkd

super + shift + {i,o,p}
    rofi -theme $HOME/rofi-collection/nord/nord -show {run,drun,window}

Makes no difference? Have you tried to just remove the .rasi part from what you currently are using?

Offline

#13 2020-10-25 16:37:10

seth
Member
Registered: 2012-09-03
Posts: 51,240

Re: Rofi won't show when used with sxhkd

The xinitrc will lead to a "broken" session, does it fail w/ startx if you fix the xinitrc (last link in my signature, 2nd blue box note)

Offline

#14 2020-10-27 11:57:12

louisld
Member
Registered: 2020-10-24
Posts: 26

Re: Rofi won't show when used with sxhkd

It works with a clean session ! Thank you ! I copied /etc/X11/xinit/xinitrc, changed it with exec bspwm then ran startx and it worked.

How can I make this work with sddm ?

Offline

#15 2020-10-27 13:40:17

seth
Member
Registered: 2012-09-03
Posts: 51,240

Re: Rofi won't show when used with sxhkd

Unfortunately that rather contradicts my earlier suspicion…

a) do you actually need a DM?
b) does it work if you start bspwm using https://wiki.archlinux.org/index.php/Di … _a_session ?

Offline

#16 2020-10-27 13:54:42

louisld
Member
Registered: 2020-10-24
Posts: 26

Re: Rofi won't show when used with sxhkd

I used KDE before that come with SDDM. I use it sometime so if it possible I would like to keep it.

It doesn't work if I start the session xinitrc in sddm. It logins then blackscreen and come back to sddm.

Offline

#17 2020-10-27 20:06:29

seth
Member
Registered: 2012-09-03
Posts: 51,240

Re: Rofi won't show when used with sxhkd

That sounds like the session fails to start.
Did you "chmod +x ~/.xinitrc"?
What are the contents of your xinitrc?

Offline

#18 2020-10-28 11:40:26

louisld
Member
Registered: 2020-10-24
Posts: 26

Re: Rofi won't show when used with sxhkd

After chmod +x my .xinitrc, sddm is able to start the session but my polybars do not show and the rofi shortcut still doesn't work.

I looked at the logs (Xorg.0.log) and it says : (EE) Failed to open authorization file "/var/run/sddm/{f037464e-dfc2-4c93-a5e2-1977aaa41366}": No such file or directory. I saw that you replied to this error on another thread but I don't understand very well how the problem was solved.

All this make me think sddm has a problem. Maybe I should try using another DM.

Here my .xinitrc :

-rwxr-xr-x  1 louisld louisld       611 27 oct.  12:54 .xinitrc

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then

    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then

    xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

exec bspwm

Offline

#19 2020-10-28 12:50:56

seth
Member
Registered: 2012-09-03
Posts: 51,240

Re: Rofi won't show when used with sxhkd

I could imagine that SDDM fumbles w/ the keyboard map, but you said the shortcut works for other purposes.
What if you start sxhkd in the xinitrc (before bspwm) instead of having bspwm starting it? (same goes for the polybars, though this is weird)

The error in the other thread is different and because the OP didn't have the "if [ -d /etc/X11/xinit/xinitrc.d ] ; then…" block in his xinitrc, something that's not actually relevant when using a DM.

Offline

#20 2020-11-05 00:25:42

baron-digit
Member
Registered: 2020-10-12
Posts: 24

Re: Rofi won't show when used with sxhkd

Hi,
maybe my post is obsolete already, but what worked for me was:
Name            : rofi
Version         : 1.6.0-1

1. Load a default-config file into my ~/.config/rofi/ folder

rofi -upgrade-config

2. Load dumb-config file [because I was too dumb to understand what I should implement ;-)]

rofi -dump-config > ~/.config/rofi/config.rasi

3. Created my own theme and placed it also into my ~/.config/rofi/ folder
4. Modified my necessary changes in the config file, e.g. exerpt:

 
configuration {
	modi: "drun";
	width: 25%;
	lines: 4;
	font: "Hack Regular 12";
	location: North;
        show-icons: true;
	theme: "badracula";
}

5. called the command in my sxhkdrc

super + @space 
           rofi -show

EDIT: Just figured out, that some items are better in the theme file under window:

window {
	width: 25%;
        anchor: North;
	location: North;
}

Hope this helped.

BR

louisld wrote:

Yes the shorcut works in general. But with

super + shift + {i,o,p}
    sleep 1;rofi -show {run,drun,window} -theme $HOME/rofi-collection/nord/nord.rasi

it still doesn't work.


EDIT: Interestingly, after applying this procedure on my main laptop, the command doesn't work with

 super + @space

but with

 super + shift + @space

without troubles ...

Last edited by baron-digit (2020-11-06 08:38:06)

Offline

Board footer

Powered by FluxBB