From c13d39843c289f4c3f892770a94c0656d7c5e77f Mon Sep 17 00:00:00 2001 From: iiogama Date: Mon, 15 Jan 2024 08:42:05 -0800 Subject: [PATCH] Switched from way-displays to kanshi, seems to work much better. --- home-manager/dots/river.nix | 2 +- home-manager/dots/way-displays.nix | 89 ------------------------------ home-manager/wayland.nix | 19 +++++++ nixos/wayland.nix | 2 +- 4 files changed, 21 insertions(+), 91 deletions(-) delete mode 100644 home-manager/dots/way-displays.nix diff --git a/home-manager/dots/river.nix b/home-manager/dots/river.nix index e490cf3..77c42af 100644 --- a/home-manager/dots/river.nix +++ b/home-manager/dots/river.nix @@ -15,7 +15,7 @@ LOCKSCREEN="swaylock" # Autostart - riverctl spawn "way-displays -c $HOME/.config/way-displays/cfg.yaml" + riverctl spawn "kanshi" riverctl spawn "wallpaper.sh -r" riverctl spawn "wl-paste --type text --watch cliphist store" riverctl spawn "wl-paste --type image --watch cliphist store" diff --git a/home-manager/dots/way-displays.nix b/home-manager/dots/way-displays.nix deleted file mode 100644 index 16ffb1b..0000000 --- a/home-manager/dots/way-displays.nix +++ /dev/null @@ -1,89 +0,0 @@ -{ pkgs, config, ... }: -{ - xdg.configFile = { - "way-displays/cfg.yml" = { - enable = true; - text = '' - # Default cfg.yaml for way-displays. - # Copy this to ~/.config/way-displays/cfg.yaml and edit it to your liking. - # - # See https://github.com/alex-courtis/way-displays/blob/master/doc/CONFIGURATION.md - - - # Arrange displays in a ROW (default, left to right) or a COLUMN (top to bottom) - ARRANGE: ROW - - # Align ROWs at the TOP (default), MIDDLE or BOTTOM - # Align COLUMNs at the LEFT (default), MIDDLE or RIGHT - ALIGN: TOP - - - # The default ORDER is simply the order in which the displays are discovered. - # Define your own. - ORDER: - - 'DP-1' - - 'DP-2' - - - # Enable scaling, overrides AUTO_SCALE and SCALE - SCALING: TRUE - - # The default is to scale each display by DPI. - # This may be disabled and scale 1 will be used, unless a SCALE has been specified. - AUTO_SCALE: TRUE - - - # Auto scale may be overridden for each display. - SCALE: - #- NAME_DESC: 'monitor description' - # SCALE: 1.75 - - # Override the preferred mode. - # WARNING: this may result in an unusable display. See https://github.com/alex-courtis/way-displays#known-issues-with-workarounds - # for a possible workaround. - MODE: - # Resolution and refresh - #- NAME_DESC: HDMI-A-1 - # WIDTH: 1920 - # HEIGHT: 1080 - # HZ: 60 - - # Resolution with highest refresh - #- NAME_DESC: 'monitor description' - # WIDTH: 2560 - # HEIGHT: 1440 - - # Highest available - - NAME_DESC: DP-1 - MAX: TRUE - - NAME_DESC: DP-2 - MAX: TRUE - - # Rotate or translate the display. - # 90, 180, 270, FLIPPED, FLIPPED-90, FLIPPED-180, FLIPPED-270 - TRANSFORM: - # - NAME_DESC: 'monitor description' - # TRANSFORM: 270 - - # VRR / adaptive sync is enabled by default. Disable it per display. - VRR_OFF: - # - DP-2 - # - '!.*my monitor.*' - - - # Laptop displays usually start with eDP e.g. eDP-1. This may be overridden if - # your laptop is different. - #LAPTOP_DISPLAY_PREFIX: 'eDP' - - - # One of: ERROR, WARNING, INFO (default), DEBUG - LOG_THRESHOLD: INFO - - - # Disable the specified displays. - DISABLED: - #- "eDP-1" - ''; - }; - }; -} diff --git a/home-manager/wayland.nix b/home-manager/wayland.nix index f8a684d..66f6b90 100644 --- a/home-manager/wayland.nix +++ b/home-manager/wayland.nix @@ -15,4 +15,23 @@ # themes can be found here: https://github.com/tinted-theming/base16-schemes colorScheme = inputs.nix-colors.colorSchemes.dracula; gtkNix.enable = true; + services.kanshi = { + enable = true; + profiles = { + default = { + outputs = [ + { + criteria = "DP-1"; + position = "0,0"; + mode = "2560x1440@164.99Hz"; + } + { + criteria = "DP-2"; + position = "2560,0"; + mode = "2560x1440@164.99Hz"; + } + ]; + }; + }; + }; } diff --git a/nixos/wayland.nix b/nixos/wayland.nix index 6908b22..cac2482 100644 --- a/nixos/wayland.nix +++ b/nixos/wayland.nix @@ -32,13 +32,13 @@ grim foot imv + kanshi mako slurp swappy swaylock swww tessen - way-displays wf-recorder wl-clipboard wtype