diff options
| author | sommerfeld <sommerfeld@sommerfeld.dev> | 2026-09-26 22:23:04 +0100 |
|---|---|---|
| committer | sommerfeld <sommerfeld@sommerfeld.dev> | 2026-09-26 22:23:04 +0100 |
| commit | 869ea8436d9cf9d5748e6c089cc0b0b58358e75f (patch) | |
| tree | 57d765d0a975b67573673f13d00a1584cb2c35f4 /tests/test_canonical_desktop.py | |
| parent | d6f4aee0ccf47dea61204f4af44d8eed2e65f96c (diff) | |
| download | dotfiles-869ea8436d9cf9d5748e6c089cc0b0b58358e75f.tar.gz dotfiles-869ea8436d9cf9d5748e6c089cc0b0b58358e75f.tar.bz2 dotfiles-869ea8436d9cf9d5748e6c089cc0b0b58358e75f.zip | |
Align GNOME shortcuts with the Sway setup
Diffstat (limited to 'tests/test_canonical_desktop.py')
| -rw-r--r-- | tests/test_canonical_desktop.py | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/tests/test_canonical_desktop.py b/tests/test_canonical_desktop.py index 146ae9f..039948f 100644 --- a/tests/test_canonical_desktop.py +++ b/tests/test_canonical_desktop.py @@ -60,17 +60,31 @@ class DesktopTests(unittest.TestCase): with patch.object(desktop, "write_key") as write: desktop.tiling({}) schema = "org.gnome.shell.extensions.o-tiling" - for key in [ - "tile-enter", - "toggle-tiling", - "tile-orientation", - "pop-workspace-up", - "pop-workspace-down", - ]: + for key in ["toggle-tiling", "pop-workspace-up", "pop-workspace-down"]: write.assert_any_call(schema, key, [], {}) write.assert_any_call(schema, "new-window-placement", "focused", {}) - write.assert_any_call(schema, "focus-right", ["<Super>Right"], {}) + write.assert_any_call(schema, "focus-right", ["<Super>l"], {}) write.assert_any_call(schema, "tile-move-down-global", ["<Super><Shift>j"], {}) + write.assert_any_call(schema, "tile-enter", ["<Super>r"], {}) + write.assert_any_call(schema, "tile-resize-left", ["h"], {}) + + def test_desktop_bindings_release_sway_keys_and_keep_lock(self): + with patch.object(desktop, "write_key") as write: + desktop.desktop_bindings({}) + wm = "org.gnome.desktop.wm.keybindings" + media = "org.gnome.settings-daemon.plugins.media-keys" + write.assert_any_call(wm, "switch-applications", ["<Alt>Tab"], {}) + write.assert_any_call(wm, "switch-input-source", [], {}) + write.assert_any_call(wm, "switch-input-source-backward", [], {}) + write.assert_any_call(media, "screensaver", ["<Super><Shift>s"], {}) + write.assert_any_call(media, "mic-mute", ["<Super>m"], {}) + + def test_workspace_cycle_keys_are_configured(self): + with patch.object(desktop, "write_key") as write: + desktop.workspaces({}) + schema = "org.gnome.shell.extensions.workspace-cycle" + write.assert_any_call(schema, "next-workspace", ["<Super>Tab"], {}) + write.assert_any_call(schema, "previous-workspace", ["<Super><Shift>Tab"], {}) def test_clipboard_shortcut_preserves_other_display_bindings(self): settings = MagicMock() |
