summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--awesome/default.nix9
-rw-r--r--awesome/rc.lua14
-rw-r--r--config/default.nix1
3 files changed, 20 insertions, 4 deletions
diff --git a/awesome/default.nix b/awesome/default.nix
index 3c47017..5baaf95 100644
--- a/awesome/default.nix
+++ b/awesome/default.nix
@@ -48,12 +48,15 @@ EOF
'';
wp = ../wallpapers;
-
- dirsLua = pkgs.writeTextDir "dirs.lua" ''
+ startupAppsLua = builtins.toString (
+ builtins.map (a: ''"${a}",'') config.awesome.startupApps
+ );
+ configLua = pkgs.writeTextDir "config.lua" ''
home_dir = os.getenv("HOME").."/"
bin_dir = "${./bin}/"
share_dir = "${./share}/"
wp_dir = "${wp}/"
+ startupApps = { ${startupAppsLua} }
'';
# awesomeInner is what is started up by startx, within an X session.
@@ -94,7 +97,7 @@ EOF
exec ${pkgs.awesome}/bin/awesome \
-c ${./rc.lua} \
- --search ${dirsLua} \
+ --search ${configLua} \
--search ${./share} \
--search ${pkgs.awesome}/share/awesome/themes \
2>&1 2>>$this_log
diff --git a/awesome/rc.lua b/awesome/rc.lua
index 3abbb2c..5cb6c7f 100644
--- a/awesome/rc.lua
+++ b/awesome/rc.lua
@@ -17,7 +17,7 @@ local function info(msg)
naughty.notify({ text = msg })
end
-require("dirs")
+require("config")
require("pulseaudio")
muteAll() -- pre-emptively mute all mics, just in-case
@@ -514,3 +514,15 @@ end)
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
-- }}}
+
+-- {{{ Startup Apps
+local tty_cmd = io.popen("tty")
+local tty = tty_cmd:read()
+tty_cmd:close()
+
+if tty == "/dev/tty1" then
+ for app = 1, #startupApps do
+ awful.util.spawn(startupApps[app])
+ end
+end
+-- }}}
diff --git a/config/default.nix b/config/default.nix
index 7ae8fd8..590a6b7 100644
--- a/config/default.nix
+++ b/config/default.nix
@@ -10,6 +10,7 @@
awesome = {
startupExtra = "";
+ startupApps = [];
xorgConfExtra = "";
xorgInputDrivers = pkgs: [
pkgs.xorg.xf86inputlibinput