refactor: complete rewrite
This commit is contained in:
parent
19a4bbda3c
commit
8e81943cf9
399 changed files with 3396 additions and 8042 deletions
171
modules/home/workstation/communication/vesktop/default.nix
Normal file
171
modules/home/workstation/communication/vesktop/default.nix
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
{
|
||||
config,
|
||||
osConfig,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf elem;
|
||||
inherit (osConfig.ooknet.appearance) colorscheme fonts;
|
||||
inherit (colorscheme) palette;
|
||||
inherit (osConfig.ooknet.workstation) profiles;
|
||||
|
||||
vesktopMime = {"x-scheme-handler/discord" = ["vesktop.desktop"];};
|
||||
in {
|
||||
config = mkIf (elem "communication" profiles) {
|
||||
# <https://github.com/AlephNought0/Faery/blob/main/Home/Programs/Vesktop/patchedvesktop.patch>
|
||||
home.packages = [
|
||||
(pkgs.vesktop.overrideAttrs (old: {
|
||||
patches = (old.patches or []) ++ [./vesktop-patch.patch];
|
||||
}))
|
||||
];
|
||||
|
||||
xdg.configFile."vesktop/themes/nix.css".text =
|
||||
/*
|
||||
css
|
||||
*/
|
||||
''
|
||||
/**
|
||||
* @name nix-colors-minimal
|
||||
* @author aoku
|
||||
* @description minimal theme designed with nix colors
|
||||
*/
|
||||
|
||||
:root {
|
||||
--nix-bg1: #${palette.base00};
|
||||
--nix-bg2: #${palette.base01};
|
||||
--nix-bg3: #${palette.base02};
|
||||
|
||||
--nix-fg1: #${palette.base05};
|
||||
--nix-fg2: #${palette.base07};
|
||||
--nix-fg3: #${palette.base03};
|
||||
--nix-link: #${palette.base0D};
|
||||
|
||||
--nix-accent: #${palette.base08};
|
||||
--nix-hi: #${palette.base0B};
|
||||
|
||||
--font-mono: ${fonts.monospace.family}, monospace;
|
||||
--font-regular: ${fonts.regular.family}, sans serif;
|
||||
|
||||
/* server collapse */
|
||||
--sb-collapsed-width: 12px;
|
||||
--sb-transition-duration: 0s;
|
||||
}
|
||||
|
||||
.theme-dark {
|
||||
--background-primary: var(--nix-bg1);
|
||||
--background-secondary: var(--nix-bg1);
|
||||
--background-secondary-alt: var(--nix-bg1);
|
||||
--background-accent: var(--nix-accent);
|
||||
--background-tertiary: var(--nix-bg1);
|
||||
--background-floating: var(--nix-bg1);
|
||||
--background-mentioned: var(--nix-bg1);
|
||||
--background-mentioned-hover: var(--nix-bg1);
|
||||
--background-mobile: var(--nix-bg1);
|
||||
--background-mobile-secondary: var(--nix-bg2);
|
||||
--background-modifier-selected: var(--nix-bg1);
|
||||
--channeltextarea-background:var(--nix-bg1);
|
||||
--background-modifier-hover:var(--nix-bg1);
|
||||
--activity-card-background: var(--nix-bg2);
|
||||
|
||||
--header-primary: var(--nix-fg2);
|
||||
--header-secondary: var(--nix-fg1);
|
||||
|
||||
--text-normal: var(--nix-fg1);
|
||||
--text-muted: var(--nix-fg1);
|
||||
--text-link: var(--nix-link);
|
||||
--text-warning: var(--nix-accent);
|
||||
--font-primary: var(--font-mono);
|
||||
--font-headline: var(--font-mono);
|
||||
--font-display: var(--font-mono);
|
||||
|
||||
--interactive-normal: var(--nix-fg1); /*base05*/
|
||||
--interactive-hover: var(--nix-hi); /*base0B*/
|
||||
--interactive-active: var(--nix-fg2);
|
||||
--interactive-muted: var(--nix-fg3); /*base03*/
|
||||
--channels-default: var(--nix-fg1);
|
||||
|
||||
--scrollbar-thin-thumb: transparent;
|
||||
--scrollbar-thin-track: transparent;
|
||||
--scrollbar-auto-thumb: var(--nix-fg1);
|
||||
--scrollbar-auto-track:var(--nix-bg1);
|
||||
--scrollbar-auto-scrollbar-color-thumb: var(--nix-accent);
|
||||
}
|
||||
|
||||
.messagesWrapper_ea2b0b {
|
||||
font-family: var(--font-regular);
|
||||
}
|
||||
|
||||
.titleWrapper__482dc {
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
|
||||
.link__95dc0 /* text channel*/{
|
||||
border-radius: 0px;
|
||||
margin-left: -10px;
|
||||
font-family: var(--font-mono);
|
||||
}
|
||||
|
||||
.container_ca50b9 .avatar_f8541f { /*avatar*/
|
||||
display: none;
|
||||
}
|
||||
|
||||
.form__13a2c /* text input box resize */ {
|
||||
height: 50px;
|
||||
font-family: var(--font-regular);
|
||||
}
|
||||
|
||||
.containerDefault__3187b .wrapper__7bcde:before /* text channel */{
|
||||
content: "";
|
||||
display:inline-block;
|
||||
background: var(--nix-hi);
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
|
||||
/* server collapse */
|
||||
.guilds__2b93a /* servers */{
|
||||
overflow: hidden !important;
|
||||
width: var(--sb-collapsed-width, 75px);
|
||||
transition: width var(--sb-transition-duration);
|
||||
}
|
||||
.guilds__2b93a:hover /* expand server bar on hover */{
|
||||
width: 70px;
|
||||
overflow: visible !important;
|
||||
animation: server-bar-overflow 0s linear 0ms forwards
|
||||
}
|
||||
.guilds__2b93a ~ .base__3e6af /* friends list, chat */{
|
||||
position: absolute;
|
||||
left: var(--sb-collapsed-left, var(--sb-collapsed-width));
|
||||
top: var(--sb-collapsed-top, 0px);
|
||||
bottom: var(--sb-collapsed-bottom, 0px);
|
||||
right: var(--sb-collapsed-right, 0px);
|
||||
transition-property: var(--sb-transition-property, left);
|
||||
transition-duration: var(--sb-transition-duration);
|
||||
}
|
||||
.guilds__2b93a:hover ~ .base__3e6af /* friends list, chat */{
|
||||
position: absolute;
|
||||
left: var(--sb-left, 70px);
|
||||
top: var(--sb-top, 0px);
|
||||
bottom: var(--sb-bottom, 0px);
|
||||
right: var(--sb-right, 0px);
|
||||
}
|
||||
@keyframes server-bar-overflow{
|
||||
from{
|
||||
overflow: hidden;
|
||||
}
|
||||
to{
|
||||
overflow: visible;
|
||||
}
|
||||
}
|
||||
'';
|
||||
|
||||
ooknet.binds.discord = "vesktop";
|
||||
xdg.mimeApps = {
|
||||
associations.added = vesktopMime;
|
||||
defaultApplications = vesktopMime;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
diff --git a/src/main/index.ts b/src/main/index.ts
|
||||
index 2e0d6f7..70dabba 100644
|
||||
--- a/src/main/index.ts
|
||||
+++ b/src/main/index.ts
|
||||
@@ -35,7 +35,7 @@ function init() {
|
||||
if (hardwareAcceleration === false) {
|
||||
app.disableHardwareAcceleration();
|
||||
} else {
|
||||
- enabledFeatures.push("VaapiVideoDecodeLinuxGL", "VaapiVideoEncoder", "VaapiVideoDecoder");
|
||||
+ enabledFeatures.push("VaapiVideoDecodeLinuxGL", "VaapiVideoEncoder", "VaapiVideoDecoder", "VulkanFromANGLE", "DefaultANGLEVulkan", "VaapiIgnoreDriverChecks", "PlatformHEVCDecoderSupport", "VaapiVP8Encoder", "VaapiVP9Encoder", "VaapiAV1Encoder", "WaylandWindowDecorations", "UseOzonePlatform", "WebRTCPipeWireCapturer");
|
||||
}
|
||||
|
||||
if (disableSmoothScroll) {
|
||||
@@ -48,6 +48,26 @@ function init() {
|
||||
app.commandLine.appendSwitch("disable-renderer-backgrounding");
|
||||
app.commandLine.appendSwitch("disable-background-timer-throttling");
|
||||
app.commandLine.appendSwitch("disable-backgrounding-occluded-windows");
|
||||
+ app.commandLine.appendSwitch("disable-renderer-backgrounding");
|
||||
+ app.commandLine.appendSwitch("disable-background-timer-throttling");
|
||||
+ app.commandLine.appendSwitch("disable-backgrounding-occluded-windows");
|
||||
+ app.commandLine.appendSwitch("enable-zero-copy");
|
||||
+ app.commandLine.appendSwitch("use-gl=angle");
|
||||
+ app.commandLine.appendSwitch("use-angle=gl");
|
||||
+ app.commandLine.appendSwitch("use-vulkan");
|
||||
+ app.commandLine.appendSwitch("enable-oop-rasterization");
|
||||
+ app.commandLine.appendSwitch("enable-raw-draw");
|
||||
+ app.commandLine.appendSwitch("enable-gpu-rasterization");
|
||||
+ app.commandLine.appendSwitch("enable-gpu-compositing");
|
||||
+ app.commandLine.appendSwitch("enable-native-gpu-memory-buffers");
|
||||
+ app.commandLine.appendSwitch("enable-accelerated-2d-canvas");
|
||||
+ app.commandLine.appendSwitch("enable-accelerated-video-decode");
|
||||
+ app.commandLine.appendSwitch("enable-accelerated-mjpeg-decode");
|
||||
+ app.commandLine.appendSwitch("disable-gpu-vsync");
|
||||
+ app.commandLine.appendSwitch("disable-frame-rate-limit");
|
||||
+ app.commandLine.appendSwitch("ozone-platform-hint=auto");
|
||||
+ app.commandLine.appendSwitch("enable-webrtc-pipewire-capturer");
|
||||
+ app.commandLine.appendSwitch("ozone-platform=wayland");
|
||||
if (process.platform === "win32") {
|
||||
disabledFeatures.push("CalculateNativeWinOcclusion");
|
||||
}
|
||||
|
||||
diff --git a/src/renderer/components/ScreenSharePicker.tsx b/src/renderer/components/ScreenSharePicker.tsx
|
||||
index c7403b9..9b454e6 100644
|
||||
--- a/src/renderer/components/ScreenSharePicker.tsx
|
||||
+++ b/src/renderer/components/ScreenSharePicker.tsx
|
||||
@@ -84,9 +84,9 @@ addPatch({
|
||||
const width = Math.round(height * (16 / 9));
|
||||
|
||||
Object.assign(opts, {
|
||||
- bitrateMin: 500000,
|
||||
- bitrateMax: 8000000,
|
||||
- bitrateTarget: 600000
|
||||
+ bitrateMin: 10000000,
|
||||
+ bitrateMax: 60000000,
|
||||
+ bitrateTarget: 32000000
|
||||
});
|
||||
if (opts?.encode) {
|
||||
Object.assign(opts.encode, {
|
||||
|
||||
diff --git a/src/main/settings.ts b/src/main/settings.ts
|
||||
index 6fad97f..dfc64e3 100644
|
||||
--- a/src/main/settings.ts
|
||||
+++ b/src/main/settings.ts
|
||||
@@ -26,8 +26,10 @@ function loadSettings<T extends object = any>(file: string, name: string) {
|
||||
|
||||
const store = new SettingsStore(settings);
|
||||
store.addGlobalChangeListener(o => {
|
||||
- mkdirSync(dirname(file), { recursive: true });
|
||||
- writeFileSync(file, JSON.stringify(o, null, 4));
|
||||
+ try {
|
||||
+ mkdirSync(dirname(file), { recursive: true });
|
||||
+ writeFileSync(file, JSON.stringify(o, null, 4));
|
||||
+ } catch {}
|
||||
});
|
||||
|
||||
return store;
|
||||
Loading…
Add table
Add a link
Reference in a new issue