Skip to content

Commit

Permalink
fix external monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
number5 committed Nov 12, 2024
1 parent 15dc55b commit 006cac7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions home/modules/wayland/hyprland/scripts.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{ lib, writeShellScriptBin }:

let
intMonitor = "eDP-1";
extMonitor = "DP-3";
intMonitor = "DP-1";
extMonitor = "DP-2";

monitorsConf = "$XDG_CONFIG_HOME/hypr/monitors.conf";

Expand All @@ -19,13 +19,13 @@ let

monitorConnected = writeShellScriptBin "monitor-connected" ''
hyprctl dispatch dpms off ${intMonitor}
echo "monitor=${extMonitor},[email protected],0x0,1" > ${monitorsConf}
echo "monitor=${intMonitor},disable" >> ${monitorsConf}
echo "monitor=${extMonitor},highres@50,0x0,1" > ${monitorsConf}
echo "monitor=${intMonitor},preferred,auto-right,1" >> ${monitorsConf}
'';

monitorRemoved = writeShellScriptBin "monitor-removed" ''
hyprctl dispatch dpms on ${intMonitor}
echo "monitor=${intMonitor},2880x1800@90,0x0,2" > ${monitorsConf}
echo "monitor=${intMonitor},preferred,0x0,1" > ${monitorsConf}
'';
in
{
Expand Down

0 comments on commit 006cac7

Please sign in to comment.