Simple gnome-shell (v3.38+) extension to toggle Alacritty window.
Works under both Wayland
and X11
Hotkey: Alt+z
$ git clone https://github.com/axxapy/gnome-alacritty-toggle ~/.local/share/gnome-shell/extensions/[email protected]
$ gnome-extensions enable [email protected]
Show alacritty's window on overview screen:
$ gsettings --schemadir ~/.local/share/gnome-shell/extensions/[email protected]/schemas set org.gnome.shell.extensions.toggle-alacritty hide-on-overview false
Hide alacritty's window on overview screen (default behavior):
$ gsettings --schemadir ~/.local/share/gnome-shell/extensions/[email protected]/schemas set org.gnome.shell.extensions.toggle-alacritty hide-on-overview true
Redefine hotkey
$ gsettings --schemadir ~/.local/share/gnome-shell/extensions/[email protected]/schemas set org.gnome.shell.extensions.toggle-alacritty toggle-key "['<Alt>Z']"
To test if it works, you can launch Alacritty manualy and use this command:
$ dbus-send --print-reply=literal --type=method_call --dest=org.gnome.Shell /org/gnome/Shell org.gnome.Shell.Eval string:"$(cat <<EOL
global.get_window_actors().filter(actor => {
return actor.metaWindow.get_wm_class() === 'Alacritty';
})
EOL
)"
it should output smth like the following:
[{"_windowType":0,"_notifyWindowTypeSignalId":57783}]
Alacritty should be executable by the following path: /usr/bin/alacritty