mirror of
https://github.com/nmasur/dotfiles
synced 2025-06-22 17:35:52 +00:00
Compare commits
No commits in common. "61c4e68fef0af9504bdbcc93c5417183a05bd7a8" and "59663686200db4f3a56800863ce3bdb416896b5f" have entirely different histories.
61c4e68fef
...
5966368620
@ -199,19 +199,13 @@ in
|
||||
exec = "${lib.getExe config.nmasur.presets.services.i3.terminal} aerc %u";
|
||||
};
|
||||
xsession.windowManager.i3.config.keybindings = lib.mkIf pkgs.stdenv.isLinux {
|
||||
"${config.xsession.windowManager.i3.config.modifier}+Shift+e" =
|
||||
let
|
||||
terminal = config.nmasur.presets.services.i3.terminal;
|
||||
startupCommand =
|
||||
if terminal == pkgs.wezterm then "start --class aerc -- aerc" else "--class=aerc --command=aerc";
|
||||
in
|
||||
"exec ${
|
||||
"${config.xsession.windowManager.i3.config.modifier}+Shift+e" = "exec ${
|
||||
# Don't name the script `aerc` or it will affect grep
|
||||
builtins.toString (
|
||||
pkgs.writeShellScript "focus-mail.sh" ''
|
||||
count=$(ps aux | grep -c aerc)
|
||||
if [ "$count" -eq 1 ]; then
|
||||
i3-msg "exec --no-startup-id ${lib.getExe terminal} ${startupCommand}"
|
||||
i3-msg "exec --no-startup-id ${lib.getExe config.nmasur.presets.services.i3.terminal} start --class aerc -- aerc"
|
||||
sleep 0.25
|
||||
fi
|
||||
i3-msg "[class=aerc] focus"
|
||||
|
@ -14,10 +14,6 @@ in
|
||||
options.nmasur.presets.programs.ghostty.enable = lib.mkEnableOption "Ghostty terminal";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
# Set the i3 terminal
|
||||
nmasur.presets.services.i3.terminal = config.programs.ghostty.package;
|
||||
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
|
||||
@ -33,7 +29,7 @@ in
|
||||
macos-titlebar-style = "hidden";
|
||||
window-decoration = false;
|
||||
macos-non-native-fullscreen = true;
|
||||
fullscreen = if pkgs.stdenv.isDarwin then true else false;
|
||||
fullscreen = true;
|
||||
keybind = [
|
||||
"super+t=unbind" # Pass super-t to underlying tool (e.g. zellij tabs)
|
||||
"super+shift+]=unbind"
|
||||
|
@ -87,14 +87,6 @@ in
|
||||
command = lib.getExe pkgs.mdformat;
|
||||
args = [ "-" ];
|
||||
};
|
||||
# Allows return key to continue the token on the next line
|
||||
comment-tokens = [
|
||||
"-"
|
||||
"+"
|
||||
"*"
|
||||
"- [ ]"
|
||||
">"
|
||||
];
|
||||
}
|
||||
{
|
||||
name = "tfvars";
|
||||
|
@ -94,7 +94,7 @@ in
|
||||
ws10 = "10:X";
|
||||
in
|
||||
{
|
||||
# terminal = cfg.terminal.meta.mainProgram;
|
||||
terminal = cfg.terminal.meta.mainProgram;
|
||||
modifier = modifier;
|
||||
assigns = {
|
||||
"${ws1}" = [ { class = "Firefox"; } ];
|
||||
@ -103,7 +103,6 @@ in
|
||||
{ class = "kitty"; }
|
||||
{ class = "obsidian"; }
|
||||
{ class = "wezterm"; }
|
||||
{ class = "ghostty"; }
|
||||
];
|
||||
"${ws3}" = [ { class = "discord"; } ];
|
||||
"${ws4}" = [
|
||||
@ -214,9 +213,9 @@ in
|
||||
cfg.commands.lockScreen != null
|
||||
) "exec ${cfg.commands.lockScreen}";
|
||||
"${modifier}+Mod1+h" =
|
||||
"exec --no-startup-id ${lib.getExe cfg.terminal} --command sh -c '${pkgs.home-manager}/bin/home-manager switch --flake ${config.nmasur.presets.programs.dotfiles.path} || read'";
|
||||
"exec --no-startup-id ${lib.getExe cfg.terminal} -e sh -c '${pkgs.home-manager}/bin/home-manager switch --flake ${config.nmasur.presets.programs.dotfiles.path} || read'";
|
||||
"${modifier}+Mod1+r" =
|
||||
"exec --no-startup-id ${lib.getExe cfg.terminal} --command sh -c 'doas nixos-rebuild switch --flake ${config.nmasur.presets.programs.dotfiles.path} || read'";
|
||||
"exec --no-startup-id ${lib.getExe cfg.terminal} -e sh -c 'doas nixos-rebuild switch --flake ${config.nmasur.presets.programs.dotfiles.path} || read'";
|
||||
|
||||
# Window options
|
||||
"${modifier}+q" = "kill";
|
||||
|
@ -136,15 +136,7 @@ in
|
||||
fi
|
||||
''
|
||||
);
|
||||
click-left =
|
||||
let
|
||||
startupCommand =
|
||||
if config.nmasur.presets.services.i3.terminal == pkgs.wezterm then
|
||||
"start --class aerc -- aerc"
|
||||
else
|
||||
"--class=aerc --command=aerc";
|
||||
in
|
||||
"i3-msg 'exec --no-startup-id ${config.nmasur.presets.services.i3.terminal} ${startupCommand}'; sleep 0.15; i3-msg '[class=aerc] focus'";
|
||||
click-left = "i3-msg 'exec --no-startup-id kitty --class aerc aerc'; sleep 0.15; i3-msg '[class=aerc] focus'";
|
||||
};
|
||||
"module/network" = {
|
||||
type = "internal/network";
|
||||
|
@ -24,13 +24,13 @@ in
|
||||
discord.enable = lib.mkDefault true;
|
||||
dotfiles.enable = lib.mkDefault true;
|
||||
firefox.enable = lib.mkDefault true;
|
||||
ghostty.enable = lib.mkDefault true;
|
||||
mpv.enable = lib.mkDefault true;
|
||||
nautilus.enable = lib.mkDefault true;
|
||||
notmuch.enable = lib.mkDefault true;
|
||||
nsxiv.enable = lib.mkDefault true;
|
||||
obsidian.enable = lib.mkDefault true;
|
||||
rofi.enable = lib.mkDefault true;
|
||||
wezterm.enable = lib.mkDefault true;
|
||||
xclip.enable = lib.mkDefault true;
|
||||
zathura.enable = lib.mkDefault true;
|
||||
};
|
||||
|
@ -55,7 +55,6 @@ in
|
||||
firefox.enable = lib.mkDefault true;
|
||||
fish.enable = lib.mkDefault true;
|
||||
fzf.enable = lib.mkDefault true;
|
||||
ghostty.enable = lib.mkDefault true;
|
||||
git-work.enable = lib.mkDefault true;
|
||||
git.enable = lib.mkDefault true;
|
||||
github.enable = lib.mkDefault true;
|
||||
@ -68,6 +67,7 @@ in
|
||||
starship.enable = lib.mkDefault true;
|
||||
terraform.enable = lib.mkDefault true;
|
||||
weather.enable = lib.mkDefault true;
|
||||
wezterm.enable = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -18,7 +18,6 @@ in
|
||||
|
||||
nmasur.presets.services.kanata.enable = lib.mkDefault true;
|
||||
nmasur.presets.services.lightdm.enable = lib.mkDefault true;
|
||||
nmasur.presets.programs.nautilus.enable = lib.mkDefault true;
|
||||
|
||||
# Mouse customization
|
||||
services.ratbagd.enable = lib.mkDefault true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user