This commit is contained in:
Sakooooo 2024-02-06 22:09:08 +04:00
parent 4364e372de
commit d41a5a78be
Signed by: sako
GPG key ID: 3FD715D87D7725E0

View file

@ -1310,55 +1310,59 @@ Aint no way bro
** EXWM ** EXWM
RELEASE ME RELEASE ME
#+begin_src emacs-lisp #+begin_src emacs-lisp
(when (eq system-type 'gnu/linux) (when (eq system-type 'gnu/linux)
(use-package exwm (use-package exwm
:config :config
;; workspaces ;; workspaces
(setq exwm-workspace-number 5) (setq exwm-workspace-number 5)
;; always use these keys in emacs
(setq exwm-input-prefix-keys
'(?\C-x
?\C-u
?\C-h
?\M-x
?\M-`
?\M-&
?\M-:
?\C-\M-j ;; Buffer list
?\C-\ )) ;; Ctrl+Space
;; Ctrl+Q will enable the next key to be sent directly (require 'exwm-systemtray)
(define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key) (exwm-systemtray-enable)
;; Set up global key bindings. These always work, no matter the input state!
;; Keep in mind that changing this list after EXWM initializes has no effect.
(setq exwm-input-global-keys
`(
;; Reset to line-mode (C-c C-k switches to char-mode via exwm-input-release-keyboard)
([?\s-r] . exwm-reset)
;; Move between windows ;; always use these keys in emacs
([s-left] . windmove-left) (setq exwm-input-prefix-keys
([s-right] . windmove-right) '(?\C-x
([s-up] . windmove-up) ?\C-u
([s-down] . windmove-down) ?\C-h
?\M-x
?\M-`
?\M-&
?\M-:
?\C-\M-j ;; Buffer list
?\C-\ )) ;; Ctrl+Space
;; Launch applications via shell command ;; Ctrl+Q will enable the next key to be sent directly
([?\s-&] . (lambda (command) (define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key)
(interactive (list (read-shell-command "$ "))) ;; Set up global key bindings. These always work, no matter the input state!
(start-process-shell-command command nil command))) ;; Keep in mind that changing this list after EXWM initializes has no effect.
(setq exwm-input-global-keys
`(
;; Reset to line-mode (C-c C-k switches to char-mode via exwm-input-release-keyboard)
([?\s-r] . exwm-reset)
;; Switch workspace ;; Move between windows
([?\s-w] . exwm-workspace-switch) ([s-left] . windmove-left)
([s-right] . windmove-right)
([s-up] . windmove-up)
([s-down] . windmove-down)
;; 's-N': Switch to certain workspace with Super (Win) plus a number key (0 - 9) ;; Launch applications via shell command
,@(mapcar (lambda (i) ([?\s-&] . (lambda (command)
`(,(kbd (format "s-%d" i)) . (interactive (list (read-shell-command "$ ")))
(lambda () (start-process-shell-command command nil command)))
(interactive)
(exwm-workspace-switch-create ,i)))) ;; Switch workspace
(number-sequence 0 9)))) ([?\s-w] . exwm-workspace-switch)
))
;; 's-N': Switch to certain workspace with Super (Win) plus a number key (0 - 9)
,@(mapcar (lambda (i)
`(,(kbd (format "s-%d" i)) .
(lambda ()
(interactive)
(exwm-workspace-switch-create ,i))))
(number-sequence 0 9))))
))
#+end_src #+end_src
* Org Mode Configuration Setup * Org Mode Configuration Setup