- Search the web
- Run applications (or activate/close application window)
- Open file with default application
- Eval one line python code (advanced calculator)
- Your imagination
NOTE: use space to seperate keyword and arguments
- Space is not supposed to occur in keyword, indeed I use it to recognize keyword, but you can use it for completion (for commonly used command)
- You can use “keyword new” to force kuma open a new application (if the command do) rather activate one window
- When the popup have too many rows (> 2), try to press <Control-l>, see section “Emacs keybindings” below for detail
- Try `restart` keyword
- Keyword completion and path completion
- Path completion should start with ~/, / (also work for windows) or c:/(only for windows)
- Short keywords are too hard to remember, I think the whole word plus completion is better
- I think less used applications need not to be added to keyword’s completions
See below
- First time adding commonly used apps is painful
- Only implement exact prefix matching
- Python3
- PyQt5
- python3-xlib is required, which may have been already installed by default
- xprop command line tool, which may have been already installed by default
NOTE: xprop is included in x11-utils on ubuntu 18.04
win32api
NOTE: pip install may raise ImportError, please download exe from the following url: https://sourceforge.net/projects/pywin32/files/pywin32/
or you can just install anaconda
- pyobjc-core
- pyobjc-framework-Cocoa
- pyobjc-framework-Quartz
NOTE: Do not run kuma multiple times (global hotkey will only call the first kuma)
python3 travel_async_but_risky.py
I think it’s just a piece of cake for linux guys
For me, xfce4-session-settings -> Application Autostart -> then add command: python3 {absolute path}/travel_for_linux.py
Double click travel_for_windows.pyw
http://www.intowindows.com/how-to-add-apps-to-startup-in-windows-10/
- find PyQt5’s library path
from PyQt5.QtWidgets import QApplication
app = QApplication.instance() # must before FM
if app is None:
app = QApplication(sys.argv)
print(app.libraryPaths())
- then you will see the paths, for example:
['/usr/local/lib/python3.8/dist-packages/PyQt5/Qt5/plugins', '/usr/bin']
- then
sudo cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so /usr/local/lib/python3.8/dist-packages/PyQt5/Qt5/plugins/platforminputcontexts/
sudo chmod +x /usr/local/lib/python3.8/dist-packages/PyQt5/Qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so
see `system_config.json` and `user_config.json`
NOTE:
- “Keyword” in user_config should be unique in certain platform
- “Pattern”: you can write a regular expression to match window’s appname or title better, ” means use keyword instead
- “Platform”: must in {”, ‘Windows’, ‘Linux’, ‘Darwin’}, ” means available on all platforms
- user_config keyword has higher priority than system_config (Overwrite)
- Sp type keyword only work in system_config, which has highest priority (Built-in)
see `shortcuts.json`
- Complete
- Insert (if only one completion)
- Insert longest common prefix
- Complete with the selected row (popup’s)
- Run command
- Select completion
- Complete path or keywords when possible
- Run user-defined callback
if a popup has 9 rows: if the highlighted row in the upper half: then jump to line 7 (change with the number of rows) # NOTE: this will let you go to any row within 3 keystrokes else: jump to line 3 so do other popup with different number of rows
see `theme.json`
- You only need to implement a main function which will be called when you press <Enter> after type in the workflow’s name.
- Use the main function’s returned value to interact with kuma.
- The default python file of a workflow is ‘workflow.py’.format(workflow_name), or specify “File” attribute in config to change it.
- See base.py and the workflows.py for more details
From one of the most popular cartoon “One Piece”.
Bartholomew Kuma, whose Devil Fruit ability can send people to any place easily, just like the thing I want my script do.
- sogou input method on win10, not occur in the proper position (decay)
- complete without case sensetive
- disable kuma’s Alt+F4 for misoperation