mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 00:33:00 +00:00
env injection for flatpak wechat
This commit is contained in:
parent
54c2e54bb0
commit
93a11f6624
1 changed files with 40 additions and 1 deletions
|
|
@ -84,7 +84,7 @@ in {
|
||||||
{
|
{
|
||||||
# Patch for Hyprland (scale XWayland by hand)
|
# Patch for Hyprland (scale XWayland by hand)
|
||||||
"flatpak/exports/bin/com.qq.QQ" = {
|
"flatpak/exports/bin/com.qq.QQ" = {
|
||||||
force = true;
|
force = true;
|
||||||
text = ''
|
text = ''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
|
@ -115,6 +115,45 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
force = true;
|
force = true;
|
||||||
};
|
};
|
||||||
|
"flatpak/exports/bin/com.tencent.WeChat" = {
|
||||||
|
force = true;
|
||||||
|
text = ''
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
EXTRA_ENVS=""
|
||||||
|
|
||||||
|
if [ "$XDG_CURRENT_DESKTOP" = "Hyprland" ]; then
|
||||||
|
EXTRA_ENVS="QT_SCALE_FACTOR=1.5"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$EXTRA_ENVS" ]; then
|
||||||
|
exec flatpak run --env=$EXTRA_ENVS --branch=stable --arch=x86_64 com.tencent.WeChat "$@"
|
||||||
|
else
|
||||||
|
exec flatpak run --branch=stable --arch=x86_64 com.tencent.WeChat "$@"
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
enable = true;
|
||||||
|
executable = true;
|
||||||
|
};
|
||||||
|
"flatpak/exports/share/applications/com.tencent.WeChat.desktop" = {
|
||||||
|
text = ''
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=WeChat
|
||||||
|
Name[zh_CN]=微信
|
||||||
|
Exec=${config.xdg.dataHome}/flatpak/exports/bin/com.tencent.WeChat
|
||||||
|
Terminal=false
|
||||||
|
Type=Application
|
||||||
|
Icon=com.tencent.WeChat
|
||||||
|
StartupWMClass=WeChat
|
||||||
|
Categories=Network;
|
||||||
|
Keywords=wechat;weixin;
|
||||||
|
Comment=WeChat Desktop
|
||||||
|
Comment[zh_CN]=微信桌面版
|
||||||
|
X-Flatpak=com.tencent.WeChat
|
||||||
|
'';
|
||||||
|
enable = true;
|
||||||
|
force = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
// appWrappers;
|
// appWrappers;
|
||||||
home.activation.patchFlatpakDesktopFiles = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
home.activation.patchFlatpakDesktopFiles = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue