add terminal and file picker

This commit is contained in:
Leonardo Eugênio 2022-08-06 11:10:31 -03:00
parent adffeee6fe
commit 48f05e119a
5 changed files with 36 additions and 2 deletions

View file

@ -37,6 +37,7 @@
bmenu = import ./bmenu.nix { inherit config pkgs lib; }; bmenu = import ./bmenu.nix { inherit config pkgs lib; };
_diffr = import ./diffr.nix { inherit config pkgs lib; }; _diffr = import ./diffr.nix { inherit config pkgs lib; };
kak-pager = import ./kak-pager.nix { inherit config pkgs lib; }; kak-pager = import ./kak-pager.nix { inherit config pkgs lib; };
terminal = import ./terminal.nix { inherit config pkgs lib; };
}) })
]; ];
}) })

23
terminal.nix Normal file
View file

@ -0,0 +1,23 @@
{ config, pkgs, lib, ... }:
pkgs.writeScriptBin "terminal" ''
#!/bin/sh
CLASS="terminal"
while test $# -gt 0;do
case $1 in
-c|--class)
shift
CLASS=$1
shift
;;
*)
break
;;
esac
done
test $# -gt 0 &&
exec alacritty --class "$CLASS" -e $@ ||
exec alacritty --class "$CLASS"
''

View file

@ -28,6 +28,7 @@ in {
programs.home-manager.enable = true; programs.home-manager.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
alacritty alacritty
terminal # see flake.nix
exa exa
fd fd
_diffr _diffr

View file

@ -121,7 +121,10 @@ in {
})); }));
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
pkgs.unstable.helix kakoune
terminal
ranger
bmenu
]; ];
home.sessionVariables = { home.sessionVariables = {
EDITOR = "kak"; EDITOR = "kak";

View file

@ -91,7 +91,13 @@ in {
"s" = "exec ${pulse_sink}/bin/pulse_sink"; "s" = "exec ${pulse_sink}/bin/pulse_sink";
}; };
}; };
floating.modifier = "Mod4"; floating = {
modifier = "Mod4";
criteria = [
{ class = "file_picker"; }
{ app_id = "file_picker"; }
];
};
keybindings = let keybindings = let
mod = "Mod4"; mod = "Mod4";
menu = "${pkgs.bmenu}/bin/bmenu run"; menu = "${pkgs.bmenu}/bin/bmenu run";