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}
|
2023-01-23 19:42:09 +00:00
|
|
|
swaymsg "output DP-1 enable mode 3840x2160 scale 2 pos 0 0"
|
2021-08-26 18:06:46 +00:00
|
|
|
swaymsg "output DP-2 disable"
|
2023-01-23 19:42:09 +00:00
|
|
|
swaymsg "output DP-3 disable"
|
2021-08-26 18:06:46 +00:00
|
|
|
'')
|
|
|
|
(pkgs.writeScriptBin "miniwork" ''
|
|
|
|
${swayPrelude}
|
2023-01-23 19:42:09 +00:00
|
|
|
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 DP-3 disable"
|
2021-08-26 18:06:46 +00:00
|
|
|
'')
|
|
|
|
(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"
|
2023-01-20 20:40:32 +00:00
|
|
|
swaymsg "output DP-3 enable mode 3840x2160 scale 2 pos 5760 0"
|
2021-08-26 18:06:46 +00:00
|
|
|
'')
|
|
|
|
(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"
|
2023-01-20 20:40:32 +00:00
|
|
|
swaymsg "output DP-3 enable mode 3840x2160 scale 2 pos 3840 0"
|
2021-08-26 18:06:46 +00:00
|
|
|
'')
|
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"
|
2023-01-20 20:40:32 +00:00
|
|
|
swaymsg "output DP-3 enable mode 3840x2160 scale 2 pos 3840 0"
|
2022-11-06 04:48:36 +00:00
|
|
|
'')
|
|
|
|
(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"
|
2023-01-20 20:40:32 +00:00
|
|
|
swaymsg "output DP-3 enable mode 3840x2160 scale 2 pos 5760 0"
|
2022-11-06 04:48:36 +00:00
|
|
|
'')
|
2021-08-26 18:06:46 +00:00
|
|
|
];
|
|
|
|
}
|