nixos-config/system/starlight/scripts.nix

48 lines
1.7 KiB
Nix
Raw Normal View History

2021-08-26 18:06:46 +00:00
{ pkgs, lib, ... }:
let
swayPrelude = ''
#! ${pkgs.runtimeShell}
PATH=${pkgs.sway}/bin
'';
in
{
home-manager.users.artemis.home.packages = [
(pkgs.writeScriptBin "work" ''
${swayPrelude}
swaymsg "output DP-1 disable"
swaymsg "output DP-2 disable"
swaymsg "output HDMI-A-1 enable mode 3840x2160 scale 2 pos 0 0"
'')
(pkgs.writeScriptBin "miniwork" ''
${swayPrelude}
swaymsg "output DP-1 disable"
swaymsg "output DP-2 enable mode 3840x2160 scale 2 pos 0 0"
swaymsg "output HDMI-A-1 enable mode 3840x2160 scale 2 pos 1920 0"
'')
(pkgs.writeScriptBin "game" ''
${swayPrelude}
swaymsg "output DP-1 enable mode 3840x2160 scale 2 pos 0 0"
swaymsg "output DP-2 enable mode 3840x2160 scale 1 pos 1920 0"
swaymsg "output HDMI-A-1 enable mode 3840x2160 scale 2 pos 5760 0"
'')
(pkgs.writeScriptBin "nogame" ''
${swayPrelude}
swaymsg "output DP-1 enable mode 3840x2160 scale 2 pos 0 0"
swaymsg "output DP-2 enable mode 3840x2160 scale 2 pos 1920 0"
swaymsg "output HDMI-A-1 enable mode 3840x2160 scale 2 pos 3840 0"
'')
2022-11-06 04:48:36 +00:00
(pkgs.writeScriptBin "swap" ''
${swayPrelude}
swaymsg "output DP-1 enable mode 3840x2160 scale 2 pos 1920 0"
swaymsg "output DP-2 enable mode 3840x2160 scale 2 pos 0 0"
swaymsg "output HDMI-A-1 enable mode 3840x2160 scale 2 pos 3840 0"
'')
(pkgs.writeScriptBin "swapgame" ''
${swayPrelude}
swaymsg "output DP-1 enable mode 3840x2160 scale 1 pos 0 0"
swaymsg "output DP-2 enable mode 3840x2160 scale 2 pos 3840 0"
swaymsg "output HDMI-A-1 enable mode 3840x2160 scale 2 pos 5760 0"
'')
2021-08-26 18:06:46 +00:00
];
}