diff --git a/modules/app/alacritty.nix b/modules/app/alacritty.nix index 90a4925..b910b12 100644 --- a/modules/app/alacritty.nix +++ b/modules/app/alacritty.nix @@ -49,7 +49,8 @@ in ''; samfelag.modules.desktop.i3.extraKeybindings = lib.mkIf i3Cfg.enable { - "${i3Cfg.mod}+Return" = "exec ${pkgs.alacritty}/bin/alacritty"; + "${i3Cfg.mod}+Return" = "exec ${pkgs.alacritty}/bin/alacritty"; + "${i3Cfg.mod}+Shift+Return" = "exec ${pkgs.alacritty}/bin/alacritty -t floating-term"; }; }; } diff --git a/modules/desktop/i3.nix b/modules/desktop/i3.nix index 8d60e5c..8be3892 100644 --- a/modules/desktop/i3.nix +++ b/modules/desktop/i3.nix @@ -78,6 +78,14 @@ in { window = { border = 1; titlebar = false; + + commands = [ + { + # Allow floating terminals + command = "floating enable"; + criteria = { title="^floating-term$"; }; + } + ]; }; gaps = { diff --git a/modules/dev/devenv.nix b/modules/dev/devenv.nix index 5b485f7..d8cf690 100644 --- a/modules/dev/devenv.nix +++ b/modules/dev/devenv.nix @@ -5,6 +5,7 @@ let cfg = config.samfelag.modules.dev.devenv; + i3Cfg = config.samfelag.modules.desktop.i3; in { options.samfelag.modules.dev.devenv = { @@ -19,6 +20,11 @@ in devenv = "source $HOME/.local/share/devenv/devenv.sh"; }; + # TODO: This assumes we have alacritty and a python39 devenv set up (may want to fix this at some point) + samfelag.modules.desktop.i3.extraKeybindings = lib.mkIf i3Cfg.enable { + "${i3Cfg.mod}+Shift+P" = "exec ${pkgs.alacritty}/bin/alacritty -t floating-term -e zsh -c \"direnv exec ~/sandbox/python39 ipython\""; + }; + # - Requirements ----------------------------- samfelag.modules.dev.direnv.enable = true;