diff --git a/home/programs/default.nix b/home/programs/default.nix index 0044ef3..e2ae192 100644 --- a/home/programs/default.nix +++ b/home/programs/default.nix @@ -6,7 +6,6 @@ }: { imports = [ ./emacs - ./kitty ./ssh.nix ./zsh.nix ]; diff --git a/home/programs/emacs/init.el b/home/programs/emacs/init.el index 19daf7f..4feebb2 100644 --- a/home/programs/emacs/init.el +++ b/home/programs/emacs/init.el @@ -13,6 +13,13 @@ (setq inhibit-default-init t) +;; Transparent background for Emacs in terminal windows. +(defun on-after-init () + (unless (display-graphic-p (selected-frame)) + (set-face-background 'default "unspecified-bg" (selected-frame)))) + +(add-hook 'window-setup-hook 'on-after-init) + ;; Typically, I only want spaces when pressing the TAB key. I also ;; want 4 of them. (setq-default indent-tabs-mode nil diff --git a/home/programs/kitty/default.nix b/home/programs/kitty/default.nix deleted file mode 100644 index dbeb66f..0000000 --- a/home/programs/kitty/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - lib, - config, - pkgs, - ... -}: { - programs.kitty = { - enable = true; - extraConfig = '' - #include themes/draculaplus.conf - editor "${config.programs.emacs.finalPackage.out}/bin/emacsclient" -nw -c - - macos_option_as_alt yes - confirm_os_window_close 0 - ''; - shellIntegration.enableZshIntegration = true; - - /* - font = { - package = pkgs.meslo-lgs-nf; - name = "MesloLGS NF Regular"; - size = 12; - }; - */ - }; - - home.file.".config/kitty/themes".source = ./themes; -} diff --git a/home/programs/kitty/themes/draculaplus.conf b/home/programs/kitty/themes/draculaplus.conf deleted file mode 100644 index 8235719..0000000 --- a/home/programs/kitty/themes/draculaplus.conf +++ /dev/null @@ -1,21 +0,0 @@ -background #212121 -foreground #f8f8f2 -color0 #21212b -color1 #ff5454 -color2 #50f97b -color3 #ffca6b -color4 #c691e9 -color5 #82aaff -color6 #8ae8fd -color7 #f8f8f2 -color8 #545454 -color9 #ff6e6e -color10 #69ff93 -color11 #ffca6b -color12 #ff91df -color13 #d6acff -color14 #a3ffff -color15 #f8f8f2 -cursor #ebeff4 -selection_background #f8f8f2 -selection_foreground #545454 \ No newline at end of file diff --git a/nixos/modules/yabai/scripting-additions.nix b/nixos/modules/yabai/scripting-additions.nix index e51a708..8233ba7 100644 --- a/nixos/modules/yabai/scripting-additions.nix +++ b/nixos/modules/yabai/scripting-additions.nix @@ -7,7 +7,7 @@ home = config.home-manager.users.willem; homeDir = config.users.users.willem.home; emacsCfg = home.programs.emacs; - kittyCfg = home.programs.kitty; + alacrittyCfg = home.programs.alacritty; in { services.yabai = { enableScriptingAddition = true; @@ -37,7 +37,7 @@ in { yabai = "${config.services.yabai.package}/bin/yabai"; # Don't use nix emacs. Homebrew has a better version # emacs = "${pkgs.emacs}/bin/emacs"; - kitty = "${kittyCfg.package}/bin/kitty"; + alacritty = "${alacrittyCfg.package}/Applications/Alacritty.app/Contents/MacOS/alacritty"; # Handle any weird inversion bindings cmd = "cmd"; ctrl = "ctrl"; @@ -47,7 +47,7 @@ in { cmd - m : : rcmd - w : : - ${ctrl} - return : ${kitty} --single-instance --working-directory ${homeDir} + ${ctrl} - return : ${alacritty} msg create-window || ${alacritty} # Close window ${cmd} + shift - c : osascript -e 'tell application "System Events" to perform action "AXPress" of (first button whose subrole is "AXCloseButton") of (first window whose subrole is "AXStandardWindow") of (first process whose frontmost is true)' @@ -119,7 +119,7 @@ in { ${yabai} -m window --toggle border # Open Emacs - ${ctrl} + shift - n : ${kitty} --single-instance ${emacsCfg.finalPackage}/bin/emacsclient -nw + ${ctrl} + shift - n : ${alacritty} msg create-window -e ${emacsCfg.finalPackage}/bin/emacsclient -nw || alacritty -e ${emacsCfg.finalPackage}/bin/emacsclient -nwOA # Open Firefox window ${ctrl} + shift - b : /Applications/Firefox.app/Contents/MacOS/firefox -new-window '';