Integrate ConfgenFS
This commit is contained in:
parent
7e432b59e2
commit
a8ef3e8272
12 changed files with 106 additions and 47 deletions
|
@ -1,7 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
export XDG_CONFIG_DIRS="$HOME/.config/"
|
||||
|
||||
if [[ -z "$WAYLAND_DISPLAY" ]]; then
|
||||
lua scripts/init.lua
|
||||
systemctl --user enable --now confgenfs
|
||||
#river
|
||||
fi
|
||||
|
||||
|
|
3
.bashrc
3
.bashrc
|
@ -5,6 +5,3 @@ export XDG_CURRENT_DESKTOP=river
|
|||
|
||||
alias rm='rm -i'
|
||||
alias set-cursor='gsettings set org.gnome.desktop.interface cursor-theme'
|
||||
|
||||
gsettings set org.gnome.desktop.interface font-name "Sans 11"
|
||||
gsettings set org.gnome.desktop.interface text-scaling-factor 1.5
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[monitors]
|
||||
eDP-1=/home/coding-agent/dev/wallpapers/cha_haein_solo_leveling.png
|
2
.config/aestuarium/config.ini.cgt
Normal file
2
.config/aestuarium/config.ini.cgt
Normal file
|
@ -0,0 +1,2 @@
|
|||
[monitors]
|
||||
eDP-1=<% opt.wallpaper %>
|
|
@ -4,7 +4,7 @@ font=monospace:size=12
|
|||
color=000000 ccccff
|
||||
|
||||
[colors]
|
||||
alpha=0.6
|
||||
alpha=0.7
|
||||
foreground = bbbbbb
|
||||
background = 090a18
|
||||
regular0 = 090a18
|
||||
|
|
|
@ -132,6 +132,7 @@ aestuarium &
|
|||
swayidle -w timeout 150 ~/lock_screen_rand_wp.sh &
|
||||
gsettings set org.gnome.desktop.interface cursor-theme darkbolt-cursor &&
|
||||
gsettings set org.gnome.desktop.wm.preferences button-layout ""
|
||||
gsettings set org.gnome.desktop.interface font-name "Iosevka NFM 12"
|
||||
|
||||
# Set background and border color
|
||||
riverctl background-color 0x10002f
|
||||
|
|
10
.config/systemd/user/confgenfs.service
Normal file
10
.config/systemd/user/confgenfs.service
Normal file
|
@ -0,0 +1,10 @@
|
|||
[Unit]
|
||||
Description=ConfgenFS
|
||||
|
||||
[Service]
|
||||
Type=exec
|
||||
ExecStart="/home/coding-agent/.local/bin/confgenfs" "%h/dev/dotfiles/confgen.lua" "%h/confgenfs"
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
1
.config/systemd/user/default.target.wants/confgenfs.service
Symbolic link
1
.config/systemd/user/default.target.wants/confgenfs.service
Symbolic link
|
@ -0,0 +1 @@
|
|||
/home/coding-agent/.config/systemd/user/confgenfs.service
|
|
@ -1 +1,5 @@
|
|||
# The most sane dotfiles out there
|
||||
# Coding Agent Dotfiles
|
||||
|
||||
### Where might dotfiles are heading?
|
||||
|
||||
I dunno, but they are far from sane any longer
|
||||
|
|
19
cg_opts.lua
Normal file
19
cg_opts.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
local opts = {}
|
||||
|
||||
opts.font = "HeavyData Nerd Font"
|
||||
opts.font_term = "Iosevka NFM"
|
||||
opts.font_size = "12"
|
||||
|
||||
opts.gtk_theme = "Breeze-Dark"
|
||||
opts.icon_theme = "Surn-Arch-Blue"
|
||||
|
||||
opts.scripts_folder = os.getenv("HOME") .. "/scripts"
|
||||
|
||||
opts.cursor = {
|
||||
theme = "darkbolt-cursor",
|
||||
size = 24,
|
||||
}
|
||||
|
||||
opts.wallpaper = os.getenv("HOME") .. "/dev/wallpapers/aqua.png"
|
||||
|
||||
return opts
|
64
confgen.lua
64
confgen.lua
|
@ -1,2 +1,64 @@
|
|||
cg.addPath ".config"
|
||||
cg.addPath(".config")
|
||||
--cg.addPath("scripts")
|
||||
|
||||
cg.opt = require "cg_opts"
|
||||
|
||||
cg.onDone(function(errors)
|
||||
if errors then
|
||||
print "ERRORS DURING CONFGEN"
|
||||
else
|
||||
print "updating gsettings"
|
||||
cg.opt.system("gsettings set org.gnome.desktop.interface icon-theme " .. cg.opt.icon_theme)
|
||||
cg.opt.system("gsettings set org.gnome.desktop.interface gtk-theme " .. cg.opt.gtk_theme)
|
||||
cg.opt.system("gsettings set org.gnome.desktop.interface cursor-theme " .. cg.opt.cursor.theme)
|
||||
cg.opt.system("gsettings set org.gnome.desktop.interface cursor-size " .. cg.opt.cursor.size)
|
||||
cg.opt.system('gsettings set org.gnome.desktop.interface font-name "' .. cg.opt.font_term .. " " ..cg.opt.font_size)
|
||||
cg.opt.system('gsettings set org.gnome.desktop.interface text-scaling-factor 1.5')
|
||||
if cg.opt.wayland_compositor == "river" then
|
||||
cg.opt.system 'gsettings set org.gnome.desktop.wm.preferences button-layout ""'
|
||||
else
|
||||
cg.opt.system "gsettings reset org.gnome.desktop.wm.preferences button-layout"
|
||||
end
|
||||
end
|
||||
|
||||
-- builds the zig scripts
|
||||
-- local cmd = "ls -l " .. cg.opt.scripts_folder .. " | grep '^d' | awk '{print $9}'"
|
||||
-- local handle = io.popen(cmd)
|
||||
-- for folder in handle:lines() do
|
||||
-- local abs_path = cg.opt.scripts_folder .. folder
|
||||
-- cg.opt.buildZigScript(abs_path)
|
||||
-- end
|
||||
-- handle:close()
|
||||
end)
|
||||
|
||||
cg.opt.system = function(cmd)
|
||||
local handle = io.popen(cmd)
|
||||
if handle == nil then
|
||||
error("Failed to spawn process" .. cmd)
|
||||
end
|
||||
local data, _ = handle:read("*a"):gsub("%s$", "")
|
||||
return data
|
||||
end
|
||||
|
||||
--cg.opt.buildZigScript = function(path)
|
||||
-- local build_path = path .. "/build.zig"
|
||||
-- local cmd = "zig build --build-file " .. build_path .. " -Doptimize=ReleaseFast -p ~/.local/"
|
||||
--
|
||||
-- local handle = io.popen(cmd)
|
||||
-- if handle == nil then
|
||||
-- error("Failed to spawn process" .. cmd)
|
||||
-- end
|
||||
-- local result = handle:read("*a")
|
||||
-- local success, _, _ = handle:close()
|
||||
-- if success then
|
||||
-- print("built successfully")
|
||||
-- else
|
||||
-- print("build failed: " .. result)
|
||||
-- end
|
||||
--end
|
||||
|
||||
|
||||
cg.opt.setCurrentWaylandCompositor = function(comp)
|
||||
cg.opt.wayland_compositor = comp
|
||||
end
|
||||
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
local lfs = require("lfs")
|
||||
|
||||
local function listDirectories()
|
||||
local path = "scripts/"
|
||||
local currDir = lfs.currentdir()
|
||||
local dirList = {}
|
||||
|
||||
for entry in lfs.dir(path) do
|
||||
if entry ~= "." and entry ~= ".." then
|
||||
local absPath = currDir .. "/" .. path .. "/" .. entry
|
||||
local mode = lfs.attributes(absPath, "mode")
|
||||
if mode == "directory" then
|
||||
table.insert(dirList, absPath)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return dirList
|
||||
end
|
||||
|
||||
local function buildZigScripts(dirs)
|
||||
for _, dir in pairs(dirs) do
|
||||
local zig_module = dir:match("[^" .. package.config:sub(1, 1) .. "]+/?$")
|
||||
|
||||
lfs.chdir(dir)
|
||||
local success, _, _ = os.execute("zig build -Doptimize=ReleaseFast -p ~/.local/ > /dev/null 2>&1 &")
|
||||
if success then
|
||||
print("\27[34m" .. zig_module .. "\27[0m" .. " built successfully successfully")
|
||||
else
|
||||
print("\27[34m" .. zig_module .. "\27[0m" .. " failed to build!")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
os.execute("river")
|
||||
|
||||
buildzigscripts(listdirectories())
|
||||
|
Loading…
Reference in a new issue