parent
26a88760f5
commit
edcc9d6f9d
2 changed files with 96 additions and 95 deletions
|
@ -1175,119 +1175,119 @@ Export and then view with emacs :)
|
||||||
* EXWM
|
* EXWM
|
||||||
I'm scared
|
I'm scared
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;; (when (eq system-type 'gnu/linux)
|
(when (eq system-type 'gnu/linux)
|
||||||
;; (display-battery-mode)
|
(display-battery-mode)
|
||||||
;; (use-package exwm
|
(use-package exwm
|
||||||
;; :config
|
:config
|
||||||
|
|
||||||
;; (defun sakomacs/exwm-init-hook ()
|
(defun sakomacs/exwm-init-hook ()
|
||||||
;; ;; background
|
;; background
|
||||||
;; (call-process-shell-command "feh --bg-fill ~/background.png" nil 0)
|
(call-process-shell-command "feh --bg-fill ~/background.png" nil 0)
|
||||||
;; (set-frame-parameter (selected-frame)'alpha '(90 . 90))
|
(set-frame-parameter (selected-frame)'alpha '(90 . 90))
|
||||||
;; ;; (call-process-shell-command "~/.config/polybar/startpolybar" nil 0)
|
;; (call-process-shell-command "~/.config/polybar/startpolybar" nil 0)
|
||||||
;; ;; (call-process-shell-command "~/.config/picom/startpicom" nil 0)
|
;; (call-process-shell-command "~/.config/picom/startpicom" nil 0)
|
||||||
;; ;; startup
|
;; startup
|
||||||
;; ;; (call-process-shell-command "nm-applet" nil 0)
|
;; (call-process-shell-command "nm-applet" nil 0)
|
||||||
;; ;; (call-process-shell-command "blueman-applet" nil 0)
|
;; (call-process-shell-command "blueman-applet" nil 0)
|
||||||
;; ;; (call-process-shell-command "nextcloud" nil 0)
|
;; (call-process-shell-command "nextcloud" nil 0)
|
||||||
;; ;; (call-process-shell-command "bitwarden" nil 0)
|
;; (call-process-shell-command "bitwarden" nil 0)
|
||||||
;; ;; (call-process-shell-command "flameshot" nil 0)
|
;; (call-process-shell-command "flameshot" nil 0)
|
||||||
;; )
|
)
|
||||||
|
|
||||||
;; ;; background
|
;; background
|
||||||
;; ;; todo turn this info a function
|
;; todo turn this info a function
|
||||||
;; (add-hook 'exwm-init-hook 'sakomacs/exwm-init-hook)
|
(add-hook 'exwm-init-hook 'sakomacs/exwm-init-hook)
|
||||||
;; ;; startup
|
;; startup
|
||||||
;; ;; workspaces
|
;; workspaces
|
||||||
;; (setq exwm-workspace-number 5)
|
(setq exwm-workspace-number 5)
|
||||||
|
|
||||||
|
|
||||||
;; (require 'exwm-systemtray)
|
(require 'exwm-systemtray)
|
||||||
;; (exwm-systemtray-enable)
|
(exwm-systemtray-enable)
|
||||||
|
|
||||||
;; ;; polybar
|
;; polybar
|
||||||
;; (defvar sakomacs/polybar-process nil
|
(defvar sakomacs/polybar-process nil
|
||||||
;; "Holds the process of the running Polybar instance, if any")
|
"Holds the process of the running Polybar instance, if any")
|
||||||
|
|
||||||
;; (server-start)
|
(server-start)
|
||||||
|
|
||||||
;; (defun sakomacs/kill-panel ()
|
(defun sakomacs/kill-panel ()
|
||||||
;; (interactive)
|
(interactive)
|
||||||
;; (when sakomacs/polybar-process
|
(when sakomacs/polybar-process
|
||||||
;; (ignore-errors
|
(ignore-errors
|
||||||
;; (kill-process sakomacs/polybar-process)))
|
(kill-process sakomacs/polybar-process)))
|
||||||
;; (setq sakomacs/polybar-process nil))
|
(setq sakomacs/polybar-process nil))
|
||||||
|
|
||||||
;; (defun sakomacs/start-panel ()
|
(defun sakomacs/start-panel ()
|
||||||
;; (interactive)
|
(interactive)
|
||||||
;; (sakomacs/kill-panel)
|
(sakomacs/kill-panel)
|
||||||
;; (setq sakomacs/polybar-process (start-process-shell-command "polybar" nil "polybar panel")))
|
(setq sakomacs/polybar-process (start-process-shell-command "polybar" nil "polybar panel")))
|
||||||
|
|
||||||
;; (defun sakomacs/send-polybar-hook (module-name hook-index)
|
(defun sakomacs/send-polybar-hook (module-name hook-index)
|
||||||
;; (start-process-shell-command "polybar-msg" nil (format "polybar-msg hook %s %s" module-name hook-index)))
|
(start-process-shell-command "polybar-msg" nil (format "polybar-msg hook %s %s" module-name hook-index)))
|
||||||
|
|
||||||
;; (defun sakomacs/send-polybar-exwm-workspace ()
|
(defun sakomacs/send-polybar-exwm-workspace ()
|
||||||
;; (sakomacs/send-polybar-hook "exwm-workspace" 1))
|
(sakomacs/send-polybar-hook "exwm-workspace" 1))
|
||||||
|
|
||||||
;; ;; Update panel indicator when workspace changes
|
;; Update panel indicator when workspace changes
|
||||||
;; (add-hook 'exwm-workspace-switch-hook #'sakomacs/send-polybar-exwm-workspace)
|
(add-hook 'exwm-workspace-switch-hook #'sakomacs/send-polybar-exwm-workspace)
|
||||||
|
|
||||||
;; ;; always use these keys in emacs
|
;; always use these keys in emacs
|
||||||
;; (setq exwm-input-prefix-keys
|
(setq exwm-input-prefix-keys
|
||||||
;; '(?\C-x
|
'(?\C-x
|
||||||
;; ?\C-u
|
?\C-u
|
||||||
;; ?\C-h
|
?\C-h
|
||||||
;; ?\M-x
|
?\M-x
|
||||||
;; ?\M-`
|
?\M-`
|
||||||
;; ?\M-&
|
?\M-&
|
||||||
;; ?\M-:
|
?\M-:
|
||||||
;; ?\C-\M-j ;; Buffer list
|
?\C-\M-j ;; Buffer list
|
||||||
;; ?\C-\ )) ;; Ctrl+Space
|
?\C-\ )) ;; Ctrl+Space
|
||||||
|
|
||||||
;; ;; Ctrl+Q will enable the next key to be sent directly
|
;; Ctrl+Q will enable the next key to be sent directly
|
||||||
;; (define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key)
|
(define-key exwm-mode-map [?\C-q] 'exwm-input-send-next-key)
|
||||||
;; ;; app launcher and fullscreen
|
;; app launcher and fullscreen
|
||||||
;; (exwm-input-set-key (kbd "s-SPC") 'counsel-linux-app)
|
(exwm-input-set-key (kbd "s-SPC") 'counsel-linux-app)
|
||||||
;; (exwm-input-set-key (kbd "s-f") 'exwm-layout-toggle-fullscreen)
|
(exwm-input-set-key (kbd "s-f") 'exwm-layout-toggle-fullscreen)
|
||||||
;; ;; Set up global key bindings. These always work, no matter the input state!
|
;; 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.
|
;; Keep in mind that changing this list after EXWM initializes has no effect.
|
||||||
;; (setq exwm-input-global-keys
|
(setq exwm-input-global-keys
|
||||||
;; `(
|
`(
|
||||||
;; ;; Reset to line-mode (C-c C-k switches to char-mode via exwm-input-release-keyboard)
|
;; Reset to line-mode (C-c C-k switches to char-mode via exwm-input-release-keyboard)
|
||||||
;; ([?\s-r] . exwm-reset)
|
([?\s-r] . exwm-reset)
|
||||||
|
|
||||||
;; ;; Move between windows
|
;; Move between windows
|
||||||
;; ([s-left] . windmove-left)
|
([s-left] . windmove-left)
|
||||||
;; ([s-right] . windmove-right)
|
([s-right] . windmove-right)
|
||||||
;; ([s-up] . windmove-up)
|
([s-up] . windmove-up)
|
||||||
;; ([s-down] . windmove-down)
|
([s-down] . windmove-down)
|
||||||
|
|
||||||
;; ;; Launch applications via shell command
|
;; Launch applications via shell command
|
||||||
;; ([?\s-&] . (lambda (command)
|
([?\s-&] . (lambda (command)
|
||||||
;; (interactive (list (read-shell-command "$ ")))
|
(interactive (list (read-shell-command "$ ")))
|
||||||
;; (start-process-shell-command command nil command)))
|
(start-process-shell-command command nil command)))
|
||||||
|
|
||||||
;; ;; Switch workspace
|
;; Switch workspace
|
||||||
;; ([?\s-w] . exwm-workspace-switch)
|
([?\s-w] . exwm-workspace-switch)
|
||||||
|
|
||||||
;; ;; 's-N': Switch to certain workspace with Super (Win) plus a number key (0 - 9)
|
;; 's-N': Switch to certain workspace with Super (Win) plus a number key (0 - 9)
|
||||||
;; ,@(mapcar (lambda (i)
|
,@(mapcar (lambda (i)
|
||||||
;; `(,(kbd (format "s-%d" i)) .
|
`(,(kbd (format "s-%d" i)) .
|
||||||
;; (lambda ()
|
(lambda ()
|
||||||
;; (interactive)
|
(interactive)
|
||||||
;; (exwm-workspace-switch-create ,i))))
|
(exwm-workspace-switch-create ,i))))
|
||||||
;; (number-sequence 0 9))))
|
(number-sequence 0 9))))
|
||||||
;; )
|
)
|
||||||
|
|
||||||
;; (use-package desktop-environment
|
(use-package desktop-environment
|
||||||
;; :after exwm
|
:after exwm
|
||||||
;; :config (desktop-environment-mode)
|
:config (desktop-environment-mode)
|
||||||
;; :custom
|
:custom
|
||||||
;; (desktop-environment-brightness-small-increment "2%+")
|
(desktop-environment-brightness-small-increment "2%+")
|
||||||
;; (desktop-environment-brightness-small-decrement "2%-")
|
(desktop-environment-brightness-small-decrement "2%-")
|
||||||
;; (desktop-environment-brightness-normal-increment "5%+")
|
(desktop-environment-brightness-normal-increment "5%+")
|
||||||
;; (desktop-environment-brightness-normal-decrement "5%-"))
|
(desktop-environment-brightness-normal-decrement "5%-"))
|
||||||
;; )
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
* End
|
* End
|
||||||
#+begin_src elisp
|
#+begin_src elisp
|
||||||
|
|
|
@ -49,6 +49,7 @@ in {
|
||||||
# '';
|
# '';
|
||||||
extraConfig = pkgs.writeText "emacs-loadscript" ''
|
extraConfig = pkgs.writeText "emacs-loadscript" ''
|
||||||
(require 'exwm-config)
|
(require 'exwm-config)
|
||||||
|
(exwm-config-default)
|
||||||
(exwm-init)
|
(exwm-init)
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
|
|
Loading…
Reference in a new issue