rin/packages: use multitask and media key patch on discord-plugged

This commit is contained in:
LavaDesu 2021-12-18 20:33:30 +07:00
parent 7da808dafd
commit 2f3bcd4b10
Signed by: cilly
GPG key ID: 6500251E087653C9
4 changed files with 45 additions and 0 deletions

17
flake.lock generated
View file

@ -244,6 +244,22 @@
"type": "github" "type": "github"
} }
}, },
"multitask": {
"flake": false,
"locked": {
"lastModified": 1634895861,
"narHash": "sha256-YJomiL8l4YhA5FhjGrSBRnJafAkSPldzETuNubUg1c8=",
"owner": "powercord-community",
"repo": "multitask",
"rev": "0582f00e41e2a0b48003b3817d03d84a5b7619be",
"type": "github"
},
"original": {
"owner": "powercord-community",
"repo": "multitask",
"type": "github"
}
},
"neovim-flake": { "neovim-flake": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
@ -520,6 +536,7 @@
"fix-user-popouts": "fix-user-popouts", "fix-user-popouts": "fix-user-popouts",
"home-manager": "home-manager", "home-manager": "home-manager",
"linux-tkg": "linux-tkg", "linux-tkg": "linux-tkg",
"multitask": "multitask",
"neovim-nightly": "neovim-nightly", "neovim-nightly": "neovim-nightly",
"nix-gaming": "nix-gaming", "nix-gaming": "nix-gaming",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",

View file

@ -38,6 +38,7 @@
channel-typing = { url = "github:powercord-community/channel-typing"; flake = false; }; channel-typing = { url = "github:powercord-community/channel-typing"; flake = false; };
discord-tweaks = { url = "github:NurMarvin/discord-tweaks"; flake = false; }; discord-tweaks = { url = "github:NurMarvin/discord-tweaks"; flake = false; };
fix-user-popouts = { url = "github:cyyynthia/fix-user-popouts"; flake = false; }; fix-user-popouts = { url = "github:cyyynthia/fix-user-popouts"; flake = false; };
multitask = { url = "github:powercord-community/multitask"; flake = false; };
no-double-back-pc = { url = "github:the-cord-plug/no-double-back-pc"; flake = false; }; no-double-back-pc = { url = "github:the-cord-plug/no-double-back-pc"; flake = false; };
powercord-popout-fix = { url = "github:Nexure/PowerCord-Popout-Fix"; flake = false; }; powercord-popout-fix = { url = "github:Nexure/PowerCord-Popout-Fix"; flake = false; };
rolecolor-everywhere = { url = "github:powercord-community/rolecolor-everywhere"; flake = false; }; rolecolor-everywhere = { url = "github:powercord-community/rolecolor-everywhere"; flake = false; };

View file

@ -1,11 +1,24 @@
{ config, enableGUI, inputs, pkgs, ... }: { config, enableGUI, inputs, pkgs, ... }:
let let
mediaKeyPatch = pkgs.fetchurl {
url = "https://github.com/powercord-org/powercord/commit/6c9e57de7fcbd50e473c6d9b1c81e56fef85fa93.diff";
sha256 = "16jy1qkkbjxmylqpjfm3y47nf40hw5anq284aj6kc9z3n3323pic";
};
discord = pkgs.discord-plugged.override { discord = pkgs.discord-plugged.override {
powercord = pkgs.powercord.override {
powercord-unwrapped = pkgs.powercord.unwrapped.overrideAttrs(old: {
patches = (if (old ? patches) then old.patches else []) ++ [
mediaKeyPatch
./powercordMediaKeyPatchPatch.patch
];
});
};
plugins = [ plugins = [
inputs.better-status-indicators inputs.better-status-indicators
inputs.channel-typing inputs.channel-typing
inputs.discord-tweaks inputs.discord-tweaks
inputs.fix-user-popouts inputs.fix-user-popouts
inputs.multitask
inputs.no-double-back-pc inputs.no-double-back-pc
inputs.powercord-popout-fix inputs.powercord-popout-fix
inputs.rolecolor-everywhere inputs.rolecolor-everywhere

View file

@ -0,0 +1,14 @@
diff --git a/src/patcher.js b/src/patcher.js
index d1609554029..780740d7423 100644
--- a/src/patcher.js
+++ b/src/patcher.js
@@ -22,7 +22,8 @@ console.log('Hello from Powercord!');
let disableMediaHandling = false;
try {
- settings = require(join(__dirname, '../settings/pc-general.json'));
+ const { SETTINGS_FOLDER } = require('./fake_node_modules/powercord/constants');
+ settings = require(join(SETTINGS_FOLDER, 'pc-general.json'));
disableMediaHandling = settings.disableMediaHandling;
} catch (e) {}