nixos/users/elitherl/N0245.nix

56 lines
1.5 KiB
Nix
Raw Normal View History

{pkgs, ...}: let
laptop-state = pkgs.writeShellScriptBin "check-laptop-lid-state" ''
grep closed /proc/acpi/button/lid/LID0/state &&\
hyprctl keyword monitor "eDP-1,disable" ||\
hyprctl keyword monitor "eDP-1,preferred,auto,1.0"
'';
in {
imports = [./default.nix];
home-manager.users.elitherl = {
home.packages = with pkgs; [
zotero
openfortivpn
nomachine-client
teams-for-linux
zoom-us
laptop-state
];
wayland.windowManager.hyprland.extraConfig = ''
source=./common.conf
bindl=,switch:Lid Switch,exec,hyprctl keyword monitor "eDP-1,disable"
monitor = DP-3,preferred,auto,auto
monitor = DP-4,preferred,auto,auto,transform,1
workspace = DP-3,1
workspace = DP-3,2
workspace = DP-3,3
workspace = DP-3,4
windowrule = float, title:^([Zz]oom).*$
windowrule = center, title:^([Zz]oom).*$
windowrule = workspace 3 silent, ^(teams-for-linux)$
windowrule = workspace 3, title:^([Zz]oom).*$
windowrule = workspace 4 silent, ^(Nxplayer.bin)$
exec-once = firefox
exec-once = teams-for-linux
exec = ${laptop-state}/bin/check-laptop-lid-state
'';
programs.waybar.settings = {
main."output" = "!DP-4";
alt = {
"include" = [
"~/.config/waybar/modules.json"
"~/.config/waybar/layout.json"
];
"output" = "DP-4";
"modules-left" = ["wlr/workspaces"];
"modules-center" = ["clock#compact"];
"modules-right" = ["tray"];
};
};
};
}