-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4052869
Showing
28 changed files
with
998 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "src-tauri/packages/tao"] | ||
path = src-tauri/packages/tao | ||
url = ssh://[email protected]/RoundedCorners/tao.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 0.0.1 | ||
|
||
Initial commit |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<p align="center"> | ||
<img width="64" height="64" src="./src-tauri/src/img/icon.ico"> | ||
</p> | ||
|
||
# Rounded Corners | ||
|
||
This app rounds the corners of your Windows screen. | ||
|
||
![Rounded Corners](./.github/cover.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "roundedcorners-app", | ||
"version": "0.0.1", | ||
"description": "", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "vite build", | ||
"dev": "vite", | ||
"serve": "vite preview", | ||
"tauri": "tauri" | ||
}, | ||
"dependencies": { | ||
"@tauri-apps/api": "1.0.2", | ||
"solid-js": "1.4.7" | ||
}, | ||
"devDependencies": { | ||
"@tauri-apps/cli": "1.0.5", | ||
"autoprefixer": "10.4.7", | ||
"postcss": "8.4.14", | ||
"tailwindcss": "3.1.6", | ||
"typescript": "4.7.4", | ||
"vite": "3.0.2", | ||
"vite-plugin-solid": "2.3.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module.exports = { | ||
plugins: [ | ||
require("postcss-import"), | ||
require("postcss-url"), | ||
require("tailwindcss/nesting"), | ||
require("tailwindcss")("./tailwind.config.js"), | ||
require("postcss-combine-media-query"), | ||
require("postcss-combine-duplicated-selectors")({ | ||
removeDuplicatedProperties: true, | ||
removeDuplicatedValues: false, | ||
}), | ||
require("autoprefixer"), | ||
require("cssnano")({ preset: "advanced" }), | ||
require("postcss-reporter"), | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
/target/ | ||
WixTools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[package] | ||
name = "roundedcorners" | ||
version = "0.0.1" | ||
description = "Rounded Corners" | ||
authors = ["Nikola Hristov <[email protected]>"] | ||
license-file = "LICENSE" | ||
repository = "https://github.com/RoundedCorners/app" | ||
default-run = "roundedcorners" | ||
edition = "2021" | ||
rust-version = "1.57" | ||
|
||
[patch.crates-io] | ||
tao = { path = "packages/tao" } | ||
|
||
[build-dependencies] | ||
tauri-build = { version = "1.0.4", features = [] } | ||
|
||
[dependencies] | ||
serde_json = "1.0.82" | ||
serde = { version = "1.0.140", features = ["derive"] } | ||
tauri = { version = "1.0.5", features = ["system-tray", "window-set-position"] } | ||
|
||
[features] | ||
# by default Tauri runs in production mode | ||
# when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL | ||
default = ["custom-protocol"] | ||
# this feature is used used for production builds where `devPath` points to the filesystem | ||
# DO NOT remove this | ||
custom-protocol = ["tauri/custom-protocol"] |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
fn main() { | ||
tauri_build::build() | ||
} |
Submodule tao
added at
e0fc84
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#![cfg_attr(all(not(debug_assertions), target_os = "windows"), windows_subsystem = "windows")] | ||
|
||
use tauri::{CustomMenuItem, Manager, SystemTray, SystemTrayEvent, SystemTrayMenu}; | ||
|
||
fn main() { | ||
tauri::Builder::default() | ||
.system_tray( | ||
SystemTray::new().with_menu( | ||
SystemTrayMenu::new() | ||
.add_item(CustomMenuItem::new("show".to_string(), "Show")) | ||
.add_item(CustomMenuItem::new("hide".to_string(), "Hide")) | ||
.add_item(CustomMenuItem::new("exit".to_string(), "Exit")), | ||
), | ||
) | ||
.on_system_tray_event(|app, event| { | ||
if let SystemTrayEvent::MenuItemClick { id, .. } = event { | ||
match id.as_str() { | ||
"show" => { | ||
app.windows().into_iter().for_each(|(_label, window)| { | ||
window.show().unwrap(); | ||
}); | ||
} | ||
"hide" => { | ||
app.windows().into_iter().for_each(|(_label, window)| { | ||
window.hide().unwrap(); | ||
}); | ||
} | ||
"exit" => { | ||
std::process::exit(0); | ||
} | ||
_ => {} | ||
} | ||
} | ||
}) | ||
.run(tauri::generate_context!()) | ||
.expect("Error! Failed to run Rounded Corners."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{ | ||
"$schema": "..\\node_modules/@tauri-apps/cli\\schema.json", | ||
"build": { | ||
"beforeBuildCommand": "npm run build", | ||
"beforeDevCommand": "npm run dev", | ||
"devPath": "http://localhost:3000", | ||
"distDir": "../dist" | ||
}, | ||
"package": { | ||
"productName": "Rounded Corners", | ||
"version": "0.0.1" | ||
}, | ||
"tauri": { | ||
"allowlist": { | ||
"all": false, | ||
"window": { | ||
"setPosition": true | ||
} | ||
}, | ||
"bundle": { | ||
"active": true, | ||
"category": "DeveloperTool", | ||
"copyright": "Copyright (c) Playform 2022. All rights reserved.", | ||
"externalBin": [], | ||
"icon": [ | ||
"src/img/16x16.png", | ||
"src/img/32x32.png", | ||
"src/img/icon.ico" | ||
], | ||
"identifier": "com.playform.roundedcorners", | ||
"longDescription": "Rounded Corners app for Windows", | ||
"resources": [], | ||
"shortDescription": "Rounded Corners", | ||
"targets": "all", | ||
"windows": { | ||
"certificateThumbprint": null, | ||
"digestAlgorithm": "sha256", | ||
"timestampUrl": "", | ||
"wix": { | ||
"bannerPath": "src/img/banner.png", | ||
"dialogImagePath": "src/img/dialogImage.png" | ||
} | ||
} | ||
}, | ||
"security": { | ||
"csp": null | ||
}, | ||
"systemTray": { | ||
"iconPath": "src/img/icon.ico", | ||
"iconAsTemplate": true | ||
}, | ||
"updater": { | ||
"active": false | ||
}, | ||
"windows": [ | ||
{ | ||
"alwaysOnTop": true, | ||
"center": false, | ||
"decorations": false, | ||
"fileDropEnabled": false, | ||
"focus": true, | ||
"fullscreen": true, | ||
"label": "window", | ||
"maximized": false, | ||
"resizable": false, | ||
"skipTaskbar": true, | ||
"title": "", | ||
"transparent": true, | ||
"url": "/src/windows/window.html", | ||
"visible": true, | ||
"x": 0, | ||
"y": 0 | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.Corner { | ||
--corner-size: 23px; | ||
width: var(--corner-size); | ||
height: var(--corner-size); | ||
|
||
-webkit-mask-image: radial-gradient( | ||
circle at var(--corner-size) var(--corner-size), | ||
transparent calc(var(--corner-size) + -0.7px), | ||
rgba(255, 255, 255, 1) calc(var(--corner-size) + 0.7px) | ||
); | ||
|
||
@apply absolute inset-auto bg-black; | ||
|
||
&[data-id="top_right"] { | ||
transform: rotate(90deg); | ||
@apply right-0; | ||
} | ||
|
||
&[data-id="bottom_right"] { | ||
transform: rotate(180deg); | ||
@apply right-0 bottom-0; | ||
} | ||
|
||
&[data-id="bottom_left"] { | ||
transform: rotate(270deg); | ||
@apply left-0 bottom-0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
html, | ||
body { | ||
width: 100%; | ||
height: 100%; | ||
padding: 0; | ||
margin: 0; | ||
background: transparent; | ||
position: relative; | ||
} | ||
|
||
::-webkit-scrollbar { | ||
display: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { mergeProps } from "solid-js"; | ||
|
||
import "./../assets/css/corner.css"; | ||
|
||
export default function Corner(props) { | ||
const merged = mergeProps({ id: "default" }, props); | ||
|
||
return <div class="Corner" data-id={merged.id}></div>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { appWindow } from "@tauri-apps/api/window"; | ||
|
||
import type { Component } from "solid-js"; | ||
import { createSignal, For, lazy } from 'solid-js'; | ||
import { render } from "solid-js/web"; | ||
import "./../assets/css/window.css"; | ||
|
||
const Corner = lazy(() => import("./corner")); | ||
|
||
const Window: Component = () => { | ||
const [corners] = createSignal([ | ||
{ id: 'top_left' }, | ||
{ id: 'top_right' }, | ||
{ id: 'bottom_right' }, | ||
{ id: 'bottom_left' } | ||
]); | ||
|
||
return ( | ||
<div class="Window" data-label={appWindow.label}> | ||
<For each={corners()}>{(corner, i) => | ||
<Corner id={corner.id} /> | ||
}</For> | ||
</div> | ||
); | ||
}; | ||
|
||
render(() => <Window />, document.getElementById("box") as HTMLElement); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE html> | ||
|
||
<html lang="en"> | ||
|
||
<head> | ||
|
||
<meta | ||
name="viewport" | ||
content="width=150, height=150, initial-scale=1, maximum-scale=1, user-scalable=no" | ||
/> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<div id="box"></div> | ||
|
||
<script src="/src/components/window.tsx" type="module"></script> | ||
|
||
</body> | ||
|
||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
content: ["./src/**/*.{js,ts,jsx,tsx,css,md,mdx,html,json,scss}"], | ||
darkMode: "media", | ||
theme: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ESNext", | ||
"module": "ESNext", | ||
"moduleResolution": "node", | ||
"allowSyntheticDefaultImports": true, | ||
"esModuleInterop": true, | ||
"jsx": "preserve", | ||
"jsxImportSource": "solid-js", | ||
"types": [ | ||
"vite/client" | ||
], | ||
"noEmit": true, | ||
"isolatedModules": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { defineConfig } from "vite"; | ||
import solidPlugin from "vite-plugin-solid"; | ||
import { resolve } from "path"; | ||
|
||
export default defineConfig({ | ||
plugins: [solidPlugin()], | ||
server: { | ||
port: 3000, | ||
}, | ||
build: { | ||
target: "esnext", | ||
rollupOptions: { | ||
input: { | ||
window: resolve(__dirname, "src/windows/window.html"), | ||
}, | ||
}, | ||
}, | ||
}); |