about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--users/tazjin/emacs/config/desktop.el11
-rw-r--r--users/tazjin/nixos/tverskoy/default.nix8
2 files changed, 17 insertions, 2 deletions
diff --git a/users/tazjin/emacs/config/desktop.el b/users/tazjin/emacs/config/desktop.el
index 3a4983f629f0..c160ae131f8a 100644
--- a/users/tazjin/emacs/config/desktop.el
+++ b/users/tazjin/emacs/config/desktop.el
@@ -4,13 +4,14 @@
 ;; window-management (EXWM) as well as additional system-wide
 ;; commands.
 
-(require 's)
-(require 'f)
 (require 'dash)
 (require 'exwm)
 (require 'exwm-config)
 (require 'exwm-randr)
 (require 'exwm-systemtray)
+(require 'exwm-xim )
+(require 'f)
+(require 's)
 
 (defcustom tazjin--screen-lock-command "tazjin-screen-lock"
   "Command to execute for locking the screen."
@@ -52,6 +53,7 @@
 (defun lock-screen ()
   (interactive)
   (set-xkb-layout "us")
+  (deactivate-input-method)
   (shell-command tazjin--screen-lock-command))
 
 (defun create-window-name ()
@@ -180,6 +182,11 @@
 (bind-xkb "no" "л т")
 (bind-xkb "ru" "л к")
 
+;; Configuration of EXWM input method handling for X applications
+(exwm-xim-enable)
+(setq default-input-method "russian-computer")
+(push ?\C-\\ exwm-input-prefix-keys)
+
 ;; Line-editing shortcuts
 (exwm-input-set-simulation-keys
  '(([?\C-d] . delete)
diff --git a/users/tazjin/nixos/tverskoy/default.nix b/users/tazjin/nixos/tverskoy/default.nix
index 7161fad58ea8..30aacacdf426 100644
--- a/users/tazjin/nixos/tverskoy/default.nix
+++ b/users/tazjin/nixos/tverskoy/default.nix
@@ -203,6 +203,14 @@ in lib.fix(self: {
     };
   };
 
+  # Set variables to enable EXWM-XIM
+  environment.sessionVariables = {
+    XMODIFIERS = "@im=exwm-xim";
+    GTK_IM_MODULE = "xim";
+    QT_IM_MODULE = "xim";
+    CLUTTER_IM_MODULE = "xim";
+  };
+
   # Automatically detect location to use for redshift
   location.provider = "geoclue2";