update river config
This commit is contained in:
parent
ffa2bac00b
commit
a3804e67a5
4 changed files with 117 additions and 27 deletions
|
|
@ -1,22 +1,10 @@
|
|||
#! /usr/bin/env lua
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Wrapper for launching the configuration from lua. This will add the river
|
||||
# directory to the LUA_PATH global variable so the configuration can be
|
||||
# splitted into multiple files
|
||||
|
||||
-- ╭─────────────────────────────────────────────────────────╮
|
||||
-- │ Add river config folder to Lua Path │
|
||||
-- ╰─────────────────────────────────────────────────────────╯
|
||||
config_dir="${XDG_CONFIG_HOME:-$HOME/.config}/river"
|
||||
export LUA_PATH="$config_dir/?.lua;$config_dir/?/init.lua;$LUA_PATH"
|
||||
|
||||
local config_dir = os.getenv("XDG_CONFIG_HOME") or os.getenv("HOME") .. "/.config/"
|
||||
local river_config_dir = config_dir .. "river/"
|
||||
package.path = river_config_dir .. '?.lua;' .. river_config_dir .. '?/init.lua;' .. package.path
|
||||
|
||||
local River = require('river')
|
||||
local Logger = require('logger')
|
||||
|
||||
local logger = Logger:new()
|
||||
logger:log("Initializing River configuration from Lua")
|
||||
|
||||
local river = River:new()
|
||||
|
||||
river:exec([[riverctl spawn "swaybg -i $HOME/Pictures/Minimalist__cron.png"]])
|
||||
|
||||
logger:close()
|
||||
lua "$config_dir"/init.lua
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue