about summary refs log tree commit diff
path: root/users/tazjin/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'users/tazjin/emacs')
-rw-r--r--users/tazjin/emacs/config/desktop.el16
1 files changed, 9 insertions, 7 deletions
diff --git a/users/tazjin/emacs/config/desktop.el b/users/tazjin/emacs/config/desktop.el
index 7b3a5d4c4be6..1900299b2ae3 100644
--- a/users/tazjin/emacs/config/desktop.el
+++ b/users/tazjin/emacs/config/desktop.el
@@ -30,8 +30,17 @@
   (shell-command "xbacklight -dec 5")
   (message "Brightness decreased"))
 
+(defun set-xkb-layout (layout)
+  "Set the current X keyboard layout."
+
+  (shell-command (format "setxkbmap %s" layout))
+  (shell-command "setxkbmap -option caps:super")
+  (message "Set X11 keyboard layout to '%s'" layout))
+
 (defun lock-screen ()
   (interactive)
+  (set-xkb-layout "us")
+
   ;; A sudoers configuration is in place that lets me execute this
   ;; particular command without having to enter a password.
   ;;
@@ -40,13 +49,6 @@
   ;; is tied to suspend.target.
   (shell-command "/usr/bin/sudo /usr/bin/systemctl start xsecurelock.service"))
 
-(defun set-xkb-layout (layout)
-  "Set the current X keyboard layout."
-
-  (shell-command (format "setxkbmap %s" layout))
-  (shell-command "setxkbmap -option caps:super")
-  (message "Set X11 keyboard layout to '%s'" layout))
-
 (defun create-window-name ()
   "Construct window names to be used for EXWM buffers by
   inspecting the window's X11 class and title.