nixos/users/elitherl/Ronin.nix
Evie Litherland-Smith af10a9346e Make hyprland workspaces more program focused
Change bindings and name convention to decouple workspaces from ID
number and focus more on what the workspace is used for
TODO proper window rules
2023-06-28 16:20:02 +01:00

43 lines
1.4 KiB
Nix

{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,1920x1080,0x0,1.0"
'';
in {
imports = [./default.nix];
home-manager.users.elitherl = {
home.packages = [laptop-state];
wayland.windowManager.hyprland.extraConfig = ''
source=./common.conf
bindl=,switch:Lid Switch,exec,check-laptop-lid-state
exec = ${laptop-state}/bin/check-laptop-lid-state
monitor = DP-3,1920x1200,1920x0,1.0
monitor = DP-4,1920x1080,3840x0,1.0,transform,1
workspace = name:remote
bind = ALT, R, moveworkspacetomonitor, remote current
bind = ALT, R, workspace, remote
bind = ALT SHIFT, R, moveworkspacetomonitor, remote current
bind = ALT SHIFT, R, movetoworkspace, remote
'';
programs.waybar.settings = {
main = {
"output" = "!DP-4";
"wlr/workspaces"."format-icons"."remote" = "󰢹";
};
alt = {
"include" = [
"~/.config/waybar/modules.json"
"~/.config/waybar/layout.json"
];
"output" = "DP-4";
"wlr/workspaces"."format-icons"."remote" = "󰢹";
"modules-left" = [];
"modules-center" = ["wlr/workspaces"];
"modules-right" = [];
};
};
};
}