Commit Graph

657 Commits

Author SHA1 Message Date
Mikhail Zolotukhin
b90a5d49b7 fix(action): 🐛 correctly prefix layout shortcuts
We didn't prefixed them with "bismuth"

BREAKING CHANGE: This will break already binded shortcuts
2021-09-22 02:50:48 +03:00
Mikhail Zolotukhin
429c9af212 test(action): add master area tests 2021-09-22 02:50:48 +03:00
Mikhail Zolotukhin
da9c10fc16 test(action): add window moving action tests 2021-09-22 02:50:48 +03:00
Mikhail Zolotukhin
78c220e496 fix(action): 🐛 notify about rotation non-appliance 2021-09-22 02:50:48 +03:00
Mikhail Zolotukhin
9d1e535725 test(action): add move window action tests 2021-09-22 02:50:48 +03:00
Mikhail Zolotukhin
d2cb2db82a test(action): add focus action tests 2021-09-22 02:50:48 +03:00
Mikhail Zolotukhin
2d2c60874c style(tests): 💡 add eslint ignore for whole test files 2021-09-22 02:50:48 +03:00
Mikhail Zolotukhin
32ae23c6a2 test(action): add simple focus up action unit test
This is just a basic unit test.
2021-09-22 02:50:48 +03:00
Mikhail Zolotukhin
5416912efd feat: 🐛 use unique key strings instead of description for shortcuts configuration
Using description strings for configuration was unsafe: we could
potentially introduce forbidden characters. Also if we wanted to change
she description of the shortcut, we would break the shortcut
configuration on the user side. Now it is only possible with the change
of the unique config string.

BREAKING CHANGE: This will obviously break the existing shortcuts. But
we are introducing this change along with the previous one, that breaks
the shortcut configuration anyway.
2021-09-22 02:50:48 +03:00
Mikhail Zolotukhin
92d57cc82b feat: 🏗️ lean out the shortcuts definitions
This completely changes how are shortcuts are interpreted by the script.
Instead of using the complicated system, where up, down, left and right
keys (hjkl) were used dynamically depended on the mode (directional,
dwm), we just put all the possible shortcuts in the list. This increases
the user's flexibility to bind shortcuts however they want and also
reduces the code complexity.

Since this change breaks the existing shortcuts for the user anyway
and we are currently earlier in the development, it makes sense
to break shortcuts entirely, to we also break the naming scheme.

