i3 / i3lock

improved screen locker
https://i3wm.org/i3lock
BSD 3-Clause "New" or "Revised" License
921 stars 404 forks source link

i3blocks (i3bar) shows when using bar mode hidden in i3 #173

Closed ghost closed 4 years ago

ghost commented 6 years ago

The bar is showing when locked and mod4 is pressed(which is set to display the bar). spesific config bar { mode hide hidden_state hide modifier $mod } Where $mod is Mod4. This is probably not a huge problem, but thought i'd mention it. Regards

eplanet commented 6 years ago

Hi! Thanks for reporting the issue. However I cannot reproduce it using your configuration and latest i3 (4.14-181-g458e2a2e) and i3lock (2.10-3-g6b53758) versions. When I lock my screen and press Mod4, the bar remains hidden.

ghost commented 6 years ago

That's odd, i do not know how to get the same detailed version str, but running i3 --version outputs i3 version 4.14.1 (2017-09-24) © 2009 Michael Stapelberg and contributors and i3lock --version outputs i3lock: version 2.10 (2017-11-25) © 2010 Michael Stapelberg. Am running manjaro 17.1.3 i3 community edition, and using blurlock as a screenlocker but tried recreating using just plain i3lock and the problem persists.

Fabian-G commented 5 years ago

Can confirm, but the problem only persists if a compositor is running(in my case compton). Without compton pressing mod while i3lock is active will sometimes result in a very short flickering at the bottom of the screen. With compton active i3bar is shown full time while the mod key is pressed. Additionally, if the urgent hint for a workspace is set, the bar will also show full time.

Edit: I just noticed that notifications are also not hidden when compton is active. (Notification daemon: dunst)

JohnAZoidberg commented 5 years ago

I have the same issue, also just when running compton:

JohnAZoidberg commented 5 years ago

I also had a floating window pop up, while it was locked. That was shown, too.

stapelberg commented 4 years ago

This issue is tracked in https://github.com/i3/i3lock/issues/204

tkapias commented 7 months ago

Related issues are ongoing and I tried some solutions like using unredir-if-possible or disabling the compositor, but I still get this issue with the hidden i3bar.

I did not leave a message on the ongoing issues because I'm using forks but I wanted to leave my solution here for this specific usage.

Context

I use i3wm with i3status-rust (i3bar), picom (compton fork) and betterlockscreen based on i3lock-color (i3lock fork).

Solution

My solution is to use a script to run the lock, check the i3bar mode in the script and toggle it before/after the lock:

# check if the i3bar is currently visible
i3bar_mode=$(i3-msg -t get_tree | jaq '.. | objects | select(.class | contains("i3bar"))')

# if i3bar is hidden makes it visible
if [[ -z "$i3bar_mode" ]]; then
  i3-msg -q bar mode toggle
fi

... run i3lock or any alternative here...

# hide i3bar when leaving lock
if [[ -z "$i3bar_mode" ]]; then
  i3-msg -q bar mode toggle
fi
tkapias commented 7 months ago

I use jaq to parse the json in the above solution but jq works with the same args.