add terminal and file picker
This commit is contained in:
parent
adffeee6fe
commit
48f05e119a
|
@ -37,6 +37,7 @@
|
|||
bmenu = import ./bmenu.nix { inherit config pkgs lib; };
|
||||
_diffr = import ./diffr.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
23
terminal.nix
Normal 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"
|
||||
''
|
|
@ -28,6 +28,7 @@ in {
|
|||
programs.home-manager.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
alacritty
|
||||
terminal # see flake.nix
|
||||
exa
|
||||
fd
|
||||
_diffr
|
||||
|
|
|
@ -121,7 +121,10 @@ in {
|
|||
}));
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
pkgs.unstable.helix
|
||||
kakoune
|
||||
terminal
|
||||
ranger
|
||||
bmenu
|
||||
];
|
||||
home.sessionVariables = {
|
||||
EDITOR = "kak";
|
||||
|
|
|
@ -91,7 +91,13 @@ in {
|
|||
"s" = "exec ${pulse_sink}/bin/pulse_sink";
|
||||
};
|
||||
};
|
||||
floating.modifier = "Mod4";
|
||||
floating = {
|
||||
modifier = "Mod4";
|
||||
criteria = [
|
||||
{ class = "file_picker"; }
|
||||
{ app_id = "file_picker"; }
|
||||
];
|
||||
};
|
||||
keybindings = let
|
||||
mod = "Mod4";
|
||||
menu = "${pkgs.bmenu}/bin/bmenu run";
|
||||
|
|
Loading…
Reference in a new issue