summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormediocregopher <mediocregopher@gmail.com>2024-01-06 13:06:41 +0100
committermediocregopher <mediocregopher@gmail.com>2024-01-06 13:06:41 +0100
commitf083ef86f2440ecd5804b29e1711db47103c3bb8 (patch)
tree20fe08d0506b5605aa33e7820493840ad3551911
parent2c8176faa095ac9f761287c279d42318646861b7 (diff)
Simplify awesome even further, wrap startx internally
-rw-r--r--awesome/default.nix25
-rw-r--r--default.nix2
2 files changed, 12 insertions, 15 deletions
diff --git a/awesome/default.nix b/awesome/default.nix
index 5b64829..758d74c 100644
--- a/awesome/default.nix
+++ b/awesome/default.nix
@@ -11,12 +11,7 @@
name = "xorg-inner-env";
paths = [
pkgs.xorg.xorgserver
- pkgs.xorg.xinit
- pkgs.xorg.xauth
- pkgs.xorg.xset
pkgs.xorg.xf86inputlibinput
- pkgs.xorg.xrandr
- pkgs.xsel
(pkgs.runCommand "xorg-conf-inner" {} ''
mkdir -p "$out"/share/X11/xorg.conf.d/
@@ -39,12 +34,6 @@ EOF
done
'';
- startx = pkgs.writeShellScriptBin "startx-awesome" ''
- # TODO pass .xinitrc into here, somehow
- export XORGCONFIG=${xorgConf}
- exec startx
- '';
-
# nativeWrap is used for apps which are not installed via nix which don't play
# nicely with it.
nativeWrap = pkgs.writeScriptBin "native-wrap" ''
@@ -66,14 +55,15 @@ EOF
wp_dir = "${wp}/"
'';
- awesome = pkgs.writeScriptBin "awesome" ''
+ # awesomeInner is what is started up by startx, within an X session.
+ awesomeInner = pkgs.writeScript "awesome" ''
#!${pkgs.bash}/bin/bash
set -e -x
# Turn off powersaving (fuck the environment)
- xset -dpms
- xset s off
+ ${pkgs.xorg.xset}/bin/xset -dpms
+ ${pkgs.xorg.xset}/bin/xset s off
${config.awesome.startupExtra}
@@ -109,6 +99,11 @@ EOF
2>&1 2>>$this_log
'';
+ awesome = pkgs.writeShellScriptBin "awesome" ''
+ export XORGCONFIG=${xorgConf}
+ exec startx ${awesomeInner}
+ '';
+
env = pkgs.buildEnv {
name = "awesome-env";
paths = [
@@ -116,6 +111,7 @@ 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
@@ -125,7 +121,6 @@ EOF
xorgInnerEnv
nativeWrap
awesome
- startx
];
};
}
diff --git a/default.nix b/default.nix
index fb6b8a3..ca1aa5f 100644
--- a/default.nix
+++ b/default.nix
@@ -117,6 +117,8 @@ in rec {
pkgs.pavucontrol
pkgs.xdg-utils
pkgs.arandr
+ pkgs.xsel
+ pkgs.xorg.xrandr
bin
((import ./nvim) {}).nvim