Skip to main content
September 1, 2021
Question

1Password Shortcuts on Wayland

  • September 1, 2021
  • 16 replies
  • 6763 views

1Password is an application that works very well when users can invoke it from anywhere. Quick Access in particular is a feature that is meant to be invoked from anywhere on your desktop. However, as many of you know, the Wayland developers made a deliberate choice to not allow applications to set global shortcuts. To my knowledge, all Wayland implementations have continued to honor this choice. The reasoning is valid, though: global shortcuts make keyloggers trivial.

1Password can run as a native Wayland application, and defaults to XWayland. This, however, does not help since the primary desktop environment is itself Wayland.

For a variety of reasons, we have provided command line options for several of the most useful 1Password commands. In this article, I'll describe how to use those options to set up global shortcuts for 1Password with both Gnome Shell and Sway. It is, fortunately, very easy.

Gnome Shell

For this example, I'm running Gnome Shell 40.4.0, Wayland mode, on Fedora Core 34.

Start by finding Keyboard > Customize Shortcuts in your Settings application.

Next, select Customize Shortcuts

Your list of custom shortcuts may start empty, but you will want to get to something like this:

Press the + button at the bottom to create a new shortcut, and you'll get a screen like this:

As you create each shortcut, name each one in a way that makes sense to you. In the Command field, you will write a trivial script that invokes 1Password with the option that you want. Once you have created that invocation, set the keyboard shortcut as you desire. I recommend multiple key bindings that all work together. The following is the 1Password defaults set on other platforms, and on XOrg-based displays.

Name Command Shortcut
Open or Toggle 1Password 1password --toggle Ctrl + p
Lock 1Password 1password --lock Ctrl + Shift + L
Open Quick Access 1password --quick-access Ctrl + Shift + Space

note: there is no default for Open or Toggle 1Password, so I made something up.

Sway

Sway does not have a GUI configurator, but instead does everything in the configuration file at ~/.config/sway/config. Fortunately, this is very easy to set up:


bindsym Ctrl+Shift+l 1password --lock
byndsym Ctrl+Shift+space exec 1password --quick-access

KDE Plasma

coming soon

16 replies

September 15, 2021

I need to change this:
Open Quick Access 1password --quick-access Ctrl + Shift + Space

on KDE Plasma.

Guys, you can't just start to mess with peoples shortcuts without a way to disable it. Who thought this was a good idea!?

Big no, no, no, no!

I'm running a mouseless tiling setup and this breaks everything without warning...

1P_PeterG
Community Manager
September 15, 2021

Hi @JoeVandelay,

sorry to hear about this issue. Can you tell us a little more about how this arose?

The reason I ask is that this new functionality allows you to customize the shortcuts to nearly anything you want - for example the Ctrl + Shift + Space to open Quick Access can be changed to Ctrl + Shift +S, or any other number of shortcuts you choose.

Also, these are user-determined shortcuts, so you don't have to set up any in Wayland if you don't want to.

Apologies in advance if I'm misunderstanding something. No matter what, we want to make sure 1Password works with your setup, in the way that works best for you. 👍

September 16, 2021

So whenever I press ctrl+shift+space quick access opens.

There is no option in 1Password itself to change the shortcut or disable it. There is no option in KDE's (xwindow) Shortcuts to change it. So I don't know how to fix it. Except go grep-ing through dotfiles, what I don't want to do just to get my workflow back

I'm using KDE plasma without Wayland (because of Nvidia drivers)

I like the idea of quick access. But new features need a disable toggle

September 16, 2021

To be clear, I didn't add those, it did it by default

The following is the 1Password defaults set on other platforms, and on XOrg-based displays.

September 16, 2021

The following is the 1Password defaults set on other platforms, and on XOrg-based displays.

Thanks for the quick fix. Beta is not Alpha and un-askes changes to user environment should not leak

September 16, 2021

Hi, @JoeVandelay. The current beta added the ability to edit shortcuts in 8.2.2-19, and the ability to clear the shortcuts in 8.2.2-23. Those features did not make it into the latest stable release.

December 7, 2021

I'm running 1password 8.4.1 in Fedora 35 with "1password --enable-features=UseOzonePlatform --ozone-platform=wayland"
when first quick access launch fine but second makes 1password app crash with this error:

[25769:1206/173556.083974:ERROR:wayland_event_watcher.cc(242)] Fatal Wayland protocol error 0 on interface wl_surface (object 50). Shutting down..

jmanes
January 5, 2022

The 1password command does not seem present for me using Flatpak. I changed the keybinding to invoke the following instead:

flatpak run com.onepassword.OnePassword --quick-access

This renders the same result. Thanks for adding this feature!

January 23, 2022

Is there any news on bringing Full Wayland support for Linux please?
I would really like to uninstall XWayland since it's working pretty bad with modern hard- software.

January 24, 2022

@Goldgamer We ran into trouble (an inexplicable crash) last month with a version of electron that was supposed to have full Wayland support. I had to table things for a bit and haven't had the chance to get back.