feat(desktop): add global bind for discord
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
d165dd95a3
commit
1e3808b4c1
1 changed files with 26 additions and 20 deletions
|
@ -73,6 +73,19 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
discord = {
|
discord = {
|
||||||
|
package =
|
||||||
|
if isNvidia
|
||||||
|
then
|
||||||
|
pkgs.discord.overrideAttrs {
|
||||||
|
postFixup = ''
|
||||||
|
wrapProgramShell $out/bin/Discord \
|
||||||
|
--set XDG_SESSION_TYPE "x11" \
|
||||||
|
--unset NIXOS_OZONE_WL \
|
||||||
|
--unset WAYLAND_DISPLAY
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
else pkgs.discord;
|
||||||
|
|
||||||
vencord.unstable = true;
|
vencord.unstable = true;
|
||||||
openASAR.enable = false;
|
openASAR.enable = false;
|
||||||
|
|
||||||
|
@ -169,27 +182,14 @@ in {
|
||||||
;
|
;
|
||||||
|
|
||||||
# force XWayland for stylus input
|
# force XWayland for stylus input
|
||||||
obsidian = pkgs.obsidian.overrideAttrs (o: {
|
obsidian = pkgs.obsidian.overrideAttrs {
|
||||||
installPhase = ''
|
postFixup = ''
|
||||||
runHook preInstall
|
makeWrapper $out/bin/obsidian \
|
||||||
mkdir -p $out/bin
|
|
||||||
|
|
||||||
makeWrapper ${pkgs.electron}/bin/electron $out/bin/obsidian \
|
|
||||||
--add-flags $out/share/obsidian/app.asar \
|
|
||||||
--set XDG_SESSION_TYPE "x11" \
|
--set XDG_SESSION_TYPE "x11" \
|
||||||
--set NIXOS_OZONE_WL "0"
|
--unset NIXOS_OZONE_WL \
|
||||||
|
--unset WAYLAND_DISPLAY
|
||||||
install -m 444 -D resources/app.asar $out/share/obsidian/app.asar
|
|
||||||
install -m 444 -D resources/obsidian.asar $out/share/obsidian/obsidian.asar
|
|
||||||
install -m 444 -D "${o.desktopItem}/share/applications/"* \
|
|
||||||
-t $out/share/applications/
|
|
||||||
for size in 16 24 32 48 64 128 256 512; do
|
|
||||||
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
|
|
||||||
magick -background none ${o.icon} -resize "$size"x"$size" $out/share/icons/hicolor/"$size"x"$size"/apps/obsidian.png
|
|
||||||
done
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
'';
|
||||||
});
|
};
|
||||||
|
|
||||||
# tools
|
# tools
|
||||||
inherit
|
inherit
|
||||||
|
@ -298,6 +298,12 @@ in {
|
||||||
dispatcher = "togglespecialworkspace";
|
dispatcher = "togglespecialworkspace";
|
||||||
command = "spot";
|
command = "spot";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
key = "mouse:277";
|
||||||
|
dispatcher = "pass";
|
||||||
|
command = "class:^(discord)$";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue