mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-13 03:37:18 +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 = [
|
imports = [
|
||||||
./emacs
|
./emacs
|
||||||
./kitty
|
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
./zsh.nix
|
./zsh.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -13,6 +13,13 @@
|
||||||
|
|
||||||
(setq inhibit-default-init t)
|
(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
|
;; Typically, I only want spaces when pressing the TAB key. I also
|
||||||
;; want 4 of them.
|
;; want 4 of them.
|
||||||
(setq-default indent-tabs-mode nil
|
(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;
|
home = config.home-manager.users.willem;
|
||||||
homeDir = config.users.users.willem.home;
|
homeDir = config.users.users.willem.home;
|
||||||
emacsCfg = home.programs.emacs;
|
emacsCfg = home.programs.emacs;
|
||||||
kittyCfg = home.programs.kitty;
|
alacrittyCfg = home.programs.alacritty;
|
||||||
in {
|
in {
|
||||||
services.yabai = {
|
services.yabai = {
|
||||||
enableScriptingAddition = true;
|
enableScriptingAddition = true;
|
||||||
|
@ -37,7 +37,7 @@ in {
|
||||||
yabai = "${config.services.yabai.package}/bin/yabai";
|
yabai = "${config.services.yabai.package}/bin/yabai";
|
||||||
# Don't use nix emacs. Homebrew has a better version
|
# Don't use nix emacs. Homebrew has a better version
|
||||||
# emacs = "${pkgs.emacs}/bin/emacs";
|
# emacs = "${pkgs.emacs}/bin/emacs";
|
||||||
kitty = "${kittyCfg.package}/bin/kitty";
|
alacritty = "${alacrittyCfg.package}/Applications/Alacritty.app/Contents/MacOS/alacritty";
|
||||||
# Handle any weird inversion bindings
|
# Handle any weird inversion bindings
|
||||||
cmd = "cmd";
|
cmd = "cmd";
|
||||||
ctrl = "ctrl";
|
ctrl = "ctrl";
|
||||||
|
@ -47,7 +47,7 @@ in {
|
||||||
cmd - m : :
|
cmd - m : :
|
||||||
rcmd - w : :
|
rcmd - w : :
|
||||||
|
|
||||||
${ctrl} - return : ${kitty} --single-instance --working-directory ${homeDir}
|
${ctrl} - return : ${alacritty} msg create-window || ${alacritty}
|
||||||
|
|
||||||
# Close window
|
# 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)'
|
${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
|
${yabai} -m window --toggle border
|
||||||
|
|
||||||
# Open Emacs
|
# 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
|
# Open Firefox window
|
||||||
${ctrl} + shift - b : /Applications/Firefox.app/Contents/MacOS/firefox -new-window
|
${ctrl} + shift - b : /Applications/Firefox.app/Contents/MacOS/firefox -new-window
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Add table
Reference in a new issue