From 638cc1dc8fd4ded30f7d7448f2d30e5ca9fc8107 Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Sat, 10 Aug 2024 12:47:47 +0200 Subject: Use native xorg --- awesome/default.nix | 46 ++-------------------------------------------- awesome/xorg.conf | 4 ++++ 2 files changed, 6 insertions(+), 44 deletions(-) (limited to 'awesome') diff --git a/awesome/default.nix b/awesome/default.nix index bc2b34b..409b6e0 100644 --- a/awesome/default.nix +++ b/awesome/default.nix @@ -6,34 +6,6 @@ pkgs = (import ../pkgs.nix).stable {}; - xorgInnerEnv = pkgs.buildEnv { - name = "xorg-inner-env"; - paths = [ - pkgs.xorg.xorgserver - - (pkgs.runCommand "xorg-conf-inner" {} '' - mkdir -p "$out"/share/X11/xorg.conf.d/ - cp ${./xorg.conf} "$out"/share/X11/xorg.conf.d/99-loadout.conf - '') - ] ++ ( - config.awesome.xorgInputDrivers pkgs - ); - }; - - xorgConf = pkgs.runCommand "xorg-conf" {} '' - cat >>"$out" <> "$out" - done - ''; - # nativeWrap is used for apps which are not installed via nix which don't play # nicely with it. nativeWrap = pkgs.writeScriptBin "native-wrap" '' @@ -47,9 +19,11 @@ EOF ''; wp = ../wallpapers; + startupAppsLua = builtins.toString ( builtins.map (a: ''"${a}",'') config.awesome.startupApps ); + configLua = pkgs.writeTextDir "config.lua" '' home_dir = os.getenv("HOME").."/" bin_dir = "${./bin}/" @@ -68,10 +42,6 @@ EOF # everything downstream. unset LD_LIBRARY_PATH - # Turn off powersaving (fuck the environment) - ${pkgs.xorg.xset}/bin/xset -dpms - ${pkgs.xorg.xset}/bin/xset s off - # HACK: This sleep is here because phwmon actually creates a separate tray # icon for each thing it monitors, and if the process runs at the same time # as another process which creates a tray icon they can get interleaved. @@ -106,16 +76,6 @@ EOF ''; awesome = pkgs.writeShellScriptBin "awesome" '' - set -x - export XORGCONFIG=${xorgConf} - - # set the LD_LIBRARY_PATH to search both the libraries needed by X, but also - # those on the host, so that the video driver has access to them if it needs - # it. - #source "${pkgs.ldUtils}" - #x_ld_lib_path="$(bin_ld_lib_path "${pkgs.xorg.xinit}/bin/xinit")" - #export LD_LIBRARY_PATH="$x_ld_lib_path":"$(host_ld_lib_path)" - exec startx ${awesomeInner} ''; @@ -126,7 +86,6 @@ EOF # We only include utilities in here which are directly used by awesome. # General purpose applications go in the root default.nix env. - pkgs.xorg.xinit pkgs.scrot pkgs.feh pkgs.brightnessctl @@ -134,7 +93,6 @@ EOF #pkgs.phwmon # https://github.com/NixOS/nixpkgs/issues/75478 - xorgInnerEnv nativeWrap awesome ]; diff --git a/awesome/xorg.conf b/awesome/xorg.conf index 04f72e6..7be1175 100644 --- a/awesome/xorg.conf +++ b/awesome/xorg.conf @@ -4,3 +4,7 @@ Section "InputClass" Option "XkbLayout" "us" Option "XkbOptions" "caps:swapescape" EndSection + +Section "Extensions" + Option "DPMS" "false" +EndSection -- cgit v1.2.3