From a2ab9b3db1bc52a3cc98b2785b86cccc81d61fab Mon Sep 17 00:00:00 2001 From: chayleaf Date: Tue, 21 Feb 2023 05:20:19 +0700 Subject: [PATCH] add readme, calendar, etc --- README.md | 11 +++++++++++ home/common/vim.nix | 3 +++ home/common/waybar.css | 1 + home/common/waybar.nix | 18 +++++++++++++++--- push.sh | 4 ++++ update.sh | 5 +++++ 6 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 README.md create mode 100755 push.sh create mode 100755 update.sh diff --git a/README.md b/README.md new file mode 100644 index 0000000..29cf35f --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# My Nix config + +To install, put `system` to `/etc/nixos`, put `home` to +`~/.config/nixpkgs`. + +The reason they are separate is because I want to be able to iterate +home config quickly, and `nixos-rebuild`'ing the entire sytem for every +little change is pretty annoying (not to mention the necessity of +`sudo`). I'll probably merge them later, especially after +[Tvix](https://tvl.fyi/blog/rewriting-nix) becomes feature-complete. + diff --git a/home/common/vim.nix b/home/common/vim.nix index 64ed59f..78d485a 100644 --- a/home/common/vim.nix +++ b/home/common/vim.nix @@ -20,6 +20,9 @@ extraConfig = '' autocmd BufReadPost * if @% !~# '\.git[\/\\]COMMIT_EDITMSG$' && line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif syntax on + au FileType markdown set colorcolumn=73 textwidth=72 + au FileType gitcommit set colorcolumn=73 + lua << EOF EOF ''; diff --git a/home/common/waybar.css b/home/common/waybar.css index 372442a..f9efb66 100644 --- a/home/common/waybar.css +++ b/home/common/waybar.css @@ -16,6 +16,7 @@ } #mpris { + padding-left: 3px; font-family: "Noto Sans Mono CJK JP", "Noto Sans Mono", "Symbols Nerd Font Mono", monospace; } diff --git a/home/common/waybar.nix b/home/common/waybar.nix index c9fdad5..cbabbd9 100644 --- a/home/common/waybar.nix +++ b/home/common/waybar.nix @@ -76,11 +76,9 @@ # format = "{usage}% "; format = "{icon0}{icon1}{icon2}{icon3}{icon4}{icon5}{icon6}{icon7}{icon8}{icon9}{icon10}{icon11}{icon12}{icon13}{icon14}{icon15}"; format-icons = ["▁" "▂" "▃" "▄" "▅" "▆" "▇" "█"]; - tooltip = false; }; memory = { format = "{used}G"; - tooltip = false; }; tray = { icon-size = 26; @@ -94,7 +92,21 @@ clock = { interval = 5; format = "{:%Y-%m-%d %H:%M:%S}"; - tooltip = false; + tooltip-format = "{calendar}"; + calendar = { + mode = "year"; + # TODO: make this work + mode-mon-col = 3; + on-scroll = 1; + on-click-right = "mode"; + format = { + months = "{}"; + days = "{}"; + weeks = "W{}"; + weekdays = "{}"; + today = "{}"; + }; + }; }; "sway/language" = { tooltip = false; diff --git a/push.sh b/push.sh new file mode 100755 index 0000000..5f1d669 --- /dev/null +++ b/push.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +git push +git push github master + diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..c59350c --- /dev/null +++ b/update.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +rm -rf ./home ./system +cp -r /etc/nixos ./system +cp -r ~/.config/nixpkgs ./home +