mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 08:39:42 -04:00
added hyprland wm module
This commit is contained in:
parent
89ea429204
commit
50482446d4
17 changed files with 741 additions and 46 deletions
|
|
@ -1,9 +1,17 @@
|
|||
{ lib, ... }:
|
||||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
gui = config.modules.user.gui.wm;
|
||||
wm = {
|
||||
enable = builtins.any (mod: mod.enable or false) (builtins.attrValues gui);
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
cd = "cd -L";
|
||||
grep = "grep --color";
|
||||
tree = "eza --tree --icons=never";
|
||||
lt = mkForce "eza --tree --icons=never";
|
||||
open = mkIf wm.enable "xdg-open";
|
||||
}
|
||||
|
|
|
|||
37
src/user/modules/bash/config/shellHook.nix
Normal file
37
src/user/modules/bash/config/shellHook.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
tmux = config.modules.user.tmux;
|
||||
gui = config.modules.user.gui.wm;
|
||||
sway = config.modules.user.gui.wm.sway;
|
||||
hyprland = config.modules.user.gui.wm.hyprland;
|
||||
|
||||
wm = {
|
||||
enable = builtins.any (mod: mod.enable or false) (builtins.attrValues gui);
|
||||
};
|
||||
|
||||
in
|
||||
''
|
||||
case $- in
|
||||
*i*)
|
||||
${optionalString wm.enable ''
|
||||
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||
${optionalString sway.enable ''
|
||||
exec sway
|
||||
''
|
||||
}
|
||||
${optionalString hyprland.enable ''
|
||||
exec Hyprland
|
||||
''
|
||||
}
|
||||
fi
|
||||
''}
|
||||
${optionalString tmux.enable ''
|
||||
if [ -z "$DISPLAY" ] && [ -z "$TMUX" ]; then
|
||||
exec tmux
|
||||
fi
|
||||
''}
|
||||
;;
|
||||
esac
|
||||
''
|
||||
|
|
@ -13,7 +13,8 @@ in
|
|||
|
||||
initExtra = import ./config/prompt.nix { inherit lib config; };
|
||||
bashrcExtra = import ./config/bashrc.nix;
|
||||
shellAliases = import ./config/alias.nix { inherit lib; };
|
||||
shellAliases = import ./config/alias.nix { inherit lib config; };
|
||||
profileExtra = import ./config/shellHook.nix { inherit lib config; };
|
||||
};
|
||||
|
||||
programs = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue