From fa1d470453c7075b303b31d241816eed15536f23 Mon Sep 17 00:00:00 2001 From: Bruce Wang Date: Tue, 19 Nov 2024 03:41:00 +1100 Subject: [PATCH] way-displays config --- home/modules/way-displays/cfg.yaml | 20 +++++++++ home/modules/wayland/hyprland/hyprland.conf | 4 -- home/modules/wayland/hyprland/scripts.nix | 47 --------------------- 3 files changed, 20 insertions(+), 51 deletions(-) create mode 100644 home/modules/way-displays/cfg.yaml delete mode 100644 home/modules/wayland/hyprland/scripts.nix diff --git a/home/modules/way-displays/cfg.yaml b/home/modules/way-displays/cfg.yaml new file mode 100644 index 0000000..10f69f2 --- /dev/null +++ b/home/modules/way-displays/cfg.yaml @@ -0,0 +1,20 @@ +ARRANGE: ROW +ALIGN: TOP +SCALING: TRUE +AUTO_SCALE: TRUE +AUTO_SCALE_MIN: 1 +AUTO_SCALE_MAX: -1 + +ORDER: + - 'M27U' + - "eDP-1" + +MODE: + - NAME_DESC: "M27U" + WIDTH: 3840 + HEIGHT: 2160 + HZ: 144 + +SCALE: + - NAME_DESC: "M27U" + SCALE: 1.625 diff --git a/home/modules/wayland/hyprland/hyprland.conf b/home/modules/wayland/hyprland/hyprland.conf index 4bd3ab2..4d65495 100644 --- a/home/modules/wayland/hyprland/hyprland.conf +++ b/home/modules/wayland/hyprland/hyprland.conf @@ -1,5 +1,3 @@ -# similar approach to nwg-displays but listening to hyprland events via hyprland-monitor-attached -source = ~/.config/hypr/monitors.conf input { kb_layout=us @@ -48,8 +46,6 @@ decoration { blur { enabled=true } - drop_shadow=0 - shadow_range=60 col.shadow=0x66000000 fullscreen_opacity=1.0 active_opacity=1.0 diff --git a/home/modules/wayland/hyprland/scripts.nix b/home/modules/wayland/hyprland/scripts.nix deleted file mode 100644 index 677562d..0000000 --- a/home/modules/wayland/hyprland/scripts.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ lib, writeShellScriptBin }: - -let - intMonitor = "eDP-1"; - extMonitor = "model:M27U"; - - monitorsConf = "$XDG_CONFIG_HOME/hypr/monitors.conf"; - - monitorAdded = writeShellScriptBin "monitor-added" '' - hyprctl --batch "\ - dispatch moveworkspacetomonitor 1 ${extMonitor};\ - dispatch moveworkspacetomonitor 2 ${extMonitor};\ - dispatch moveworkspacetomonitor 3 ${extMonitor};\ - dispatch moveworkspacetomonitor 4 ${extMonitor};\ - dispatch moveworkspacetomonitor 5 ${extMonitor};\ - dispatch moveworkspacetomonitor 6 ${extMonitor}" - ${lib.getExe monitorConnected} - ''; - - monitorConnected = writeShellScriptBin "monitor-connected" '' - hyprctl dispatch dpms off ${intMonitor} - 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},preferred,0x0,1" > ${monitorsConf} - ''; -in -{ - inherit extMonitor monitorAdded monitorRemoved; - - wsNix = writeShellScriptBin "ws-nix" '' - footclient -D ~/workspace/nix-config -E fish -C 'hyfetch' & - footclient -D ~/workspace/nix-config -E fish -C 'nitch' & - ''; - - monitorInit = writeShellScriptBin "monitor-init" '' - monitors=$(hyprctl monitors) - if [[ $monitors == *"${extMonitor}"* ]]; then - ${lib.getExe monitorConnected} - else - ${lib.getExe monitorRemoved} - fi - ''; -}