Some changes for wayland
This commit is contained in:
		
							parent
							
								
									178638f314
								
							
						
					
					
						commit
						043d6b41cb
					
				
					 2 changed files with 74 additions and 66 deletions
				
			
		
							
								
								
									
										20
									
								
								README.org
									
										
									
									
									
								
							
							
						
						
									
										20
									
								
								README.org
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -102,9 +102,11 @@ In order to have this config work on both my desktop with regular joe-schmoe mon
 | 
			
		|||
 | 
			
		||||
(defun chris/set-transparency ()
 | 
			
		||||
  "Set the frame to be transparent on Wayland compositors"
 | 
			
		||||
  (if (string= x-display-name "wayland-0")
 | 
			
		||||
      ((set-frame-parameter (selected-frame) 'alpha '(90 . 90))
 | 
			
		||||
       (add-to-list 'default-frame-alist '(alpha . (90 . 90))))))
 | 
			
		||||
  (if (string-search "wayland" x-display-name)
 | 
			
		||||
       (set-frame-parameter (selected-frame) 'alpha '(100 . 100))
 | 
			
		||||
       (set-frame-parameter (selected-frame) 'undecorated t)
 | 
			
		||||
       (add-to-list 'default-frame-alist '(undecorated . t))
 | 
			
		||||
       (add-to-list 'default-frame-alist '(alpha . (100 . 100)))))
 | 
			
		||||
 | 
			
		||||
(if (daemonp)
 | 
			
		||||
    (add-hook 'after-make-frame-functions
 | 
			
		||||
| 
						 | 
				
			
			@ -112,8 +114,7 @@ In order to have this config work on both my desktop with regular joe-schmoe mon
 | 
			
		|||
                (with-selected-frame frame
 | 
			
		||||
                  (chris/set-font-faces)
 | 
			
		||||
                  (chris/set-transparency)))
 | 
			
		||||
  (chris/set-font-faces))
 | 
			
		||||
  (chris/set-transparency))
 | 
			
		||||
  (chris/set-font-faces)))
 | 
			
		||||
#+end_src
 | 
			
		||||
 | 
			
		||||
Then let's make sure line-numbers are relative and on. And let's turn on visual-line-mode globally.
 | 
			
		||||
| 
						 | 
				
			
			@ -634,7 +635,7 @@ Marginalia makes for some great decoration to our minibuffer completion items. W
 | 
			
		|||
  :custom
 | 
			
		||||
  (company-dabbrev-other-buffers t)
 | 
			
		||||
  (company-minimum-prefix-length 1)
 | 
			
		||||
  (company-idle-delay 0.2)
 | 
			
		||||
  (company-idle-delay 0.1)
 | 
			
		||||
  :general
 | 
			
		||||
  (general-def '(normal insert) company-active-map
 | 
			
		||||
    "TAB" 'company-complete-selection
 | 
			
		||||
| 
						 | 
				
			
			@ -787,7 +788,7 @@ LSP is useful...
 | 
			
		|||
(use-package lsp-ui
 | 
			
		||||
  :hook (lsp-mode . lsp-ui-mode)
 | 
			
		||||
  :custom
 | 
			
		||||
  (lsp-ui-doc-position 'bottom))
 | 
			
		||||
  (lsp-ui-doc-position 'top))
 | 
			
		||||
 | 
			
		||||
(use-package lsp-treemacs
 | 
			
		||||
  :after lsp)
 | 
			
		||||
| 
						 | 
				
			
			@ -905,7 +906,10 @@ I may get into flutter development over using felgo..... but i'm not happy about
 | 
			
		|||
 | 
			
		||||
(use-package lsp-dart)
 | 
			
		||||
(use-package flutter
 | 
			
		||||
  :after dart)
 | 
			
		||||
  :after dart
 | 
			
		||||
  :general
 | 
			
		||||
  (chris/leader-keys dart-mode-map
 | 
			
		||||
    "rf" 'flutter-run-or-hot-reload))
 | 
			
		||||
(use-package hover
 | 
			
		||||
  :after dart)
 | 
			
		||||
#+end_src
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										120
									
								
								init.el
									
										
									
									
									
								
							
							
						
						
									
										120
									
								
								init.el
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -2,9 +2,9 @@
 | 
			
		|||
(defun chris/display-startup-time ()
 | 
			
		||||
  (message "Emacs loaded in %s with %d garbage collections."
 | 
			
		||||
           (format "%.2f seconds"
 | 
			
		||||
                   (float-time
 | 
			
		||||
                    (time-subtract after-init-time before-init-time)))
 | 
			
		||||
           gcs-done))
 | 
			
		||||
                 (float-time
 | 
			
		||||
                (time-subtract after-init-time before-init-time)))
 | 
			
		||||
         gcs-done))
 | 
			
		||||
(add-hook 'emacs-startup-hook #'chris/display-startup-time)
 | 
			
		||||
 | 
			
		||||
(setq inhibit-startup-message t)
 | 
			
		||||
| 
						 | 
				
			
			@ -38,9 +38,11 @@
 | 
			
		|||
 | 
			
		||||
(defun chris/set-transparency ()
 | 
			
		||||
  "Set the frame to be transparent on Wayland compositors"
 | 
			
		||||
  (if (string= x-display-name "wayland-0")
 | 
			
		||||
      ((set-frame-parameter (selected-frame) 'alpha '(90 . 90))
 | 
			
		||||
       (add-to-list 'default-frame-alist '(alpha . (90 . 90))))))
 | 
			
		||||
  (if (string-search "wayland" x-display-name)
 | 
			
		||||
       (set-frame-parameter (selected-frame) 'alpha '(100 . 100))
 | 
			
		||||
       (set-frame-parameter (selected-frame) 'undecorated t)
 | 
			
		||||
       (add-to-list 'default-frame-alist '(undecorated . t))
 | 
			
		||||
       (add-to-list 'default-frame-alist '(alpha . (100 . 100)))))
 | 
			
		||||
 | 
			
		||||
(if (daemonp)
 | 
			
		||||
    (add-hook 'after-make-frame-functions
 | 
			
		||||
| 
						 | 
				
			
			@ -48,8 +50,7 @@
 | 
			
		|||
                (with-selected-frame frame
 | 
			
		||||
                  (chris/set-font-faces)
 | 
			
		||||
                  (chris/set-transparency)))
 | 
			
		||||
              (chris/set-font-faces))
 | 
			
		||||
  (chris/set-transparency))
 | 
			
		||||
  (chris/set-font-faces)))
 | 
			
		||||
 | 
			
		||||
