commit cc37863b12c75b3c0bf60a1fb3a478c3e5d43f2e Author: 4rkal <4rkal@horsefucker.org> Date: Fri May 17 12:22:18 2024 +0300 initial commit diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 0000000..f1b5f20 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,14 @@ +pkgbase = discord-webview + pkgdesc = A simple webview application to access Discord, without having discord spyware running in the background + pkgver = 1.0.0 + pkgrel = 1 + url = https://github.com/4rkal/discord-desktop + arch = x86_64 + license = MIT + makedepends = go + depends = glibc + depends = webkit2gtk + source = main.go + sha256sums = d41ca58419d1ec0e668d77c521297174b463c51358a4e9d25fa40f84d251827b + +pkgname = discord-webview \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e57bf26 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +discord* +pkg/ +src/ \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a5d953c --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 4rkal + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..4757da6 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,26 @@ +# Maintainer: 4rkal <4rkal@horsefucker.org> +pkgname=discord-webview +pkgver=1.0.0 +pkgrel=1 +pkgdesc="A simple webview application to access Discord, without having discord spyware running in the background" +arch=('x86_64') +url="https://github.com/4rkal/discord-desktop" +license=('MIT') +depends=('glibc' 'webkit2gtk') +makedepends=('go') +source=("main.go") +sha256sums=('d41ca58419d1ec0e668d77c521297174b463c51358a4e9d25fa40f84d251827b') + +build() { + cd "$srcdir" + + export GOPATH="$srcdir" + export GO111MODULE=on + + go build -o "$srcdir/$pkgname" main.go +} + +package() { + install -Dm755 "$srcdir/$pkgname" "$pkgdir/usr/bin/$pkgname" + install -Dm644 main.go "$pkgdir/usr/share/$pkgname/main.go" +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..4bd12e8 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# discord-desktop usable +Discord desktop but actually usable. It is written in go and utilizes [webview](https://github.com/webview/webview_go). + +Its a pretty simple application that just renders discord.com/app into a desktop application. + +# Install + +Using go: +`go install github.com/4rkal/discord-desktop@latest` \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..e1dc284 --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module github.com/4rkal/discord-desktop + +go 1.22.3 + +require github.com/webview/webview_go v0.0.0-20240220051247-56f456ca3a43 diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..481abe3 --- /dev/null +++ b/go.sum @@ -0,0 +1,2 @@ +github.com/webview/webview_go v0.0.0-20240220051247-56f456ca3a43 h1:PwbNdNumoKba+ZgrE6ZpSluJfNJfyMuqwVyUB5+iLDI= +github.com/webview/webview_go v0.0.0-20240220051247-56f456ca3a43/go.mod h1:yE65LFCeWf4kyWD5re+h4XNvOHJEXOCOuJZ4v8l5sgk= diff --git a/main.go b/main.go new file mode 100644 index 0000000..b5533cd --- /dev/null +++ b/main.go @@ -0,0 +1,12 @@ +package main + +import webview "github.com/webview/webview_go" + +func main() { + w := webview.New(false) + defer w.Destroy() + w.SetTitle("Discord") + w.SetSize(1200, 700, webview.HintNone) + w.Navigate("https://discord.com/app") + w.Run() +}