diff --git a/.bash_profile b/.bash_profile index 827ebf9..af5b349 100755 --- a/.bash_profile +++ b/.bash_profile @@ -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 + diff --git a/.bashrc b/.bashrc index 092e54a..cd806d4 100644 --- a/.bashrc +++ b/.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 diff --git a/.config/aestuarium/config.ini b/.config/aestuarium/config.ini deleted file mode 100644 index 5857364..0000000 --- a/.config/aestuarium/config.ini +++ /dev/null @@ -1,2 +0,0 @@ -[monitors] -eDP-1=/home/coding-agent/dev/wallpapers/cha_haein_solo_leveling.png diff --git a/.config/aestuarium/config.ini.cgt b/.config/aestuarium/config.ini.cgt new file mode 100644 index 0000000..eddb1dc --- /dev/null +++ b/.config/aestuarium/config.ini.cgt @@ -0,0 +1,2 @@ +[monitors] +eDP-1=<% opt.wallpaper %> diff --git a/.config/foot/foot.ini b/.config/foot/foot.ini index 6ddc73c..b9c2fa6 100644 --- a/.config/foot/foot.ini +++ b/.config/foot/foot.ini @@ -4,7 +4,7 @@ font=monospace:size=12 color=000000 ccccff [colors] -alpha=0.6 +alpha=0.7 foreground = bbbbbb background = 090a18 regular0 = 090a18 diff --git a/.config/river/init b/.config/river/init index 738640d..22cbd47 100755 --- a/.config/river/init +++ b/.config/river/init @@ -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 diff --git a/.config/systemd/user/confgenfs.service b/.config/systemd/user/confgenfs.service new file mode 100644 index 0000000..70abd6c --- /dev/null +++ b/.config/systemd/user/confgenfs.service @@ -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 + diff --git a/.config/systemd/user/default.target.wants/confgenfs.service b/.config/systemd/user/default.target.wants/confgenfs.service new file mode 120000 index 0000000..8f5c210 --- /dev/null +++ b/.config/systemd/user/default.target.wants/confgenfs.service @@ -0,0 +1 @@ +/home/coding-agent/.config/systemd/user/confgenfs.service \ No newline at end of file diff --git a/README.md b/README.md index 50eb086..da4f4dd 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/cg_opts.lua b/cg_opts.lua new file mode 100644 index 0000000..aac13e2 --- /dev/null +++ b/cg_opts.lua @@ -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 diff --git a/confgen.lua b/confgen.lua index 12f158b..1951258 100644 --- a/confgen.lua +++ b/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 diff --git a/scripts/init.lua b/scripts/init.lua deleted file mode 100644 index d2c4b4d..0000000 --- a/scripts/init.lua +++ /dev/null @@ -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()) -