(setq display-line-numbers-type 'relative)
 | 
			
		||||
(global-display-line-numbers-mode +1)
 | 
			
		||||
| 
						 | 
				
			
			@ -65,7 +66,7 @@
 | 
			
		|||
;; ...especially on linux
 | 
			
		||||
(setq x-gtk-use-system-tooltips nil)
 | 
			
		||||
 | 
			
		||||
;; Favor vertical splits over horizontal ones. Screens are usually wide.
 | 
			
		||||
 ;; Favor vertical splits over horizontal ones. Screens are usually wide.
 | 
			
		||||
(setq split-width-threshold 160
 | 
			
		||||
      split-height-threshold nil)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -99,8 +100,8 @@
 | 
			
		|||
(straight-use-package 'use-package)
 | 
			
		||||
(setq use-package-verbose t)
 | 
			
		||||
 | 
			
		||||
(use-package command-log-mode
 | 
			
		||||
  :commands command-log-mode)
 | 
			
		||||
  (use-package command-log-mode
 | 
			
		||||
    :commands command-log-mode)
 | 
			
		||||
 | 
			
		||||
(use-package all-the-icons)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -294,19 +295,19 @@
 | 
			
		|||
 | 
			
		||||
  ;; We need to fix selectrums minibuffer handling for Emacs 28
 | 
			
		||||
  (defun selectrum--set-window-height (window &optional height)
 | 
			
		||||
    "Set window height of WINDOW to HEIGHT pixel.
 | 
			
		||||
  "Set window height of WINDOW to HEIGHT pixel.
 | 
			
		||||
If HEIGHT is not given WINDOW will be updated to fit its content
 | 
			
		||||
vertically."
 | 
			
		||||
    (let* ((lines (length
 | 
			
		||||
                   (split-string
 | 
			
		||||
                    (overlay-get selectrum--candidates-overlay 'after-string)
 | 
			
		||||
                    "\n" t)))
 | 
			
		||||
           (dheight (or height
 | 
			
		||||
                        (* lines selectrum--line-height)))
 | 
			
		||||
           (wheight (window-pixel-height window))
 | 
			
		||||
           (window-resize-pixelwise t))
 | 
			
		||||
      (window-resize
 | 
			
		||||
       window (- dheight wheight) nil nil 'pixelwise)))
 | 
			
		||||
  (let* ((lines (length
 | 
			
		||||
                 (split-string
 | 
			
		||||
                  (overlay-get selectrum--candidates-overlay 'after-string)
 | 
			
		||||
                  "\n" t)))
 | 
			
		||||
         (dheight (or height
 | 
			
		||||
                      (* lines selectrum--line-height)))
 | 
			
		||||
         (wheight (window-pixel-height window))
 | 
			
		||||
         (window-resize-pixelwise t))
 | 
			
		||||
    (window-resize
 | 
			
		||||
     window (- dheight wheight) nil nil 'pixelwise)))
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
  :general
 | 
			
		||||
| 
						 | 
				
			
			@ -341,10 +342,10 @@ vertically."
 | 
			
		|||
 | 
			
		||||
(use-package marginalia
 | 
			
		||||
  :bind (:map minibuffer-local-map
 | 
			
		||||
              ("C-M-a" . marginalia-cycle)
 | 
			
		||||
              ;; :map embark-general-map
 | 
			
		||||
              ;;     ("A" . marginalia-cycle)
 | 
			
		||||
              )
 | 
			
		||||
         ("C-M-a" . marginalia-cycle)
 | 
			
		||||
         ;; :map embark-general-map
 | 
			
		||||
         ;;     ("A" . marginalia-cycle)
 | 
			
		||||
         )
 | 
			
		||||
 | 
			
		||||
  ;; The :init configuration is always executed (Not lazy!)
 | 
			
		||||
  :init
 | 
			
		||||
| 
						 | 
				
			
			@ -367,7 +368,7 @@ vertically."
 | 
			
		|||
  :custom
 | 
			
		||||
  (company-dabbrev-other-buffers t)
 | 
			
		||||
  (company-minimum-prefix-length 1)
 | 
			
		||||
  (company-idle-delay 0.2)
 | 
			
		||||
  (company-idle-delay 0.1)
 | 
			
		||||
  :general
 | 
			
		||||
  (general-def '(normal insert) company-active-map
 | 
			
		||||
    "TAB" 'company-complete-selection
 | 
			
		||||
| 
						 | 
				
			
			@ -473,7 +474,7 @@ vertically."
 | 
			
		|||
(use-package lsp-ui
 | 
			
		||||
  :hook (lsp-mode . lsp-ui-mode)
 | 
			
		||||
  :custom
 | 
			
		||||
  (lsp-ui-doc-position 'bottom))
 | 
			
		||||
  (lsp-ui-doc-position 'top))
 | 
			
		||||
 | 
			
		||||
(use-package lsp-treemacs
 | 
			
		||||
  :after lsp)
 | 
			
		||||
| 
						 | 
				
			
			@ -483,7 +484,7 @@ vertically."
 | 
			
		|||
 | 
			
		||||
(use-package friar 
 | 
			
		||||
  :straight (:host github :repo "warreq/friar" :branch "master"
 | 
			
		||||
                   :files (:defaults "*.lua" "*.fnl"))
 | 
			
		||||
             :files (:defaults "*.lua" "*.fnl"))
 | 
			
		||||
  :after fennel-mode)
 | 
			
		||||
 | 
			
		||||
(use-package yaml-mode
 | 
			
		||||
| 
						 | 
				
			
			@ -542,7 +543,10 @@ vertically."
 | 
			
		|||
 | 
			
		||||
(use-package lsp-dart)
 | 
			
		||||
(use-package flutter
 | 
			
		||||
  :after dart)
 | 
			
		||||
  :after dart
 | 
			
		||||
  :general
 | 
			
		||||
  (chris/leader-keys dart-mode-map
 | 
			
		||||
    "rf" 'flutter-run-or-hot-reload))
 | 
			
		||||
(use-package hover
 | 
			
		||||
  :after dart)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -819,17 +823,17 @@ vertically."
 | 
			
		|||
  :after org
 | 
			
		||||
  :init
 | 
			
		||||
  (setq org-super-agenda-groups '((:name "Today"
 | 
			
		||||
                                         :time-grid t
 | 
			
		||||
                                         :scheduled today)
 | 
			
		||||
                                   :time-grid t
 | 
			
		||||
                                   :scheduled today)
 | 
			
		||||
                                  (:name "Due Today"
 | 
			
		||||
                                         :deadline today)
 | 
			
		||||
                                   :deadline today)
 | 
			
		||||
                                  (:name "Important"
 | 
			
		||||
                                         :priority "A")
 | 
			
		||||
                                   :priority "A")
 | 
			
		||||
                                  (:name "Overdue"
 | 
			
		||||
                                         :time-grid t
 | 
			
		||||
                                         :scheduled today)
 | 
			
		||||
                                   :time-grid t
 | 
			
		||||
                                   :scheduled today)
 | 
			
		||||
                                  (:name "Due soon"
 | 
			
		||||
                                         :deadline future)))
 | 
			
		||||
                                   :deadline future)))
 | 
			
		||||
  :config
 | 
			
		||||
  (org-super-agenda-mode)
 | 
			
		||||
  (setq org-super-agenda-header-map nil))
 | 
			
		||||
| 
						 | 
				
			
			@ -1336,20 +1340,20 @@ If on a:
 | 
			
		|||
  (add-hook 'eshell-mode-hook '(display-line-numbers-mode -1))
 | 
			
		||||
 | 
			
		||||
  (setq eshell-command-aliases-list
 | 
			
		||||
        '(("ls" "exa $1")
 | 
			
		||||
          ("la" "exa -la $1")
 | 
			
		||||
          ("q" "exit")
 | 
			
		||||
          ("f" "find-file $1")
 | 
			
		||||
          ("ff" "find-file $1")
 | 
			
		||||
          ("d" "dired $1")
 | 
			
		||||
          ("bd" "eshell-up $1")
 | 
			
		||||
          ("rg" "rg --color=always $*")
 | 
			
		||||
          ("ll" "ls -lah $*")
 | 
			
		||||
          ("gg" "magit-status")
 | 
			
		||||
          ("clear" "clear-scrollback")
 | 
			
		||||
          ("!c" "eshell-previous-input 2")
 | 
			
		||||
          ("yay" "paru $1")
 | 
			
		||||
          ("yeet" "paru -Rns $1")))
 | 
			
		||||
      '(("ls" "exa $1")
 | 
			
		||||
        ("la" "exa -la $1")
 | 
			
		||||
        ("q" "exit")
 | 
			
		||||
        ("f" "find-file $1")
 | 
			
		||||
        ("ff" "find-file $1")
 | 
			
		||||
        ("d" "dired $1")
 | 
			
		||||
        ("bd" "eshell-up $1")
 | 
			
		||||
        ("rg" "rg --color=always $*")
 | 
			
		||||
        ("ll" "ls -lah $*")
 | 
			
		||||
        ("gg" "magit-status")
 | 
			
		||||
        ("clear" "clear-scrollback")
 | 
			
		||||
        ("!c" "eshell-previous-input 2")
 | 
			
		||||
        ("yay" "paru $1")
 | 
			
		||||
        ("yeet" "paru -Rns $1")))
 | 
			
		||||
 | 
			
		||||
  :general
 | 
			
		||||
  (chris/leader-keys
 | 
			
		||||
| 
						 | 
				
			
			@ -1364,8 +1368,8 @@ If on a:
 | 
			
		|||
 | 
			
		||||
(use-package pdf-tools
 | 
			
		||||
  :straight (:host github
 | 
			
		||||
                   :repo "flatwhatson/pdf-tools"
 | 
			
		||||
                   :branch "fix-macros")
 | 
			
		||||
                 :repo "flatwhatson/pdf-tools"
 | 
			
		||||
                 :branch "fix-macros")
 | 
			
		||||
  :defer 1
 | 
			
		||||
  :config
 | 
			
		||||
  (pdf-tools-install)
 | 
			
		||||
| 
						 | 
				
			
			@ -1524,11 +1528,11 @@ interfere with the default `bongo-playlist-buffer'."
 | 
			
		|||
                                       transmission-files-mode
 | 
			
		||||
                                       transmission-info-mode
 | 
			
		||||
                                       transmission-peers-mode)))
 | 
			
		||||
  :general
 | 
			
		||||
  (chris/leader-keys
 | 
			
		||||
    :states 'normal
 | 
			
		||||
    :keymaps 'override
 | 
			
		||||
    "ot" 'transmission))
 | 
			
		||||
    :general
 | 
			
		||||
    (chris/leader-keys
 | 
			
		||||
      :states 'normal
 | 
			
		||||
      :keymaps 'override
 | 
			
		||||
      "ot" 'transmission))
 | 
			
		||||
 | 
			
		||||
(use-package auth-source-pass
 | 
			
		||||
  :defer 1
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue