Let albert toggle when invoking

In some occasions, albert loses focus, but does not close itself. By
then, it's still visible and the "show" command does not work.
If this occurs, toggle behaves better, as albert will disappear on the
first execution and appear **with** focus on the second one. "show"
would do nothing and you would have grab your mouse to focus albert
again.

For the normal use case, "toggle" and "show" work the same.
This commit is contained in:
Benedikt Heine 2018-03-19 18:20:20 +01:00 committed by Felix Buehler
parent 62cff77bc0
commit 8100b28206

View file

@ -114,8 +114,8 @@ bindsym $mod+z exec ~/.local/bin/lockscreen -fl
bindsym $mod+y exec ~/.local/bin/lockscreen -fl bindsym $mod+y exec ~/.local/bin/lockscreen -fl
# start dmenu (a program launcher) # start dmenu (a program launcher)
bindsym $mod+x exec --no-startup-id i3-dmenu-desktop --entry-type=command bindsym $mod+Shift+d exec --no-startup-id i3-dmenu-desktop --entry-type=command
bindsym $mod+d exec --no-startup-id albert && albert show bindsym $mod+d exec --no-startup-id albert toggle || albert
# kill focused window # kill focused window
bindsym $mod+Shift+q kill bindsym $mod+Shift+q kill