mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-12 19:27:17 +00:00
Fixes Emacs transparency, replaces kitty with alacritty
This commit is contained in:
parent
923b66d030
commit
f01a4e3004
5 changed files with 11 additions and 54 deletions
|
@ -6,7 +6,6 @@
|
|||
}: {
|
||||
imports = [
|
||||
./emacs
|
||||
./kitty
|
||||
./ssh.nix
|
||||
./zsh.nix
|
||||
];
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -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
|
|
@ -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
|
||||
'';
|
||||
|
|
Loading…
Add table
Reference in a new issue