From aea1281d9f2d87f29168a7d2417b5977b148ef5f Mon Sep 17 00:00:00 2001 From: Malte Brandy Date: Fri, 29 Nov 2019 19:22:38 +0100 Subject: [PATCH] Improve colors --- home/desktop/default.nix | 25 ++------ home/desktop/sway.config | 1 - home/desktop/sway.nix | 4 +- home/modules/mail.nix | 131 ++++++++++++++++++++------------------- lib/default.nix | 2 +- pkgs/nvim/default.nix | 7 ++- pkgs/nvim/vimrc | 1 - 7 files changed, 79 insertions(+), 92 deletions(-) diff --git a/home/desktop/default.nix b/home/desktop/default.nix index 66d566bb..59226932 100644 --- a/home/desktop/default.nix +++ b/home/desktop/default.nix @@ -1,5 +1,7 @@ { pkgs, lib, config, ... }: -let inherit (import ../../pkgs) desktop-pkgs; +let + inherit (import ../../pkgs) desktop-pkgs; + inherit (import ../../lib) colors; in { imports = [ ./sway.nix @@ -23,26 +25,7 @@ in { "config" ]; terminal = "${desktop-pkgs.terminal}/bin/terminal"; - colors = { - "foreground" = "#dddbff"; - "background" = "#000000"; - "black" = "#000000"; - "brightBlack" = "#55508f"; - "red" = "#e34b4f"; - "brightRed" = "#e34b4f"; - "green" = "#67b779"; - "brightGreen" = "#45b75e"; - "yellow" = "#ff9c00"; - "brightYellow" = "#ff9c00"; - "blue" = "#5c67ff"; - "brightBlue" = "#5c67ff"; - "magenta" = "#cb85ff"; - "brightMagenta" = "#cb85ff"; - "cyan" = "#17d0f4"; - "brightCyan" = "#17d0f4"; - "white" = "#dddbff"; - "brightWhite" = "#ffffff"; - }; + colors = colors; }; home = { packages = builtins.attrValues desktop-pkgs; }; programs.browserpass.enable = true; diff --git a/home/desktop/sway.config b/home/desktop/sway.config index c760abad..166aec53 100644 --- a/home/desktop/sway.config +++ b/home/desktop/sway.config @@ -1,5 +1,4 @@ set $mod Mod4 -set $term ate set $lock swaylock -e -F -l -s fill -f -i ~/volatile/wallpaper.jpg exec systemctl --user set-environment SWAYSOCK="$SWAYSOCK" diff --git a/home/desktop/sway.nix b/home/desktop/sway.nix index 286bc852..8e9741f7 100644 --- a/home/desktop/sway.nix +++ b/home/desktop/sway.nix @@ -86,7 +86,7 @@ in { "prior" = "focus parent"; "next" = "focus child"; "shift+q" = - "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'"; + "exec ${pkgs.sway}/bin/swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'"; "Return" = "exec ${terminal}"; "q" = "kill"; "space" = "exec hotkeys"; @@ -119,6 +119,7 @@ in { font monospace 9.5 height 17 strip_workspace_numbers yes + position top mode hide @@ -158,6 +159,7 @@ in { } } + exec ${pkgs.mako}/bin/mako --background-color ${colors.background}cc --text-color ${colors.foreground} --border-size 0 exec ${my-pkgs.my-ssh-add}/bin/my-ssh-add exec xrdb -load ${builtins.toFile "Xresources" "Xft.dpi: 96"} ''; diff --git a/home/modules/mail.nix b/home/modules/mail.nix index 551a8570..829cd9c6 100644 --- a/home/modules/mail.nix +++ b/home/modules/mail.nix @@ -56,8 +56,8 @@ in { value = mkService name account; }; hasImapHost = name: account: account.imap != null; - in mapAttrs' mkServiceWithName - (filterAttrs hasImapHost config.accounts.email.accounts); + in mapAttrs' mkServiceWithName + (filterAttrs hasImapHost config.accounts.email.accounts); programs.msmtp.enable = true; programs.mbsync.enable = true; @@ -107,77 +107,78 @@ in { video/*; ${pkgs.xdg_utils}/bin/xdg-open %s > /dev/null audio/*; ${pkgs.xdg_utils}/bin/xdg-open %s > /dev/null ''; - in { - ".neomuttrc".text = '' - alternative_order text/plain text/html - auto_view text/* - auto_view message/* - unset wait_key + in { + ".neomuttrc".text = '' + alternative_order text/plain text/html + auto_view text/* + auto_view message/* + unset wait_key + color normal default default - set query_format="%4c %t %-70.70a %-70.70n %?e?(%e)?" - set query_command = "${pkgs.notmuch}/bin/notmuch address --output=recipients --deduplicate=address '%s' | grep -i '%s'" - bind editor complete-query - bind editor ^T complete + set query_format="%4c %t %-70.70a %-70.70n %?e?(%e)?" + set query_command = "${pkgs.notmuch}/bin/notmuch address --output=recipients --deduplicate=address '%s' | grep -i '%s'" + bind editor complete-query + bind editor ^T complete - set crypt_use_gpgme = yes - set pgp_use_gpg_agent = yes - set pgp_auto_decode = yes - set pgp_autosign = yes - set pgp_replysign = yes - set pgp_replyencrypt = yes - set crypt_replysignencrypted = yes - set crypt_verify_sig = yes - set pgp_sign_as="${me.gpg}" - set pgp_use_gpg_agent = yes - set pgp_default_key="${me.gpg}" - set timeout = 5 + set crypt_use_gpgme = yes + set pgp_use_gpg_agent = yes + set pgp_auto_decode = yes + set pgp_autosign = yes + set pgp_replysign = yes + set pgp_replyencrypt = yes + set crypt_replysignencrypted = yes + set crypt_verify_sig = yes + set pgp_sign_as="${me.gpg}" + set pgp_use_gpg_agent = yes + set pgp_default_key="${me.gpg}" + set timeout = 5 - alternates ${mutt_alternates} - set folder="${maildir}" - mailboxes `find ${maildir} -type d -name Inbox -printf '"%h" '` `find ${maildir} -type d -name cur -printf '"%h" '` - set sendmail="${pkgs.msmtp}/bin/msmtp --read-envelope-from" - set sort=threads - set sort_aux=date-sent - set realname="${me.name}" - set from=fill-later - set use_from=yes - set fast_reply=yes - set mailcap_path=${mailcap}; - set include=yes - set edit_headers=yes - set mbox_type=Maildir - set spoolfile="${maildir}/hera/Inbox" - set record="${maildir}/hera/Archiv/unsortiert" - set postponed="${maildir}/hera/Drafts" - set mail_check_stats=yes - bind index / vfolder-from-query - set header_cache = "~/.cache/neomutt" - set date_format="!%y-%m-%d %H:%M" - set mime_forward=yes - set mime_forward_rest=yes + alternates ${mutt_alternates} + set folder="${maildir}" + mailboxes `find ${maildir} -type d -name Inbox -printf '"%h" '` `find ${maildir} -type d -name cur -printf '"%h" '` + set sendmail="${pkgs.msmtp}/bin/msmtp --read-envelope-from" + set sort=threads + set sort_aux=date-sent + set realname="${me.name}" + set from=fill-later + set use_from=yes + set fast_reply=yes + set mailcap_path=${mailcap}; + set include=yes + set edit_headers=yes + set mbox_type=Maildir + set spoolfile="${maildir}/hera/Inbox" + set record="${maildir}/hera/Archiv/unsortiert" + set postponed="${maildir}/hera/Drafts" + set mail_check_stats=yes + bind index / vfolder-from-query + set header_cache = "~/.cache/neomutt" + set date_format="!%y-%m-%d %H:%M" + set mime_forward=yes + set mime_forward_rest=yes - macro index "!systemctl --user start mbsync > /dev/null" + macro index "!systemctl --user start mbsync > /dev/null" - source "${hide-sidebar}" - macro index "source ${hide-sidebar}" - macro index "source ${show-sidebar}" - set sidebar_folder_indent=yes - set sidebar_short_path=yes - set sidebar_width=40 - set sidebar_sort_method="alpha" - set sidebar_indent_string=" " - color sidebar_indicator black white - color sidebar_highlight white blue - set sidebar_format = "%B%* %?N?%N/?%S" + source "${hide-sidebar}" + macro index "source ${hide-sidebar}" + macro index "source ${show-sidebar}" + set sidebar_folder_indent=yes + set sidebar_short_path=yes + set sidebar_width=40 + set sidebar_sort_method="alpha" + set sidebar_indent_string=" " + color sidebar_indicator black white + color sidebar_highlight white blue + set sidebar_format = "%B%* %?N?%N/?%S" - alias f__0 ${me.name} <${me.mail}> - ${builtins.concatStringsSep "\n" - (lib.imap1 (n: x: "alias f__${toString n} ${me.name} <${x}>") + alias f__0 ${me.name} <${me.mail}> + ${builtins.concatStringsSep "\n" + (lib.imap1 (n: x: "alias f__${toString n} ${me.name} <${x}>") me.alternates)} - send2-hook '~f fill-later' "push f__${me.mail}" - ''; - }; + send2-hook '~f fill-later' "push f__${me.mail}" + ''; + }; }; }; diff --git a/lib/default.nix b/lib/default.nix index baee26ba..af378f23 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,7 +1,7 @@ rec { colors = { "foreground" = "#dddbff"; - "background" = "#000000"; + "background" = "#000018"; "black" = "#000000"; "brightBlack" = "#55508f"; "red" = "#e34b4f"; diff --git a/pkgs/nvim/default.nix b/pkgs/nvim/default.nix index f4a4912b..2f8df5b2 100644 --- a/pkgs/nvim/default.nix +++ b/pkgs/nvim/default.nix @@ -1,14 +1,17 @@ n: n.override (let pkgs = import { }; - tabnine = (import ../../lib).sources.tabnine-vim; + inherit (import ../../lib) sources colors; + tabnine = sources.tabnine-vim; in { vimAlias = true; withPython3 = true; configure = { customRC = '' set rtp+=${tabnine} - ${builtins.readFile ./vimrc}''; + ${builtins.readFile ./vimrc} + hi Normal ctermbg=NONE + ''; packages.myVimPackage = { start = builtins.attrValues { inherit (pkgs.vimPlugins) diff --git a/pkgs/nvim/vimrc b/pkgs/nvim/vimrc index 8f7d9b6d..4284ec84 100644 --- a/pkgs/nvim/vimrc +++ b/pkgs/nvim/vimrc @@ -72,7 +72,6 @@ let g:autoformat_autoindent = 0 let g:autoformat_retab = 0 colorscheme PaperColor -hi Normal ctermbg=black " if hidden is not set, TextEdit might fail. set hidden