i3: Remove machine-specific configuration

This commit is contained in:
Erwin Boskma 2023-05-21 17:17:05 +02:00
parent 5f3f8065fe
commit f32c4e1ac0
Signed by: erwin
SSH key fingerprint: SHA256:9LmFDe1C6jSrEyqxxvX8NtJBmcbB105XoqyUZF092bg

View file

@ -16,30 +16,17 @@ with lib; let
workspacePartition =
builtins.partition (n: (trivial.mod n 2) != 0) (lists.range 1 10);
installSessionScript = pkgs.writeShellScriptBin "install-session" ''
sudo ln -fs ${pkgs.i3-gaps}/share/xsessions/i3.desktop /usr/share/xsessions/i3.desktop
sudo ln -fs ${pkgs.i3-gaps}/share/xsessions/i3-with-shmlog.desktop /usr/share/xsessions/i3-with-shmlog.desktop
'';
remoteSessionScript = pkgs.writeShellScriptBin "remote-session" ''
${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --mode 2560x1440
${pkgs.xorg.xrandr}/bin/xrandr --output DP-4 --mode 2560x1440 --right-of DP-0
${pkgs.nitrogen}/bin/nitrogen --head=0 --set-auto ${toString ./wallpapers/jwst-carina-cosmic-cliffs-nircam-2560.png}
${pkgs.nitrogen}/bin/nitrogen --head=1 --set-auto ${toString ./wallpapers/jwst-southern-ring-nircam-miri-side-by-side-2560.png}
systemctl --user restart polybar
'';
localSessionScript = pkgs.writeShellScriptBin "local-session" ''
${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --mode 3840x2160
${pkgs.xorg.xrandr}/bin/xrandr --output DP-4 --mode 3840x2160 --right-of DP-0
${pkgs.nitrogen}/bin/nitrogen --head=0 --set-auto ${toString ./wallpapers/jwst-carina-cosmic-cliffs-nircam-3840.png}
${pkgs.nitrogen}/bin/nitrogen --head=1 --set-auto ${toString ./wallpapers/jwst-southern-ring-nircam-miri-side-by-side-3840.png}
systemctl --user restart polybar
'';
menu = "${pkgs.rofi}/bin/rofi -show drun -no-lazy-grab";
in
{
options.eboskma.programs.i3.enable = mkEnableOption "Enable i3";
options.eboskma.programs.i3 = {
enable = mkEnableOption "Enable i3";
startupCommands = mkOption {
description = "Commands to run at startup";
type = types.listOf types.attrs;
default = [ ];
};
};
config = mkIf cfg.enable {
xsession = {
@ -241,46 +228,11 @@ in
command = "/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1";
notification = false;
}
# {
# command = "/home/erwin/.config/polybar/launch.sh --shades";
# notification = false;
# always = true;
# }
{
command = "${pkgs.networkmanagerapplet}/bin/nm-applet";
notification = false;
}
# {
# command = ''${pkgs.xorg.xinput}/bin/xinput set-int-prop "Logitech USB Laser Mouse" "libinput Natural Scrolling Enabled" 8 1'';
# notification = false;
# always = true;
# }
# {
# command = ''${pkgs.xorg.xinput}/bin/xinput set-float-prop "Logitech USB Laser Mouse" "libinput Accel Speed" 1'';
# notification = false;
# always = true;
# }
{
command = "${pkgs.xorg.xrandr}/bin/xrandr --output DP-0 --primary --left-of DP-4";
notification = false;
}
# {
# command = "${pkgs.nitrogen}/bin/nitrogen --restore";
# notification = false;
# }
# {
# command = "${pkgs.tdesktop}/bin/telegram-desktop";
# notification = false;
# }
{
command = "${pkgs.xorg.xset}/bin/xset +dpms dpms 900 1200 1500";
notification = false;
}
{
command = "${pkgs.dropbox}/bin/dropbox start";
notification = false;
}
];
] ++ cfg.startupCommands;
};
extraConfig = ''
'';
@ -300,9 +252,6 @@ in
packages = with pkgs; [
dunst
installSessionScript
localSessionScript
remoteSessionScript
];
};
};