Compare commits

...

2 Commits

Author SHA1 Message Date
LordMZTE 6a7bf0c300
add zathura config 2024-03-08 13:40:22 +01:00
LordMZTE c3fd340fa6
integrate ConfgenFS 2024-03-08 13:04:40 +01:00
6 changed files with 78 additions and 8 deletions

View File

@ -81,6 +81,8 @@ env = __GLX_VENDOR_LIBRARY_NAME, nvidia
env = WLR_NO_HARDWARE_CURSORS, 1
<! end !>
exec-once = echo 'cg.opt.setCurrentWaylandCompositor "hyprland"' >~/confgenfs/_cgfs/eval
exec-once = waybar
exec-once = wlbg
exec-once = sleep 1 && randomwallpaper

View 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

View File

@ -0,0 +1,38 @@
set default-fg "#<% opt.catppuccin.text %>"
set default-bg "#<% opt.catppuccin.base %>"
set completion-bg "#<% opt.catppuccin.surface0 %>"
set completion-fg "#<% opt.catppuccin.text %>"
set completion-highlight-bg "#575268"
set completion-highlight-fg "#<% opt.catppuccin.text %>"
set completion-group-bg "#<% opt.catppuccin.surface0 %>"
set completion-group-fg "#<% opt.catppuccin.blue %>"
set statusbar-fg "#<% opt.catppuccin.text %>"
set statusbar-bg "#<% opt.catppuccin.surface0 %>"
set notification-bg "#<% opt.catppuccin.surface0 %>"
set notification-fg "#<% opt.catppuccin.text %>"
set notification-error-bg "#<% opt.catppuccin.surface0 %>"
set notification-error-fg "#<% opt.catppuccin.red %>"
set notification-warning-bg "#<% opt.catppuccin.surface0 %>"
set notification-warning-fg "#fae3b0"
set inputbar-fg "#<% opt.catppuccin.text %>"
set inputbar-bg "#<% opt.catppuccin.surface0 %>"
set recolor "true"
set recolor-lightcolor "#<% opt.catppuccin.base %>"
set recolor-darkcolor "#<% opt.catppuccin.text %>"
set index-fg "#<% opt.catppuccin.text %>"
set index-bg "#<% opt.catppuccin.base %>"
set index-active-fg "#<% opt.catppuccin.text %>"
set index-active-bg "#<% opt.catppuccin.surface0 %>"
set render-loading-bg "#<% opt.catppuccin.base %>"
set render-loading-fg "#<% opt.catppuccin.text %>"
set highlight-color "#575268"
set highlight-fg "#<% opt.catppuccin.pink %>"
set highlight-active-color "#<% opt.catppuccin.pink %>"

View File

@ -41,9 +41,6 @@ opts.cursor = {
-- hwmon temperature path for CPU temp used by waybar
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.icon_theme = "candy-icons"

View File

@ -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-size " .. cg.opt.cursor.size)
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)
@ -102,6 +97,16 @@ cg.opt.fileExists = function(path)
return false
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")
local local_opts = loadfile(os.getenv "HOME" .. "/.config/mzte_localconf/opts.lua")

View File

@ -177,6 +177,25 @@ pub fn init(alloc: std.mem.Allocator) !void {
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);
defer child_arena.deinit();