Show current EXWM workspace index in mode-line
[~bandali/configs] / .emacs.d / lisp / bandali-exwm.el
index 92f9b31..bd28d5b 100644 (file)
@@ -104,16 +104,16 @@ around if needed."
                      command nil command)))
    ([s-return] . (lambda ()
                    (interactive)
-                   (start-process "" nil "urxvt")))
+                   (start-process "" nil "xterm")))
    ([S-s-return] . (lambda ()
                      (interactive)
-                     (start-process "" nil "urxvt"
+                     (start-process "" nil "xterm"
                                     "-name" "floating")))
    ([?\C-\s-\s] . counsel-linux-app)
    ([?\M-\s-\s] . (lambda ()
                     (interactive)
                     (start-process-shell-command
-                     "rofi-pass" nil "rofi-pass")))
+                     "passmenu" nil "passmenu --type")))
    ([?\s-h] . windmove-left)
    ([?\s-j] . windmove-down)
    ([?\s-k] . windmove-up)
@@ -182,7 +182,7 @@ around if needed."
    ([?\s-\'] . (lambda ()
                  (interactive)
                  (start-process-shell-command
-                  "rofi-light" nil "rofi-light")))
+                  "dmneu-light" nil "dmenu-light")))
    ([XF86AudioMute] .             ; borken on my X200 :-(
     (lambda ()
       (interactive)
@@ -279,7 +279,7 @@ around if needed."
                 (exwm-input-set-local-simulation-keys
                  `(,@exwm-input-simulation-keys
                    ([?\C-\S-d] . [?\C-d]))))
-               ((member exwm-class-name '("URxvt" "Mate-terminal"))
+               ((member exwm-class-name '("XTerm" "Mate-terminal"))
                 (exwm-input-set-local-simulation-keys
                  '(([?\C-c ?\C-c] . [?\C-c])
                    ([?\C-c ?\C-u] . [?\C-u]))))
@@ -309,5 +309,15 @@ around if needed."
 (add-to-list 'load-path (b/lisp "exwm-edit"))
 (require 'exwm-edit)
 
+(with-eval-after-load 'exwm-workspace
+  (setq-default
+   mode-line-format
+   (append
+    mode-line-format
+    '((:eval
+       (format
+        " [%s]" (number-to-string
+                exwm-workspace-current-index)))))))
+
 (provide 'bandali-exwm)
 ;;; bandali-exwm.el ends here