Skip to content

Commit

Permalink
Add linux support
Browse files Browse the repository at this point in the history
  • Loading branch information
Ram Lmn committed Sep 24, 2017
1 parent 7d71e1f commit 79f455c
Show file tree
Hide file tree
Showing 8 changed files with 61 additions and 24 deletions.
40 changes: 24 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,38 @@
<h1 align="center">
<br>
<img width="200" src="https://rawgit.com/ramlmn/electron-clippy/master/media/logo.svg" alt="Clippy">
<br>
<br>
</h1>

# Clippy
A clipboard manager built on [electron](https://github.com/electron/electron/), using [WebComponents](https://developer.mozilla.org/en-US/docs/Web/Web_Components)
> A clipboard manager built on [electron](https://github.com/electron/electron/), using [WebComponents](https://developer.mozilla.org/en-US/docs/Web/Web_Components)
## Installation
> **Note:** Pre-built [binaries](https://github.com/ramlmn/electron-clippy/releases) are available for Windows only
_Linux, and Windows 7+ are supported (64-bit only)_

Clone the repo and install dependencies
```
$ git clone https://github.com/ramlmn/electron-clippy.git
$ cd electron-clippy
$ npm i
```
### Linux
[**Download**](https://github.com/ramlmn/electron-clippy/releases/latest) the `.AppImage` or `.deb` file

_The AppImage needs to be [made executable](http://discourse.appimage.org/t/how-to-make-an-appimage-executable/80) after download_

### Windows
[**Download**](https://github.com/ramlmn/electron-clippy/releases/latest) the `.exe` file

For running the application from console:
## Usage
By default the app would be running in the background and can be accessed by the keyboard shortcut: `Ctrl+Shift+V`

## Dev
### Run
```
$ npm start
$ npm install && npm start
```

For building a binary:
### Build
```
$ npm run build
```
The binary(for your platform) would be available in `dist` directory

## Usage
The app is still in beta and doesn't have a feature to customize anything.
The app would be running in the system tray and can be accessed by the keyboard shortcut: `Ctrl+Shift+V` or `Cmd+Shift+V`
or check [`electron-builder` docs](https://www.electron.build/multi-platform-build)

## Acknowledgements
* UI inspired from [Alfred app](https://www.alfredapp.com/)
Expand Down
12 changes: 12 additions & 0 deletions media/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 12 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clippy",
"version": "1.0.0-alpha.3",
"version": "1.0.0-alpha.4",
"description": "A clipboard manager built on electron",
"license": "MIT",
"repository": "ramlmn/electron-clippy",
Expand All @@ -18,10 +18,10 @@
"pack": "build --dir"
},
"devDependencies": {
"electron": "^1.6.11",
"electron": "1.6.13",
"electron-builder": "^19.8.0",
"eslint": "^4.1.1",
"eslint-config-google": "^0.8.0",
"eslint-config-google": "^0.9.1",
"eslint-plugin-html": "^3.0.0"
},
"build": {
Expand All @@ -32,8 +32,16 @@
"node_modules",
"!(*.markdown|*.md|*.txt|.*|LICENSE|README|test)"
],
"linux": {
"category": "Productivity",
"icon": "src/build-assets/icon/png",
"target": [
"AppImage",
"deb"
]
},
"win": {
"icon": "media/icon/clip-icon.ico",
"icon": "src/build-assets/icon/win/win.ico",
"target": [
"nsis"
]
Expand Down
Binary file added src/build-assets/icon/png/128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
3 changes: 1 addition & 2 deletions src/main/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ ipcMain.on('settings', handleSettings);

function onClosed() {
// Dereference the window
// For multiple windows store them in an array
mainWindow = null;
}

Expand Down Expand Up @@ -111,7 +110,7 @@ function createMainWindow() {
win.on('blur', hideWindow);

const urlToLoad = url.format({
pathname: path.join(__dirname, '..', 'renderer', 'index.html'),
pathname: path.join(__dirname, '../renderer/index.html'),
protocol: 'file:',
slashes: true,
});
Expand Down
13 changes: 12 additions & 1 deletion src/renderer/components/clippy-app.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,19 @@
flex-direction: column;
flex: 1;
background: #fff;
border-radius: .3em;
overflow: hidden;
margin: 1rem;
border-radius: .3em;
box-shadow: 0 0px 10px 0 rgba(0, 0, 0, .14),
0 4px 18px 0 rgba(0, 0, 0, .12),
0 3px 5px -2px rgba(0, 0, 0, .2);
}

:host(.is-linux) {
margin: 0;
box-shadow: none;
border-radius: 0;
}
</style>
<slot></slot>
</template>
Expand All @@ -34,6 +41,10 @@
}

ready() {
if (process.platform === 'linux') {
this.classList.add('is-linux');
}

window.addEventListener('load', this.init);

// Critical key events
Expand Down
1 change: 0 additions & 1 deletion src/renderer/stylesheets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ body {
line-height: 1.5;
flex-direction: column;
background: transparent;
padding: 1em;
}

.panes-container {
Expand Down

0 comments on commit 79f455c

Please sign in to comment.