From 6dca1f723afe22c7016c0576fa180cac9d8661fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sat, 18 Apr 2020 17:14:53 +0100 Subject: [PATCH] add grobi --- nixos/i3/grobi.nix | 31 +++++++++++++++++++++++++++++++ nixos/i3/home.nix | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 nixos/i3/grobi.nix diff --git a/nixos/i3/grobi.nix b/nixos/i3/grobi.nix new file mode 100644 index 00000000..288371d4 --- /dev/null +++ b/nixos/i3/grobi.nix @@ -0,0 +1,31 @@ +{ config, pkgs, ... }: +{ + + home.packages = with pkgs; [ grobi ]; + services.grobi = { + enable = true; + executeAfter = [ + "systemctl --user restart picom" + "i3-msg restart" + "systemctl --user restart kdeconnect-indicator.service kdeconnect.service network-manager-applet.service pasystray.service" + ]; + rules = [ + { + name = "foureighty-docked"; + outputs_connected = [ "eDP1" "DP1" ]; + configure_single = "DP1"; + execute_after = [ + "${pkgs.xorg.xrandr}/bin/xrandr --dpi 192" + ]; + } + { + name = "foureighty"; + outputs_connected = [ "eDP1" ]; + configure_single = "eDP1"; + execute_after = [ + "${pkgs.xorg.xrandr}/bin/xrandr --dpi 144" + ]; + } + ]; + }; +} diff --git a/nixos/i3/home.nix b/nixos/i3/home.nix index 7da32cf2..d6097931 100644 --- a/nixos/i3/home.nix +++ b/nixos/i3/home.nix @@ -1,9 +1,9 @@ { config, pkgs, ... }: { imports = [ + ./grobi.nix ./i3.nix ./dunst.nix - ./autorandr.nix ./rofi.nix ];