BREAKING CHANGE: This completely breaks existing shortcuts. Users need
to remove all the existing shortcuts from config file and relogin into
the session immediately. After that, the new set of shortcuts will be
visible in the UI.
2021-09-22 02:50:48 +03:00
Mikhail Zolotukhin
dd1212c2b4 refactor: 🎨 rename shortcut to action
Action here it more applicable, since the shortcut is Ctrl-A or Super+Up, but here it is used to denote action.
2021-09-22 02:50:48 +03:00
Mikhail Zolotukhin
9710c664ae build: 🚨 disable linting where we cannot do anyshing in the short term 2021-09-17 23:30:14 +03:00
Mikhail Zolotukhin
0f43507bcb refactor: 🚨 fix a bundh of linter errors 2021-09-17 23:30:14 +03:00
Mikhail Zolotukhin
1b3c14cbfb docs: 📝 add JSDoc to Controller interface 2021-09-17 23:30:14 +03:00
Mikhail Zolotukhin
aea4e9f6c7 docs: 📝 add a bit more docs to KWin Scripting interface 2021-09-17 23:30:14 +03:00
Mikhail Zolotukhin
78957f4cad docs: 📝 add JSDoc to Toplevel KWin interface 2021-09-17 23:30:14 +03:00
Mikhail Zolotukhin
940140dd17 docs: 📝 add video demonstration 2021-09-17 21:24:27 +03:00
Mikhail Zolotukhin
aef0eaa9b5 refactor: 🚨 add missing return types 2021-09-17 19:23:58 +03:00
Mikhail Zolotukhin
f3eae59f60 refactor: 🚨 curly braces 2021-09-17 19:23:58 +03:00
Mikhail Zolotukhin
13f8029578 refactor: do not read useless config value 2021-09-17 19:23:58 +03:00
Mikhail Zolotukhin
8a814857c0 build: disable linting of any in config.ts 2021-09-17 19:23:58 +03:00
Mikhail Zolotukhin
8ec36c3f46 refactor: 🚨 prefix or comment out some unused vars 2021-09-17 19:23:58 +03:00
Mikhail Zolotukhin
b5a58aa1cc build: 🚨 disable template expression rule 2021-09-17 19:23:58 +03:00
Mikhail Zolotukhin
6e2e54c12a refactor: 🚨 ignore empty Qt interface 2021-09-17 19:23:58 +03:00
Mikhail Zolotukhin
e62b83dadf build: 🚨 ignore unused vars prefixed with _ 2021-09-17 19:23:58 +03:00
Mikhail Zolotukhin
86db2ebf8c refactor: 🚨 use string templates 2021-09-17 19:23:58 +03:00
Mikhail Zolotukhin
cc693602f4 refactor: 🚨 fix function return type rule 2021-09-17 19:23:58 +03:00
Mikhail Zolotukhin
6c586c9033 build: 🚨 turn off any rule
We have to have any types for Qt API anyway.
2021-09-17 19:23:58 +03:00
Mikhail Zolotukhin
714379ff57 build: 🔥 remove one var rule 2021-09-17 19:23:58 +03:00
Mikhail Zolotukhin
f2cbebc9ab build: 🔧 fix eslint configuration 2021-09-17 19:23:58 +03:00
Mikhail Zolotukhin
c2c79f67ea refactor(tests): 🎨 misc artistic changes 2021-09-16 18:25:18 +03:00
Mikhail Zolotukhin
13b1987ee0 test: add a few basic tests with mocks
Tests directory probably will be used for integration tests.
2021-09-16 18:25:18 +03:00
Mikhail Zolotukhin
b759156b3c refactor: 🔥 remove EngineContext 2021-09-15 17:00:59 +03:00
Mikhail Zolotukhin
2800a8d91d refactor: 🎨 rename layout interfaces 2021-09-15 17:00:59 +03:00
Mikhail Zolotukhin
92cdf1edfc refactor: 🎨 reorganize imports 2021-09-15 17:00:59 +03:00
Mikhail Zolotukhin
354e6b43ad refactor: 🔥 cleanup imports 2021-09-13 03:25:21 +03:00
Mikhail Zolotukhin
24b4cce8ac refactor: 🎨 remove unneeded pass of driver in the controller callbacks
Will I finish refactoring? It's 3 AM and I want to sleep
2021-09-13 03:25:21 +03:00
Mikhail Zolotukhin
a320567c3d refactor: 🎨 introduce interface for controller 2021-09-13 03:25:21 +03:00
Mikhail Zolotukhin
ca1909c4c8 refactor: 🎨 create interface for tiling engine
This way we will be able to substitute it in tests
2021-09-13 03:25:21 +03:00
Mikhail Zolotukhin
62e6382285 refactor: 🔥 purge driver context from engine
Hands are useful.
2021-09-13 02:28:51 +03:00
Mikhail Zolotukhin
6e3db51a7f refactor: 🔥 purge driver context from engine context 2021-09-13 02:28:51 +03:00
Mikhail Zolotukhin
351d69af45 refactor: 🎨 pass tiling controller to egine context 2021-09-13 02:28:51 +03:00
Mikhail Zolotukhin
ee686f0086 refactor: 🎨 pass controller to engine and use it for gaining screens 2021-09-13 02:28:51 +03:00
Mikhail Zolotukhin
f24caff379 refactor: 🎨 move entry point to controller
Idea in the TODO was not the best. In the end classes will be ported to interfaces, that we can replace in the tests.
2021-09-13 02:28:51 +03:00
Mikhail Zolotukhin
88ce93b4a2 refactor: 🔥 remove unused ctx param in engine fuction 2021-09-13 02:28:51 +03:00
Mikhail Zolotukhin
a1957a6578 refactor: 🎨 decouple driver from engine
MVC ftw
2021-09-13 02:28:51 +03:00
Mikhail Zolotukhin
9debfb41a1 refactor: 🎨 create MVC in the init script
This is a foundation of the later separation via callbacks.
2021-09-12 20:34:38 +03:00
Mikhail Zolotukhin
d7f83a181e refactor: 🎨 move layouts folder into engine
Engine is a model (like in MVC). Layouts is only its consern.
2021-09-12 20:34:38 +03:00
Mikhail Zolotukhin
bb6dbe6cf1 refactor: 🎨 rename tiling engine file 2021-09-12 20:34:38 +03:00
Mikhail Zolotukhin
73e0474adf refactor: 🎨 move shortcut into controller
Processing user inputs is controller responsibility
2021-09-12 20:34:38 +03:00