Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:oliverschwendener/ueli into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverschwendener committed May 30, 2018
2 parents be5e479 + cfd2408 commit a0811d7
Show file tree
Hide file tree
Showing 16 changed files with 84 additions and 51 deletions.
78 changes: 35 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# ueli

This is an alt+space launcher for Windows and macOS.
This is a keystroke launcher for Windows and macOS.

![ueli screenshot](img/doc/ueli-example.jpg)

Expand All @@ -29,34 +29,34 @@ This is an alt+space launcher for Windows and macOS.

## Quick tutorial

* Press `alt+space` to show/hide the window
* Press the global hot key to show/hide the window (default is `alt+space`)
* Start typing a program name
* Press Enter to launch the program

## Features

### Program search

![Feature Program search](img/doc/features/ueli-feature-program-search.png)

* You can search for installed programs
* Use the arrow keys to scroll up and down
* Presss Enter to launch the selected program

### Files and folder search
![Feature Program search](img/doc/features/ueli-feature-program-search.png)

![Feature home folder](img/doc/features/ueli-feature-home-folder.png)
### Files and folder search

* You can search files and folders in your home folder
* Press Enter to open the selected file/folder

### Open URLs with your default web browser
![Feature home folder](img/doc/features/ueli-feature-home-folder.png)

![Feature URL](img/doc/features/ueli-feature-url.png)
### Open URLs with your default web browser

* Type in a URL
* Press enter to open the URL with your default web browser

![Feature URL](img/doc/features/ueli-feature-url.png)

### Open default mail program

* Type in a email address
Expand All @@ -66,22 +66,10 @@ This is an alt+space launcher for Windows and macOS.

### Web search engines

![Feature web search engines](img/doc/features/ueli-feature-web-search.png)
* You can use web search engines with a prefix and `?`.
* Example: `g?{your search term}`

