From 5e0fabb2579f7b639048ee8e30a867e644eb3393 Mon Sep 17 00:00:00 2001 From: Emmet Date: Sun, 27 Aug 2023 08:43:50 -0500 Subject: [PATCH] Opacity fixes and other aesthetic improvements --- user/app/doom-emacs/config.el | 93 ++++++++++++++++++----------- user/app/doom-emacs/doom.org | 100 ++++++++++++++++++++------------ user/app/doom-emacs/init.el | 2 +- user/app/doom-emacs/packages.el | 1 + user/app/terminal/alacritty.nix | 2 +- user/app/terminal/kitty.nix | 2 +- user/wm/hyprland/hyprland.nix | 4 +- 7 files changed, 128 insertions(+), 76 deletions(-) diff --git a/user/app/doom-emacs/config.el b/user/app/doom-emacs/config.el index 1c0791a..d650009 100644 --- a/user/app/doom-emacs/config.el +++ b/user/app/doom-emacs/config.el @@ -28,8 +28,8 @@ (remove-hook 'doom-init-ui-hook '+unicode-init-fonts-h) ;; Transparent background -(set-frame-parameter nil 'alpha-background 90) -(add-to-list 'default-frame-alist '(alpha-background . 90)) +(set-frame-parameter nil 'alpha-background 65) +(add-to-list 'default-frame-alist '(alpha-background . 65)) ;; Icons in completion buffers (add-hook 'marginalia-mode-hook #'all-the-icons-completion-marginalia-setup) @@ -64,38 +64,63 @@ ;; Disables custom.el (setq custom-file null-device) -;; Fancy splash image -(setq fancy-splash-image "~/.emacs.d/dashboard-logo.png") - -(setq +doom-dashboard-menu-sections -'(("Open org roam overview" :icon - (all-the-icons-octicon "globe" :face 'doom-dashboard-menu-title) - :face - (:inherit - (doom-dashboard-menu-title bold)) - :action org-roam-default-overview) - ("Roam to another db" :icon - (all-the-icons-fileicon "org" :face 'doom-dashboard-menu-title) - :action org-roam-switch-db) - ("Open agenda" :icon - (all-the-icons-octicon "calendar" :face 'doom-dashboard-menu-title) - :when - (fboundp 'org-agenda) - :action org-agenda-list - :key "SPC o A a") - ("Open private configuration" :icon - (all-the-icons-octicon "tools" :face 'doom-dashboard-menu-title) - :when - (file-directory-p doom-user-dir) - :action doom/open-private-config) - ("Open documentation" :icon - (all-the-icons-octicon "book" :face 'doom-dashboard-menu-title) - :action doom/help) - ("Quit emacs" :icon - (all-the-icons-faicon "level-down" :face 'doom-dashboard-menu-title) - :action save-buffers-kill-terminal) - ) -) +;; Emacs dashboard +(require 'all-the-icons) +(require 'dashboard) +(setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*"))) +(setq doom-fallback-buffer-name "*dashboard*") +(setq dashboard-banner-logo-title "Welcome to Nix Doom Emacs") +(setq dashboard-startup-banner 2) +(setq dashboard-icon-type 'all-the-icons) ;; use `all-the-icons' package +(setq dashboard-set-heading-icons t) +(setq dashboard-set-file-icons t) +(setq dashboard-set-navigator t) +(setq dashboard-items '((projects . 3))) +(setq dashboard-center-content t) +(setq dashboard-footer-messages '("Here to do customizing, or actual work?" + "M-x insert-inspiring-message" + "My software never has bugs. It just develops random features." + "Give a man a program and you will frustrate him for a day. +Teach him how to program and you will frustrate him for a lifetime." + "Dad, what are clouds made of? Linux servers, mostly." + "There is no place like ~" + "~ sweet ~" + "sudo chown -R us ./allyourbase" + "I’ll tell you a DNS joke but it could take 24 hours for everyone to get it." + "I'd tell you a UDP joke, but you might not get it." + "I'll tell you a TCP joke. Do you want to hear it?")) +(setq dashboard-navigator-buttons + `(;; line1 + ( + (,(all-the-icons-octicon "mark-github" :height 1.1 :v-adjust 0.0) + "GitHub" "" (lambda (&rest _) (browse-url "ext+container:name=Tech&url=https://github.com/librephoenix"))) + (,(all-the-icons-faicon "gitlab" :height 1.1 :v-adjust 0.0) + "GitLab" "" (lambda (&rest _) (browse-url "ext+container:name=Tech&url=https://gitlab.com/librephoenix"))) + (,(all-the-icons-faicon "coffee" :height 1.1 :v-adjust 0.0) + "Gitea" "" (lambda (&rest _) (browse-url my-gitea-domain))) + ) + ;; line 2 + ( + (,(all-the-icons-octicon "globe" :height 1.1 :v-adjust 0.0) + "Notes overview" "" (lambda (&rest _) (org-roam-default-overview))) + (,(all-the-icons-fileicon "org" :height 1.1 :v-adjust 0.0) + "Switch roam db" "" (lambda (&rest _) (org-roam-switch-db))) + (,(all-the-icons-octicon "calendar" :height 1.1 :v-adjust 0.0) + "Org roam agenda" "" (lambda (&rest _) (org-agenda-list))) + ) + ;; line 3 + ( + (,(all-the-icons-faicon "cogs" :height 1.1 :v-adjust 0.0) + "System config" "" (lambda (&rest _) (projectile-switch-project-by-name "~/.dotfiles" t))) + (,(all-the-icons-material "help" :height 1.1 :v-adjust 0.0) + "Doom documentation" "" (lambda (&rest _) (doom/help))) + ) + )) +(setq dashboard-footer-icon (all-the-icons-octicon "dashboard" + :height 1.1 + :v-adjust -0.05 + :face 'font-lock-keyword-face)) +(dashboard-setup-startup-hook) ;; Requires for faster loading (require 'org-agenda) diff --git a/user/app/doom-emacs/doom.org b/user/app/doom-emacs/doom.org index 6310f1d..85eee0e 100644 --- a/user/app/doom-emacs/doom.org +++ b/user/app/doom-emacs/doom.org @@ -77,9 +77,9 @@ Doom Emacs is traditionally installed by cloning the repository ([[https://githu ;; I also like evil mode visual movement (map! :map evil-normal-state-map :desc "Move to next visual line" - "j" 'evil-next-line + "j" 'evil-next-visual-line :desc "Move to previous visual line" - "k" 'evil-previous-line) + "k" 'evil-previous-visual-line) ;; Theme and font (setq custom-theme-directory "~/.emacs.d/themes") @@ -89,8 +89,8 @@ Doom Emacs is traditionally installed by cloning the repository ([[https://githu (remove-hook 'doom-init-ui-hook '+unicode-init-fonts-h) ;; Transparent background -(set-frame-parameter nil 'alpha-background 90) -(add-to-list 'default-frame-alist '(alpha-background . 90)) +(set-frame-parameter nil 'alpha-background 65) +(add-to-list 'default-frame-alist '(alpha-background . 65)) ;; Icons in completion buffers (add-hook 'marginalia-mode-hook #'all-the-icons-completion-marginalia-setup) @@ -125,38 +125,63 @@ Doom Emacs is traditionally installed by cloning the repository ([[https://githu ;; Disables custom.el (setq custom-file null-device) -;; Fancy splash image -(setq fancy-splash-image "~/.emacs.d/dashboard-logo.png") - -(setq +doom-dashboard-menu-sections -'(("Open org roam overview" :icon - (all-the-icons-octicon "globe" :face 'doom-dashboard-menu-title) - :face - (:inherit - (doom-dashboard-menu-title bold)) - :action org-roam-default-overview) - ("Roam to another db" :icon - (all-the-icons-fileicon "org" :face 'doom-dashboard-menu-title) - :action org-roam-switch-db) - ("Open agenda" :icon - (all-the-icons-octicon "calendar" :face 'doom-dashboard-menu-title) - :when - (fboundp 'org-agenda) - :action org-agenda-list - :key "SPC o A a") - ("Open private configuration" :icon - (all-the-icons-octicon "tools" :face 'doom-dashboard-menu-title) - :when - (file-directory-p doom-user-dir) - :action doom/open-private-config) - ("Open documentation" :icon - (all-the-icons-octicon "book" :face 'doom-dashboard-menu-title) - :action doom/help) - ("Quit emacs" :icon - (all-the-icons-faicon "level-down" :face 'doom-dashboard-menu-title) - :action save-buffers-kill-terminal) - ) -) +;; Emacs dashboard +(require 'all-the-icons) +(require 'dashboard) +(setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*"))) +(setq doom-fallback-buffer-name "*dashboard*") +(setq dashboard-banner-logo-title "Welcome to Nix Doom Emacs") +(setq dashboard-startup-banner 2) +(setq dashboard-icon-type 'all-the-icons) ;; use `all-the-icons' package +(setq dashboard-set-heading-icons t) +(setq dashboard-set-file-icons t) +(setq dashboard-set-navigator t) +(setq dashboard-items '((projects . 3))) +(setq dashboard-center-content t) +(setq dashboard-footer-messages '("Here to do customizing, or actual work?" + "M-x insert-inspiring-message" + "My software never has bugs. It just develops random features." + "Give a man a program and you will frustrate him for a day. +Teach him how to program and you will frustrate him for a lifetime." + "Dad, what are clouds made of? Linux servers, mostly." + "There is no place like ~" + "~ sweet ~" + "sudo chown -R us ./allyourbase" + "I’ll tell you a DNS joke but it could take 24 hours for everyone to get it." + "I'd tell you a UDP joke, but you might not get it." + "I'll tell you a TCP joke. Do you want to hear it?")) +(setq dashboard-navigator-buttons + `(;; line1 + ( + (,(all-the-icons-octicon "mark-github" :height 1.1 :v-adjust 0.0) + "GitHub" "" (lambda (&rest _) (browse-url "ext+container:name=Tech&url=https://github.com/librephoenix"))) + (,(all-the-icons-faicon "gitlab" :height 1.1 :v-adjust 0.0) + "GitLab" "" (lambda (&rest _) (browse-url "ext+container:name=Tech&url=https://gitlab.com/librephoenix"))) + (,(all-the-icons-faicon "coffee" :height 1.1 :v-adjust 0.0) + "Gitea" "" (lambda (&rest _) (browse-url my-gitea-domain))) + ) + ;; line 2 + ( + (,(all-the-icons-octicon "globe" :height 1.1 :v-adjust 0.0) + "Notes overview" "" (lambda (&rest _) (org-roam-default-overview))) + (,(all-the-icons-fileicon "org" :height 1.1 :v-adjust 0.0) + "Switch roam db" "" (lambda (&rest _) (org-roam-switch-db))) + (,(all-the-icons-octicon "calendar" :height 1.1 :v-adjust 0.0) + "Org roam agenda" "" (lambda (&rest _) (org-agenda-list))) + ) + ;; line 3 + ( + (,(all-the-icons-faicon "cogs" :height 1.1 :v-adjust 0.0) + "System config" "" (lambda (&rest _) (projectile-switch-project-by-name "~/.dotfiles" t))) + (,(all-the-icons-material "help" :height 1.1 :v-adjust 0.0) + "Doom documentation" "" (lambda (&rest _) (doom/help))) + ) + )) +(setq dashboard-footer-icon (all-the-icons-octicon "dashboard" + :height 1.1 + :v-adjust -0.05 + :face 'font-lock-keyword-face)) +(dashboard-setup-startup-hook) ;; Requires for faster loading (require 'org-agenda) @@ -1293,7 +1318,7 @@ This section is the [[./init.el][init.el]] section, which controls which Doom mo :ui ;;deft ; notational velocity for Emacs doom ; what makes DOOM look the way it does - doom-dashboard ; a nifty splash screen for Emacs + ;;doom-dashboard ; a nifty splash screen for Emacs doom-quit ; DOOM quit-message prompts when you quit Emacs (emoji +unicode) ; 🙂 hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW @@ -1474,6 +1499,7 @@ Any git package can be configured for a particular commit or branch: - =(unpin! pinned-package another-pinned-package)= to get bleeding edge instead of Doom's stability #+BEGIN_SRC emacs-lisp :tangle packages.el +(package! dashboard) (package! direnv) (package! org-modern) (package! org-super-agenda) diff --git a/user/app/doom-emacs/init.el b/user/app/doom-emacs/init.el index 2024ae6..8b4ccb4 100644 --- a/user/app/doom-emacs/init.el +++ b/user/app/doom-emacs/init.el @@ -13,7 +13,7 @@ :ui ;;deft ; notational velocity for Emacs doom ; what makes DOOM look the way it does - doom-dashboard ; a nifty splash screen for Emacs + ;;doom-dashboard ; a nifty splash screen for Emacs doom-quit ; DOOM quit-message prompts when you quit Emacs (emoji +unicode) ; 🙂 hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW diff --git a/user/app/doom-emacs/packages.el b/user/app/doom-emacs/packages.el index 78712dc..3e7d0cb 100644 --- a/user/app/doom-emacs/packages.el +++ b/user/app/doom-emacs/packages.el @@ -1,3 +1,4 @@ +(package! dashboard) (package! direnv) (package! org-modern) (package! org-super-agenda) diff --git a/user/app/terminal/alacritty.nix b/user/app/terminal/alacritty.nix index 451f0d9..c97282b 100644 --- a/user/app/terminal/alacritty.nix +++ b/user/app/terminal/alacritty.nix @@ -6,6 +6,6 @@ ]; programs.alacritty.enable = true; programs.alacritty.settings = { - window.opacity = lib.mkForce 0.9; + window.opacity = lib.mkForce 0.65; }; } diff --git a/user/app/terminal/kitty.nix b/user/app/terminal/kitty.nix index a2791b0..afbd70a 100644 --- a/user/app/terminal/kitty.nix +++ b/user/app/terminal/kitty.nix @@ -6,6 +6,6 @@ ]; programs.kitty.enable = true; programs.kitty.settings = { - background_opacity = lib.mkForce "0.9"; + background_opacity = lib.mkForce "0.65"; }; } diff --git a/user/wm/hyprland/hyprland.nix b/user/wm/hyprland/hyprland.nix index d5e2c3e..ff0b2f6 100644 --- a/user/wm/hyprland/hyprland.nix +++ b/user/wm/hyprland/hyprland.nix @@ -424,7 +424,7 @@ window#waybar { background-color: #'' + config.lib.stylix.colors.base00 + ''; - opacity: 0.87; + opacity: 0.94; border-radius: 8px; color: #'' + config.lib.stylix.colors.base07 + ''; transition-property: background-color; @@ -433,7 +433,7 @@ window > box { border-radius: 8px; - opacity: 0.87; + opacity: 0.94; } window#waybar.hidden {