daniellandau / switcher

Gnome Shell extension to switch windows quickly by typing
GNU General Public License v3.0
352 stars 43 forks source link

install with commands manually #93

Closed mcarifio closed 4 years ago

mcarifio commented 4 years ago

On Ubuntu 19.10 I'm having problems installing switcher via chrome so I tried to install manually by piecing together various instructions on the interwebs. Because I'm writing this issue, you can predict how it went :-):

mkdir -p ~/.local/share/gnome-shell/extensions
cd ~/.local/share/gnome-shell/extensions
git clone https://github.com/daniellandau/switcher.git switcher@landau.fi
gnome-extensions enable switcher@landau.fi  # I think this actually installs the extension
gnome-shell --replace  # restarts the shell with a new session, unfortunately
gnome-extensions list | grep switcher
switcher@landau.fi

Success! w and x worked as advertised. Then I got ummm tricky and tried to substitute x because that's my muscle memory. I tried it with dconf, which was probably a mistake, since I bollixed things pretty well:

# dconf save (and remove) the current binding for `switch applications` at the command line.
dconf read /org/gnome/desktop/wm/keybindings/switch-applications > org.gnome.desktop.wm.keybindings.switch-applications.txt
dconf write /org/gnome/desktop/wm/keybindings/switch-applications "['<Super>Tab']"
dconf write /org/gnome/shell/extensions/switcher/show-switcher "['<Alt>Tab']" # creates the key and assigns the value
gnome-shell --replace # get the switcher above

At this point, Tab and w do nothing. I tried to manually recover using the keyboard settings and I have Tab back to switch-applications. But I can't manage to correctly reinstall switcher:

gnome-extensions disable switcher@landau.fi
gnome-shell --replace
gnome-extensions list | grep switcher  # doesn't show
# redo the command above

I note that a disable doesn't make the dconf/gsettings entries disappear, so perhaps I need to do something there also.

I did discover -- afterwards unfortunately -- gnome-extensions prefs switcher@landau.fi. That would have been the preferred way to have swapped keys. But my gnome fu is pretty weak. I also discovered gsettings, which might have been a better alternative to dconf and dconf-editor.

So, finally, is there a set of directions that guide me through an install/reinstall at the command line via bash?

mcarifio commented 4 years ago

I reproduced the installation up to the dconf part on a second box. Worked as advertised. So my dconf-ing screwed something up and I don't yet know how to undo it. Please advise at your earliest convenience.

On the plus side, I learned there's a difference in gnome between switch-windows and switch-applications. Which makes sense, after the fact.

daniellandau commented 4 years ago

You can at least use dconf-editor to delete all the keys related to switcher. There's also "Reset recursively" (or something to that effect, I have my desktop in Finnish and starting dconf-editor with LANG or LC_ALL didn't seem to do anything) to reset maybe even more stuff in gnome itself if that ends up being the solution.

I'm all for using the command line (hey, I created an extension to use the keyboard more in gnome shell), but I haven't really put that much effort into how to do everything on the command line for this. It is an extension to a desktop environment, so everyone using it is also using a GUI by definition.

That said, if you can find some error messages from the logs (perhaps journalctl /usr/bin/gnome-shell in your distro) I'd be happy to take a look.

mcarifio commented 4 years ago

It was pilot error on my part. I had managed to disable the switcher through gnome-tweaks. Once I enabled it, I got super-{w,x}. And learned some things along the way. Ty.

daniellandau commented 4 years ago

Closing this issue, as the problem seems to be resolved. Feel free to reopen or open a new one if problems still persist.