* You can [customize](#customization) web search engines like this:

``` json
"webSearches": [
{
"icon": "<svg>...</svg>",
"name": "Google",
"prefix": "g",
"url": "https://google.com/search?q="
}
]
```

Now you can type in `g?{your search term}` to launch the web search engine in your default browser.
![Feature web search engines](img/doc/features/ueli-feature-web-search.png)

Default web search engines:

Expand All @@ -94,38 +82,49 @@ Default web search engines:
|`w`|[Wikipedia](https://wikipedia.org)|
|`yt`|[YouTube](https://youtube.com)|

### Execute commandline tools
* You can [customize](#customization) web search engines like this:

![Feature commandline](img/doc/features/ueli-feature-commandline.png)
``` json
"webSearches": [
{
"icon": "<svg>...</svg>",
"name": "My Search Engine",
"prefix": "m",
"url": "https://my-search-engine.com/search?q="
}
]
```

### Execute commandline tools

* Start a commandline tool with the `>` prefix
* Example: `>ipconfig /all`
* Stop an executing commandline tool with `Ctrl+c`

> Note: you can **not** interact with the commandline tool. You only see the output.
### Browse file system
![Feature commandline](img/doc/features/ueli-feature-commandline.png)

![Feature file browser](img/doc/features/ueli-feature-file-browser.png)
### Browse file system

* You can browse your file system by typing in a filepath
* Example: `C:\Users` or `/Applications`
* Press `Enter` to open the file or folder
* Press `Tab` for autocompletion

### Calculator
![Feature file browser](img/doc/features/ueli-feature-file-browser.png)

![Feature calculator](img/doc/features/ueli-feature-calculator.png)
### Calculator

* Calculate simple math, matrix, symbolic function, convert unit and a lot more.
* Example:
* `23 * 24 / 2 + (6 * 7) ^ 2`
* `1 km/h to mile/h`
* `a = [1, 2, 3]; a * 2`

### Custom commands
![Feature calculator](img/doc/features/ueli-feature-calculator.png)

![Feature custom commands](img/doc/features/ueli-feature-custom-commands.png)
### Custom commands

* You can [customize](#customization) custom commands to
* Start command line tools
Expand All @@ -138,25 +137,21 @@ Default web search engines:
"name": "ping",
"executionArgument": "start ping 8.8.8.8 -t",
"icon": "<svg>...</svg>"
},
{
"name": "Data",
"executionArgument": "start \"\" \"C:\\Data\""
},
{
"name": "code",
"executionArgument": "start \"\" \"C:\\My-Programs\\Visual Studio Code\\Visual Studio Code.lnk\""
},
}
]
```

![Feature custom commands](img/doc/features/ueli-feature-custom-commands.png)

### Keyboard shortcuts

|Keyboard shortcut|Description|
|---|---|
|`Ctrl+o`|Open the selected program or file at it's location|
|`ArrowUp`|Scroll up|
|`ArrowDown`|Scroll down|
|`Shift+ArrowUp`|Browse user input history up|
|`Shift+ArrowDown`|Browse user input history down|
|`F6`, `Ctrl+l`|Set focus on user input|
|`F1`|Get help|

Expand Down Expand Up @@ -209,9 +204,6 @@ All settings are stored in `~/ueli.config.json`. You can modify this file to cha

## Roadmap

* List frequently executed programs/files/settings higher
* Add option to add custom shortcuts
* Add input history browsing
* Add nice GUI to modifiy configuration
* Notify user when update is available
* Use vue components
Expand Down
Binary file modified img/doc/features/ueli-feature-calculator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/doc/features/ueli-feature-commandline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/doc/features/ueli-feature-custom-commands.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/doc/features/ueli-feature-email.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/doc/features/ueli-feature-file-browser.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/doc/features/ueli-feature-home-folder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/doc/features/ueli-feature-program-search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/doc/features/ueli-feature-url.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/doc/features/ueli-feature-web-search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
{
"name": "ueli",
"productName": "ueli",
"version": "4.2.0",
"version": "4.3.0",
"author": {
"name": "Oliver Schwendener",
"email": "oliver.schwendener@hotmail.com",
"url": "https://github.com/oliverschwendener"
},
"description": "A cross-platform alt+space launcher",
"description": "A keystroke launcher for Windows and macOS",
"keywords": [
"keystroke",
"launcher",
"search",
"Windows",
"macOS"
],
"main": "./build/main.js",
"scripts": {
"build": "./node_modules/.bin/webpack",
Expand Down
21 changes: 21 additions & 0 deletions src/tests/unit/user-input-history-manager.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { TestableUserInputHistoryManager } from "./testable-user-input-history-manager";
import { UserInputHistoryManager } from "../../ts/user-input-history-manager";

describe(TestableUserInputHistoryManager.name, (): void => {
describe("addItem", (): void => {
Expand Down Expand Up @@ -52,6 +53,16 @@ describe(TestableUserInputHistoryManager.name, (): void => {

expect(actual).toBe(history[0]);
});

it("should return an empty string if history is empty", (): void => {
const history = [];
const manager = new TestableUserInputHistoryManager();
manager.setHistory(history);

const actual = manager.getPrevious();

expect(actual).toBe("");
});
});

describe("getNext", (): void => {
Expand Down Expand Up @@ -92,5 +103,15 @@ describe(TestableUserInputHistoryManager.name, (): void => {

expect(acutal).toBe("");
});

it("should return an ampty string if history is empty", (): void => {
const history = [];
const manager = new TestableUserInputHistoryManager();
manager.setHistory(history);

const actual = manager.getNext();

expect(actual).toBe("");
});
});
});
1 change: 1 addition & 0 deletions src/ts/ipc-channels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export class IpcChannels {
public static readonly commandLineOutput = "command-line-output";
public static readonly ueliReload = `${UeliHelpers.ueliCommandPrefix}reload`;
public static readonly ueliExit = `${UeliHelpers.ueliCommandPrefix}exit`;
public static readonly ueliCheckForUpdates = `${UeliHelpers.ueliCommandPrefix}check-for-updates`;
public static readonly exitCommandLineTool = "exit-command-line-tool";
public static readonly resetCommandlineOutput = "reset-commandline-output";
public static readonly resetUserInput = "reset-user-input";
Expand Down
4 changes: 4 additions & 0 deletions src/ts/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,3 +265,7 @@ ipcMain.on(IpcChannels.resetUserInput, (): void => {
ipcMain.on(IpcChannels.showHelp, (): void => {
new WebUrlExecutor().execute("https://github.com/oliverschwendener/ueli#ueli");
});

ipcMain.on(IpcChannels.ueliCheckForUpdates, (): void => {
autoUpdater.checkForUpdates();
});
16 changes: 10 additions & 6 deletions src/ts/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,18 @@ const vue = new Vue({
handleEnterPress();
} else if (event.ctrlKey && event.key === "o") {
handleOpenFileLocation();
} else if ((event.key === "ArrowDown" || event.key === "ArrowUp") && event.shiftKey) {
const direction = event.key === "ArrowUp" ? "prev" : "next";
handleInputHistoryBrowsing(direction);
} else if (event.key === "ArrowDown" || event.key === "ArrowUp") {
event.preventDefault();
vue.isMouseMoving = false;
const direction = event.key === "ArrowDown" ? "next" : "prev";
changeActiveItem(direction);

if (event.shiftKey) {
event.preventDefault();
const direction = event.key === "ArrowUp" ? "prev" : "next";
handleInputHistoryBrowsing(direction);
} else {
vue.isMouseMoving = false;
const direction = event.key === "ArrowDown" ? "next" : "prev";
changeActiveItem(direction);
}
} else if (event.key === "Tab") {
event.preventDefault();
handleAutoCompletion();
Expand Down
4 changes: 4 additions & 0 deletions src/ts/search-plugins/ueli-commands-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export class UeliCommandsSearchPlugin implements SearchPlugin {
executionArgument: UeliHelpers.configFilePath,
name: "Edit configuration file",
} as UeliCommand,
{
executionArgument: IpcChannels.ueliCheckForUpdates,
name: "Check for updates",
},
];
}

Expand Down

0 comments on commit a0811d7

Please sign in to comment.