summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/xmonad.hs9
-rw-r--r--profiles/laptop.nix16
2 files changed, 12 insertions, 13 deletions
diff --git a/lib/xmonad.hs b/lib/xmonad.hs
index bb182fd..2fbd6d0 100644
--- a/lib/xmonad.hs
+++ b/lib/xmonad.hs
@@ -78,14 +78,9 @@ insKeys conf@(XConfig {modMask = modMask}) =
((modMask, xK_o), spawn "rofi -sidebar-mode -show run"),
((modMask, xK_n), spawn "rofi -sidebar-mode -show window"),
- -- restart xmonad and display stuff via home-manager
+ -- refresh display via autorandr
( (modMask, xK_r),
- spawn $
- intercalate
- " && "
- [ "xlayoutdisplay",
- "uctl restart polybar"
- ]
+ spawn $ "autorandr --cycle"
),
-- lock it up
diff --git a/profiles/laptop.nix b/profiles/laptop.nix
index 733deca..e01500c 100644
--- a/profiles/laptop.nix
+++ b/profiles/laptop.nix
@@ -22,22 +22,26 @@
programs.autorandr.hooks.postswitch = {
"restart-polybar" = "systemctl --user restart polybar.service";
};
- programs.autorandr.profiles = {
- # get fingerprints with `autorandr --fingerprint`
- docked = {
- fingerprint.HDMI-2 = "00ffffffffffff0006b3ba28c0f40300151f0103803e22782ab4a5ad4f449e250f50542308008140818081c081009500b300d1c001014dd000a0f0703e80303035006d552100001a565e00a0a0a02950302035006d552100001e000000fd00283c1ea03c000a202020202020000000fc00415355532056473238390a20200159020359f159010304121305141f100706025d5e5f60610e0f15161d1e20482309070783010000e200d56d030c001200383c20006001020367d85dc401788003681a00000101283ee6e305c301e50f00800100e6060701565500023a801871382d40582c45006d552100001e000000000000000000000000000000000000000071";
+
+ programs.autorandr.profiles = let
+ docked = rotate: {
+ fingerprint.HDMI-2 = "00ffffffffffff0006b3ba28c0f40300151f0103803e22782ab4a5ad4f449e250f50542308008140818081c081009500b300d1c001014dd000a0f0703e80303035006d552100001a565e00a0a0a02950302035006d552100001e000000fd00283c1ea03c000a202020202020000000fc00415355532056473238390a20200159020359f159010304121305141f100706025d5e5f60610e0f15161d1e20482309070783010000e200d56d030c002000383c20006001020367d85dc401788003681a00000101283ee6e305c301e50f00800100e6060701565500023a801871382d40582c45006d552100001e000000000000000000000000000000000000000063";
config = {
eDP-1.enable = false;
HDMI-2 = {
enable = true;
primary = true;
position = "0x0";
- mode = "2160x3840";
+ mode = "3840x2160";
rate = "30.00";
- rotate = "right";
+ inherit rotate;
};
};
};
+ in {
+ # get fingerprints with `autorandr --fingerprint`
+ #docked-portrait = docked "right";
+ docked-landscape = docked "normal";
laptop = {
fingerprint.eDP-1 = "00ffffffffffff000daea814000000002c170104951f11780237459e55539229125054000000010101010101010101010101010101015e358096703814402c1c240034ad10000018000000fe004e3134304847452d4541310a20000000fe00434d4e0a202020202020202020000000fe004e3134304847452d4541310a20001f";
config = {