Skip to content

Instantly share code, notes, and snippets.

View heddxh's full-sized avatar
💤
Always sleepy...

heddxh

💤
Always sleepy...
  • 00:04 (UTC +08:00)
View GitHub Profile
@heddxh
heddxh / vscode-hook
Last active June 14, 2024 04:19
Pacman hook to patch visual-studio-code-bin launch script in official binary, adding `exec` to make VSCode launch in correct cgroup with systemd-run
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = visual-studio-code-bin
[Action]
Description = Patching vscode official launch script to avoid lauching in wrong cgroup...
Exec = /usr/bin/sed -i -e '$d' -e 's/ELECTRON_RUN_AS_NODE=1 "\$ELECTRON" "\$CLI" "\$@"/ELECTRON_RUN_AS_NODE=1 exec "$ELECTRON" "$CLI" "$@"/' /opt/visual-studio-code/bin/code
When = PostTransaction
@heddxh
heddxh / wps-kde-dark-fix.hook
Created April 21, 2023 07:04
A pacman hook to make font display correctly in WPS when on KDE with dark theme
[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = wps-office
[Action]
Description = Setting desktop and GTK theme for WPS Office
When = PostTransaction
Exec = /bin/sed -i '1a\export XDG_CURRENT_DESKTOP=GNOME\nexport GTK_THEME=Default\n/' usr/bin/et usr/bin/wps usr/bin/wpp usr/bin/wpspdf