mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-05-18 15:04:19 +02:00
integrate ConfgenFS
This commit is contained in:
parent
93cb13e06b
commit
c3fd340fa6
|
@ -81,6 +81,8 @@ env = __GLX_VENDOR_LIBRARY_NAME, nvidia
|
||||||
env = WLR_NO_HARDWARE_CURSORS, 1
|
env = WLR_NO_HARDWARE_CURSORS, 1
|
||||||
<! end !>
|
<! end !>
|
||||||
|
|
||||||
|
exec-once = echo 'cg.opt.setCurrentWaylandCompositor "hyprland"' >~/confgenfs/_cgfs/eval
|
||||||
|
|
||||||
exec-once = waybar
|
exec-once = waybar
|
||||||
exec-once = wlbg
|
exec-once = wlbg
|
||||||
exec-once = sleep 1 && randomwallpaper
|
exec-once = sleep 1 && randomwallpaper
|
||||||
|
|
9
.config/systemd/user/confgenfs.service.cgt
Normal file
9
.config/systemd/user/confgenfs.service.cgt
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=ConfgenFS dotfiles
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=exec
|
||||||
|
ExecStart=<% opt.system "which confgenfs" %> "<% opt.dev_dir %>/dotfiles/confgen.lua" "<% os.getenv "HOME" %>/confgenfs"
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
|
@ -41,9 +41,6 @@ opts.cursor = {
|
||||||
-- hwmon temperature path for CPU temp used by waybar
|
-- hwmon temperature path for CPU temp used by waybar
|
||||||
opts.cpu_temp_hwmon = "/sys/class/hwmon/hwmon0/temp1_input"
|
opts.cpu_temp_hwmon = "/sys/class/hwmon/hwmon0/temp1_input"
|
||||||
|
|
||||||
-- used in waybar config
|
|
||||||
opts.wayland_compositor = nil
|
|
||||||
|
|
||||||
opts.gtk_theme = "Catppuccin-Mocha-Standard-Red-Dark"
|
opts.gtk_theme = "Catppuccin-Mocha-Standard-Red-Dark"
|
||||||
opts.icon_theme = "candy-icons"
|
opts.icon_theme = "candy-icons"
|
||||||
|
|
||||||
|
|
15
confgen.lua
15
confgen.lua
|
@ -19,11 +19,6 @@ cg.onDone(function(errors)
|
||||||
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-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 cursor-size " .. cg.opt.cursor.size)
|
||||||
cg.opt.system('gsettings set org.gnome.desktop.interface font-name "' .. cg.opt.font .. ' 11"')
|
cg.opt.system('gsettings set org.gnome.desktop.interface font-name "' .. cg.opt.font .. ' 11"')
|
||||||
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
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
@ -102,6 +97,16 @@ cg.opt.fileExists = function(path)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Set the currently active wayland compositor. Updates options for templates as well as gsettings.
|
||||||
|
cg.opt.setCurrentWaylandCompositor = function(comp)
|
||||||
|
cg.opt.wayland_compositor = comp
|
||||||
|
if comp == "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
|
||||||
|
|
||||||
cg.opt = merge(cg.opt, require "cg_opts")
|
cg.opt = merge(cg.opt, require "cg_opts")
|
||||||
|
|
||||||
local local_opts = loadfile(os.getenv "HOME" .. "/.config/mzte_localconf/opts.lua")
|
local local_opts = loadfile(os.getenv "HOME" .. "/.config/mzte_localconf/opts.lua")
|
||||||
|
|
|
@ -177,6 +177,25 @@ pub fn init(alloc: std.mem.Allocator) !void {
|
||||||
|
|
||||||
log.info("configuration finished, spawning processes", .{});
|
log.info("configuration finished, spawning processes", .{});
|
||||||
|
|
||||||
|
// tell confgenfs we're now using river
|
||||||
|
confgenfs: {
|
||||||
|
const cgfs_eval_path = try std.fs.path.join(
|
||||||
|
alloc,
|
||||||
|
&.{ home, "confgenfs", "_cgfs", "eval" },
|
||||||
|
);
|
||||||
|
defer alloc.free(cgfs_eval_path);
|
||||||
|
|
||||||
|
const evalf = std.fs.cwd().openFile(cgfs_eval_path, .{ .mode = .write_only }) catch {
|
||||||
|
std.log.warn("unable to open confgenfs eval file", .{});
|
||||||
|
break :confgenfs;
|
||||||
|
};
|
||||||
|
defer evalf.close();
|
||||||
|
|
||||||
|
try evalf.writeAll(
|
||||||
|
\\cg.opt.setCurrentWaylandCompositor "river"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
var child_arena = std.heap.ArenaAllocator.init(alloc);
|
var child_arena = std.heap.ArenaAllocator.init(alloc);
|
||||||
defer child_arena.deinit();
|
defer child_arena.deinit();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue