├── src ├── index.js ├── main │ └── index.js └── renderer │ └── index.html ├── resources ├── Icon.png └── Icon.svg ├── .gitignore ├── package.json ├── LICENSE.md └── README.md /src/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | require('./main') 4 | -------------------------------------------------------------------------------- /resources/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/baruchiro/borderless-camera/master/resources/Icon.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # build output 2 | dist 3 | 4 | # dependencies 5 | node_modules 6 | 7 | # logs 8 | npm-debug.log -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "borderless-camera", 3 | "description": "a simple camera app without window borders, useful for the screencast recording", 4 | "version": "0.0.5", 5 | "license": "MIT", 6 | "author": { 7 | "name": "Luigi Maselli", 8 | "email": "grigio.org@gmail.com", 9 | "url": "https://grigio.org" 10 | }, 11 | "private": true, 12 | "main": "src/index.js", 13 | "scripts": { 14 | "make-pkgs": "node_modules/.bin/build --linux AppImage", 15 | "pack": "build --dir", 16 | "dist": "build", 17 | "start": "electron ." 18 | }, 19 | "devDependencies": { 20 | "electron": "^3.0.2", 21 | "electron-builder": "^20.28.4" 22 | }, 23 | "build": { 24 | "appId": "org.grigio.borderless-camera", 25 | "linux": { 26 | "target": [ 27 | "deb", 28 | "AppImage" 29 | ] 30 | }, 31 | "mac": { 32 | "category": "public.app-category.developer-tools" 33 | }, 34 | "win": { 35 | "target": "portable", 36 | "icon": "build/icon.icns" 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # MIT License 2 | 3 | Copyright (c) 2016 Luigi Maselli https://grigio.org 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Borderless Camera 2 | 3 | ![Borderless Camera](https://cloud.githubusercontent.com/assets/8074/20967471/f0bcb74e-bc7f-11e6-9e0d-3b38ba23b6a5.gif) 4 | 5 | a simple camera app without window borders, useful for the screencast recording 6 | 7 | ## Features 8 | 9 | - [x] Mirroring 10 | - [x] Press `d` for debugMode and `q` to quit 11 | - [ ] On top and On all workspaces by default, it needs to be user changeable 12 | 13 | ## Installation 14 | 15 | [Download the latest executable or the source](https://github.com/grigio/borderless-camera/releases) 16 | 17 | ### Debian / Ubuntu 18 | 19 | ``` 20 | sudo dpkg -i borderless-camera_*.deb 21 | ``` 22 | 23 | ### Other Linux Distros (no root user required) 24 | 25 | Put the `borderless-camera-xxx.AppImage` executable in a persistent path (e.g ~/Apps) and run it. 26 | 27 | ### Run from sources (Linux, MacOS, Windows,...) 28 | 29 | ``` 30 | npm install 31 | npm start 32 | ``` 33 | ### Bitcoin donations 34 | 35 | Buy me a coffee if you want.. 36 | 37 | `12eknq1JnYqd68UUaZBmC7J5ujSqXipN2y` 38 | 39 | ![qr](https://cloud.githubusercontent.com/assets/8074/21113080/7cfb74ee-c0a8-11e6-8f96-03b49ef42dd3.jpg) 40 | 41 | (c) Luigi Maselli (https://corso-javascript.it, https://grigio.org) 42 | -------------------------------------------------------------------------------- /src/main/index.js: -------------------------------------------------------------------------------- 1 | // alwais on top, borderless, transparent, camera 2 | const {app, BrowserWindow} = require('electron') 3 | const path = require('path') 4 | const url = require('url') 5 | const version = require('../../package.json').version 6 | 7 | var ipc = require('electron').ipcMain; 8 | 9 | // Keep a global reference of the window object, if you don't, the window will 10 | // be closed automatically when the JavaScript object is garbage collected. 11 | let win 12 | 13 | ipc.on('invokeAction', function(event, data){ 14 | // var result = processData(data); 15 | if (data === 'appVersion') { 16 | event.returnValue = version 17 | } 18 | 19 | if (data === 'appQuit') { 20 | app.quit() 21 | } 22 | 23 | if (data === 'debugMode') { 24 | win.webContents.openDevTools() 25 | } 26 | 27 | if (data === 'toggleVisibleOnAllWorkspaces') { 28 | win.setVisibleOnAllWorkspaces(false) 29 | console.log(win) 30 | } 31 | 32 | if (data === 'toggleAlwaysOnTop') { 33 | win.setAlwaysOnTop(false) 34 | console.log(win) 35 | } 36 | 37 | 38 | console.log(data) 39 | // win.setAlwaysOnTop(false) 40 | 41 | // event.sender.send('actionReply', result); 42 | }); 43 | 44 | function createWindow () { 45 | // Create the browser window. 46 | win = new BrowserWindow({ 47 | width: 480, 48 | height: 320, 49 | transparent: true, 50 | // titleBarStyle: 'hidden-inset', 51 | frame: false, 52 | // toolbar: false, 53 | }) 54 | 55 | // and load the index.html of the app. 56 | win.loadURL(url.format({ 57 | pathname: path.resolve(__dirname, '../renderer/index.html'), 58 | protocol: 'file:', 59 | slashes: true 60 | })) 61 | 62 | // Open the DevTools. 63 | win.setVisibleOnAllWorkspaces(true) 64 | 65 | // Emitted when the window is closed. 66 | win.on('closed', () => { 67 | // Dereference the window object, usually you would store windows 68 | // in an array if your app supports multi windows, this is the time 69 | // when you should delete the corresponding element. 70 | win = null 71 | }) 72 | 73 | // ontop 74 | win.setAlwaysOnTop(true) 75 | // win.show() 76 | 77 | 78 | 79 | 80 | // setInterval(function(){ win.setAlwaysOnTop(true);}, 10000); 81 | } 82 | 83 | // This method will be called when Electron has finished 84 | // initialization and is ready to create browser windows. 85 | // Some APIs can only be used after this event occurs. 86 | app.on('ready', createWindow) 87 | 88 | // Quit when all windows are closed. 89 | app.on('window-all-closed', () => { 90 | // On macOS it is common for applications and their menu bar 91 | // to stay active until the user quits explicitly with Cmd + Q 92 | if (process.platform !== 'darwin') { 93 | app.quit() 94 | } 95 | }) 96 | 97 | app.on('activate', () => { 98 | // On macOS it's common to re-create a window in the app when the 99 | // dock icon is clicked and there are no other windows open. 100 | if (win === null) { 101 | createWindow() 102 | } 103 | }) 104 | 105 | 106 | 107 | // In this file you can include the rest of your app's specific main process 108 | // code. You can also put them in separate files and require them here. -------------------------------------------------------------------------------- /src/renderer/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Borderless Camera 8 | 77 | 78 | 79 | 80 | 81 | 82 | 83 |
84 | 85 |
86 |
87 |
93 | Borderless Camera 94 |
95 |
96 | M 97 |
98 |
99 | ℹ 100 |
101 |
102 | ⨯ 103 |
104 | 105 |
106 |
107 | 108 | 109 | 110 | 207 | 208 | -------------------------------------------------------------------------------- /resources/Icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 23 | 25 | 28 | 32 | 36 | 37 | 46 | 47 | 66 | 68 | 69 | 71 | image/svg+xml 72 | 74 | 75 | 76 | 77 | 78 | 83 | 90 | 97 | 102 | 107 | 113 | 118 | 123 | 128 | 129 | 130 | --------------------------------------------------------------------------------