diff options
author | Brian Picciano <me@mediocregopher.com> | 2024-04-14 15:40:03 +0200 |
---|---|---|
committer | Brian Picciano <me@mediocregopher.com> | 2024-04-14 15:40:03 +0200 |
commit | 2e1b0451ffbb789230f575d00e0741826a1a80fb (patch) | |
tree | 3f3d0c87f1360efdd8eae7723f448bb6ea711e09 /awesome | |
parent | e312f65122bc654d49bef119c7a2fc343c4e072a (diff) |
Start startup apps within awesome rc.lua
Diffstat (limited to 'awesome')
-rw-r--r-- | awesome/default.nix | 9 | ||||
-rw-r--r-- | awesome/rc.lua | 14 |
2 files changed, 19 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 +-- }}} |