diff options
author | tv <tv@krebsco.de> | 2025-06-05 17:58:16 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2025-06-05 18:00:34 +0200 |
commit | 467fdc2bdd95bbb977c9b30efbe06f006e363c31 (patch) | |
tree | 69866c1467ffc0d383b18cdafc05b126c9502f19 | |
parent | 5650362c7d14412eb5b71bd63078fdec79440654 (diff) |
-rw-r--r-- | configs/hw/AO753.nix | 3 | ||||
-rw-r--r-- | configs/hw/winmax2.nix | 3 | ||||
-rw-r--r-- | configs/hw/x220.nix | 3 | ||||
-rw-r--r-- | configs/xserver/default.nix | 2 | ||||
-rw-r--r-- | modules/hw.nix | 15 | ||||
-rw-r--r-- | pkgs/haskell/xmonad-tv/src/main.hs | 3 |
6 files changed, 2 insertions, 27 deletions
diff --git a/configs/hw/AO753.nix b/configs/hw/AO753.nix index ea58c01..5e91564 100644 --- a/configs/hw/AO753.nix +++ b/configs/hw/AO753.nix @@ -41,7 +41,4 @@ ''; krebs.nixpkgs.allowUnfreePredicate = pkg: packageName pkg == "broadcom-sta"; - - tv.hw.screens.primary.width = 1366; - tv.hw.screens.primary.height = 768; } diff --git a/configs/hw/winmax2.nix b/configs/hw/winmax2.nix index 4bcd6f1..8af5511 100644 --- a/configs/hw/winmax2.nix +++ b/configs/hw/winmax2.nix @@ -41,7 +41,4 @@ ''; tv.lidControl.enable = true; - - tv.hw.screens.primary.width = 2560; - tv.hw.screens.primary.height = 1600; } diff --git a/configs/hw/x220.nix b/configs/hw/x220.nix index 352040d..323be01 100644 --- a/configs/hw/x220.nix +++ b/configs/hw/x220.nix @@ -83,7 +83,4 @@ services.xserver = { videoDriver = "intel"; }; - - tv.hw.screens.primary.width = lib.mkDefault 1366; - tv.hw.screens.primary.height = lib.mkDefault 768; } diff --git a/configs/xserver/default.nix b/configs/xserver/default.nix index 884a982..88c1afb 100644 --- a/configs/xserver/default.nix +++ b/configs/xserver/default.nix @@ -6,13 +6,11 @@ user = config.krebs.build.user; xmonad.pkg = pkgs.haskellPackages.xmonad-tv.overrideAttrs (_: { au = { - XMONAD_BUILD_SCREEN_WIDTH = 1920; XMONAD_BUILD_TERM_FONT_WIDTH = 10; XMONAD_BUILD_TERM_FONT = "xft:Input Mono:size=12:style=Regular"; XMONAD_BUILD_TERM_PADDING = 2; }; }.${config.krebs.build.host.name} or { - XMONAD_BUILD_SCREEN_WIDTH = 1366; XMONAD_BUILD_TERM_FONT_WIDTH = 6; XMONAD_BUILD_TERM_FONT = "-*-clean-*-*-*-*-*-*-*-*-*-*-iso10646-1"; XMONAD_BUILD_TERM_PADDING = 2; diff --git a/modules/hw.nix b/modules/hw.nix deleted file mode 100644 index 653b04f..0000000 --- a/modules/hw.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ lib, mylib, ... }: let - local.types.screen = lib.types.submodule { - options.width = lib.mkOption { - type = mylib.types.uint; - }; - options.height = lib.mkOption { - type = mylib.types.uint; - }; - }; -in { - options.tv.hw.screens = lib.mkOption { - type = lib.types.attrsOf local.types.screen; - default = {}; - }; -} diff --git a/pkgs/haskell/xmonad-tv/src/main.hs b/pkgs/haskell/xmonad-tv/src/main.hs index c843a2c..711f9eb 100644 --- a/pkgs/haskell/xmonad-tv/src/main.hs +++ b/pkgs/haskell/xmonad-tv/src/main.hs @@ -73,7 +73,8 @@ mainNoArgs = do myMasterDelta <- readEnv' (1 / 20) "XMONAD_MASTER_DELTA" :: IO Rational myMasterWidth <- readEnv' (1 / 2) "XMONAD_MASTER_WIDTH" :: IO Rational myScreenGaps <- readEnv' [] "XMONAD_SCREEN_GAPS" :: IO [Int] - myScreenWidth <- readEnv "XMONAD_SCREEN_WIDTH" :: IO Dimension + myScreenWidth <- + bracket (getEnv "DISPLAY" >>= openDisplay) closeDisplay (return . widthOfScreen . defaultScreenOfDisplay) handleShutdownEvent <- newShutdownEventHandler config <- ewmhExtra |