From 26dd014860c0edd89a859d2d8c6dff10275acbad Mon Sep 17 00:00:00 2001 From: Jacob Janzen Date: Mon, 16 Dec 2024 23:28:56 -0600 Subject: system changes --- common/.flake/home/clang-format.nix.org | 6 ++++ common/.flake/home/fonts.nix.org | 4 ++- common/.flake/home/programs/alacritty.nix.org | 13 ++++++++ common/.flake/home/programs/fastfetch.nix.org | 46 +++++++++++++++++++------ common/.flake/home/programs/neovim.nix.org | 2 +- common/.flake/home/programs/zsh.nix.org | 2 +- common/.flake/system/skhd.nix.org | 48 --------------------------- common/.flake/system/yabai.nix.org | 33 ------------------ 8 files changed, 60 insertions(+), 94 deletions(-) delete mode 100644 common/.flake/system/skhd.nix.org delete mode 100644 common/.flake/system/yabai.nix.org (limited to 'common') diff --git a/common/.flake/home/clang-format.nix.org b/common/.flake/home/clang-format.nix.org index 64a2a64..f25e482 100644 --- a/common/.flake/home/clang-format.nix.org +++ b/common/.flake/home/clang-format.nix.org @@ -1,5 +1,11 @@ #+title: Clang Format Default Options +Set global =clang-format= options: +- Default to LLVM style +- Use indents of width 4 +- Use Linux standards for braces (new line for functions, same line for everything else) +- If statements cannot be on a single line. +- Case labels are not indented. #+begin_src nix :tangle ~/.flake/home/clang-format.nix :mkdirp yes { config, pkgs, ... }: diff --git a/common/.flake/home/fonts.nix.org b/common/.flake/home/fonts.nix.org index ebc1395..5b66799 100644 --- a/common/.flake/home/fonts.nix.org +++ b/common/.flake/home/fonts.nix.org @@ -1,6 +1,8 @@ #+title: Font Configuration -Install fonts necessary for my configuration. +Install fonts necessary for my configuration. Namely +- Computer Modern +- Source Code Pro (Nerd Font) #+begin_src nix :tangle ~/.flake/home/fonts.nix :mkdirp yes { config, pkgs, ... }: diff --git a/common/.flake/home/programs/alacritty.nix.org b/common/.flake/home/programs/alacritty.nix.org index 0c85e2b..5249145 100644 --- a/common/.flake/home/programs/alacritty.nix.org +++ b/common/.flake/home/programs/alacritty.nix.org @@ -1,5 +1,6 @@ #+title: Alacritty Configuration +This is the configuration for Alacritty terminal emulator. #+begin_src nix { config, pkgs, ... }: @@ -7,6 +8,10 @@ programs.alacritty = { enable = true; settings = { +#+end_src + +Use no window decorations, slight transparency, small padding, and allow the =⌥= to work as =alt=. +#+begin_src nix window = { decorations = "None"; opacity = 0.9; @@ -16,6 +21,10 @@ }; option_as_alt = "Both"; }; +#+end_src + +Use Source Code Pro (Nerd Font), size 14 as my font. +#+begin_src nix font = { normal = { family = "SauceCodePro Nerd Font"; @@ -23,6 +32,10 @@ }; size = 14; }; +#+end_src + +Set colour scheme. +#+begin_src nix colors = { primary = { background = "#ece0c9"; diff --git a/common/.flake/home/programs/fastfetch.nix.org b/common/.flake/home/programs/fastfetch.nix.org index 96b2044..acdbd16 100644 --- a/common/.flake/home/programs/fastfetch.nix.org +++ b/common/.flake/home/programs/fastfetch.nix.org @@ -1,22 +1,48 @@ #+title: Fastfetch Configuration Specify the layout for =fastfetch=. -#+begin_src nix :tangle ~/.flake/home/programs/fastfetch.nix :mkdirp yes +#+begin_src nix { config, pkgs, ... }: { programs.fastfetch = { enable = true; settings = { - logo = { - type = "raw"; - source = "~/.config/fastfetch/logo.sixel"; - width = 40; - height = 19; - }; - display = { - separator = " "; - }; +#+end_src + +Use a =sixel=-encoded logo at =~/.config/fastfetch/logo.sixel=. +#+begin_src nix + logo = { + type = "raw"; + source = "~/.config/fastfetch/logo.sixel"; + width = 40; + height = 19; + }; +#+end_src + +Use two spaces as a separator. +#+begin_src nix + display = { + separator = " "; + }; +#+end_src + +List out +- Operating system +- The kernel +- Uptime +- The number of packages +- Shell +- Display information +- Window manager +- Terminal +- CPU information +- GPU information +- Memory information +- Disk usage +- Locale +- Colours +#+begin_src nix modules = [ "title" { diff --git a/common/.flake/home/programs/neovim.nix.org b/common/.flake/home/programs/neovim.nix.org index b67e7b6..586e620 100644 --- a/common/.flake/home/programs/neovim.nix.org +++ b/common/.flake/home/programs/neovim.nix.org @@ -1,6 +1,6 @@ #+title: Neovim Settings -Create a simple Neovim configuration. +Create a simple Neovim configuration. Install some basic packages and use a light colour scheme. #+begin_src nix { config, pkgs, ... }: diff --git a/common/.flake/home/programs/zsh.nix.org b/common/.flake/home/programs/zsh.nix.org index 404586c..6b8d5ea 100644 --- a/common/.flake/home/programs/zsh.nix.org +++ b/common/.flake/home/programs/zsh.nix.org @@ -81,6 +81,7 @@ Create the prompt. PS1='%(?..%B%F{red}[%?%\]%f%b )%F{green}%20<...<%~%<<%f$vcs_info_msg_0_$(parse_git_dirty) $ ' #+end_src +Close the extra code block. #+begin_src nix ''; #+end_src @@ -104,7 +105,6 @@ Close =.profile= code. ''; #+end_src - Close =zsh= configuration. #+begin_src nix }; diff --git a/common/.flake/system/skhd.nix.org b/common/.flake/system/skhd.nix.org deleted file mode 100644 index 5b9d2e9..0000000 --- a/common/.flake/system/skhd.nix.org +++ /dev/null @@ -1,48 +0,0 @@ -#+title: SKHD Configuration - -#+begin_src nix - { config, pkgs, ... }: - - { - services.skhd = { - enable = true; - skhdConfig = '' - cmd - return : /opt/homebrew/bin/alacritty - cmd + shift - q : yabai -m window --close - cmd - d : ~/.local/bin/launcher - cmd + shift - c : yabai --restart-service && skhd --restart-service - cmd - h : yabai -m window --focus west || yabai -m display --focus west - cmd - j : yabai -m window --focus south || yabai -m display --focus south - cmd - k : yabai -m window --focus north || yabai -m display --focus north - cmd - l : yabai -m window --focus east || yabai -m display --focus east - shift + cmd - h : yabai -m window --warp west - shift + cmd - j : yabai -m window --warp south - shift + cmd - k : yabai -m window --warp north - shift + cmd - l : yabai -m window --warp east - cmd - 1 : yabai -m space --focus 1 - cmd - 2 : yabai -m space --focus 2 - cmd - 3 : yabai -m space --focus 3 - cmd - 4 : yabai -m space --focus 4 - cmd - 5 : yabai -m space --focus 5 - cmd - 6 : yabai -m space --focus 6 - cmd - 7 : yabai -m space --focus 7 - cmd - 8 : yabai -m space --focus 8 - cmd - 9 : yabai -m space --focus 9 - cmd - 0 : yabai -m space --focus 10 - cmd + shift - 1 : yabai -m window --space 1 - cmd + shift - 2 : yabai -m window --space 2 - cmd + shift - 3 : yabai -m window --space 3 - cmd + shift - 4 : yabai -m window --space 4 - cmd + shift - 5 : yabai -m window --space 5 - cmd + shift - 6 : yabai -m window --space 6 - cmd + shift - 7 : yabai -m window --space 7 - cmd + shift - 8 : yabai -m window --space 8 - cmd + shift - 9 : yabai -m window --space 9 - cmd + shift - 0 : yabai -m window --space 10 - cmd + shift - f : yabai -m window --toggle zoom-fullscreen - cmd + shift - space : yabai -m window --toggle float - cmd + shift - s : open /System/Applications/Utilities/Screenshot.app - ''; - }; - } -#+end_src diff --git a/common/.flake/system/yabai.nix.org b/common/.flake/system/yabai.nix.org deleted file mode 100644 index 8409cd8..0000000 --- a/common/.flake/system/yabai.nix.org +++ /dev/null @@ -1,33 +0,0 @@ -#+title: Yabai Configuration - -#+begin_src nix - { config, pkgs, ... }: - - { - services.yabai = { - enable = true; - enableScriptingAddition = true; - config = { - layout = "bsp"; - auto_balance = "on"; - top_padding = 0; - bottom_padding = 0; - left_padding = 0; - right_padding = 0; - window_gap = 0; - window_shadow = "float"; - focus_follows_mouse = "autoraise"; - mouse_follows_focus = "on"; - mouse_modifier = "cmd"; - mouse_action1 = "move"; - mouse_action2 = "resize"; - mouse_drop_action = "swap"; - }; - extraConfig = '' - yabai -m rule --add app="^System Settings$" manage=off - yabai -m rule --add app="^Calculator$" manage=off - yabai -m rule --add app="^mpv" manage=off - ''; - }; - } -#+end_src -- cgit v1.2.3