home/sway: actually unset immodule variables

This commit is contained in:
Guanran Wang 2024-07-20 14:59:58 +08:00
parent 37349c9afc
commit 135c6ff938
Signed by: nyancat
GPG key ID: 91F97D9ED12639CF
2 changed files with 9 additions and 7 deletions

View file

@ -21,6 +21,9 @@ in {
../mako ../mako
../swayidle ../swayidle
../swaylock ../swaylock
# FIXME: hack
./unset-im-module.nix
]; ];
home.sessionVariables = { home.sessionVariables = {
@ -35,17 +38,11 @@ in {
# remove csd window buttons # remove csd window buttons
# https://github.com/localsend/localsend/blob/2457acd8a7412723b174672d174e4853dccd7d99/app/linux/my_application.cc#L45 # https://github.com/localsend/localsend/blob/2457acd8a7412723b174672d174e4853dccd7d99/app/linux/my_application.cc#L45
home.sessionVariables.GTK_CSD = 0; home.sessionVariables.GTK_CSD = 0;
dconf.settings."org/gnome/desktop/wm/preferences"."button-layout" = "icon,appmenu:"; dconf.settings."org/gnome/desktop/wm/preferences"."button-layout" = "appmenu:";
services.cliphist.enable = true; services.cliphist.enable = true;
services.udiskie.enable = true; services.udiskie.enable = true;
home.sessionVariables = {
# NOTE: don't use "wayland" in GTK_IM_MODULE! it will crash X11 electron apps
GTK_IM_MODULE = lib.mkForce ""; # use text-input-v3
QT_IM_MODULE = lib.mkForce ""; # use text-input-v3
};
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
checkConfig = false; # wtf? checkConfig = false; # wtf?

View file

@ -0,0 +1,5 @@
{lib, ...}: {
options.home.sessionVariables = lib.mkOption {
apply = x: removeAttrs x ["QT_IM_MODULE" "GTK_IM_MODULE"];
};
}