From 7eb0424f1aae8a47ca435bf4b3a5b4471e34aa65 Mon Sep 17 00:00:00 2001 From: "mcmrcs@proton.me" Date: Thu, 14 Mar 2024 15:09:29 +0000 Subject: [PATCH] Changed configs to further integrate confgenfs --- .bashrc | 5 +- .config/foot/foot.ini | 29 ---------- .config/foot/foot.ini.cgt | 29 ++++++++++ .config/gtk-3.0/gtk.css | 16 ++++++ .config/gtk-3.0/settings.ini.cgt | 6 +++ .config/gtk-4.0/gtk.css | 14 +++++ .config/gtk-4.0/settings.ini.cgt | 5 ++ .../hypr/{hyprland.conf => hyprland.conf.cgt} | 35 ++++++------ .config/hypr/hyprpaper.conf | 7 --- .config/hypr/hyprpaper.conf.cgt | 5 ++ .config/nvim/after/plugin/colorizer.lua | 2 + .config/nvim/after/plugin/lsp.lua | 7 +++ .config/nvim/after/plugin/treesitter.lua | 2 +- .config/river/init | 29 +++++----- .config/rofi/{config.rasi => config.rasi.cgt} | 4 +- .config/rofi/{theme.rasi => theme.rasi.cgt} | 4 +- .config/swaylock/{config => config.cgt} | 4 +- .config/systemd/user/confgenfs.service | 2 +- .config/wallpickr/config.ini | 1 - .config/wallpickr/config.ini.cgt | 1 + .../waybar/{config.jsonc => config.jsonc.cgt} | 6 ++- .config/waybar/{style.css => style.css.cgt} | 5 +- .config/waybar/{theme.css => theme.css.cgt} | 0 .gtkrc-2.0.cgt | 5 ++ cg_opts.lua | 53 ++++++++++++++---- confgen.lua | 54 ++++++++++--------- 26 files changed, 212 insertions(+), 118 deletions(-) delete mode 100644 .config/foot/foot.ini create mode 100644 .config/foot/foot.ini.cgt create mode 100644 .config/gtk-3.0/gtk.css create mode 100644 .config/gtk-3.0/settings.ini.cgt create mode 100644 .config/gtk-4.0/gtk.css create mode 100644 .config/gtk-4.0/settings.ini.cgt rename .config/hypr/{hyprland.conf => hyprland.conf.cgt} (87%) delete mode 100644 .config/hypr/hyprpaper.conf create mode 100644 .config/hypr/hyprpaper.conf.cgt rename .config/rofi/{config.rasi => config.rasi.cgt} (94%) rename .config/rofi/{theme.rasi => theme.rasi.cgt} (79%) rename .config/swaylock/{config => config.cgt} (76%) delete mode 100644 .config/wallpickr/config.ini create mode 100644 .config/wallpickr/config.ini.cgt rename .config/waybar/{config.jsonc => config.jsonc.cgt} (92%) rename .config/waybar/{style.css => style.css.cgt} (96%) rename .config/waybar/{theme.css => theme.css.cgt} (100%) create mode 100644 .gtkrc-2.0.cgt diff --git a/.bashrc b/.bashrc index cd806d4..6aac201 100644 --- a/.bashrc +++ b/.bashrc @@ -1,7 +1,4 @@ -export QT_QPA_PLATFORMTHEME=qt5ct -export QT_SCALE_FACTOR=1.5 -export EDITOR="nvim" -export XDG_CURRENT_DESKTOP=river +export EDITOR="<% opt.default_editor %>" alias rm='rm -i' alias set-cursor='gsettings set org.gnome.desktop.interface cursor-theme' diff --git a/.config/foot/foot.ini b/.config/foot/foot.ini deleted file mode 100644 index b9c2fa6..0000000 --- a/.config/foot/foot.ini +++ /dev/null @@ -1,29 +0,0 @@ -font=monospace:size=12 - -[cursor] -color=000000 ccccff - -[colors] -alpha=0.7 -foreground = bbbbbb -background = 090a18 -regular0 = 090a18 -regular1 = 4D71C0 -regular2 = 4D71C0 -regular3 = bfa51a -regular4 = 4ab2d7 -regular5 = 4D71C0 -regular6 = 4D71C0 -regular7 = bfa51a -bright0 = 2b1329 -bright1 = faff75 -bright2 = 60ba80 -bright3 = de9b1d -bright4 = 8ba7ea -bright5 = 4D71C0 -bright6 = 4D71C0 -bright7 = bfa51a -selection-foreground = ffffff -selection-background = 4C637A - -urls=43EDC9 diff --git a/.config/foot/foot.ini.cgt b/.config/foot/foot.ini.cgt new file mode 100644 index 0000000..3886ec7 --- /dev/null +++ b/.config/foot/foot.ini.cgt @@ -0,0 +1,29 @@ +font=<% opt.font_term %>:size=16size=11 + +[cursor] +color=<% opt.term.cursor_foreground %> <% opt.term.cursor_background %> + +[colors] +alpha=<% opt.term.alpha %> +foreground = <% opt.term.foreground %> +background = <% opt.term.background %> +regular0 = <% opt.term.regular0 %> +regular1 = <% opt.term.regular1 %> +regular2 = <% opt.term.regular2 %> +regular3 = <% opt.term.regular3 %> +regular4 = <% opt.term.regular4 %> +regular5 = <% opt.term.regular5 %> +regular6 = <% opt.term.regular6 %> +regular7 = <% opt.term.regular7 %> +bright0 = <% opt.term.bright0 %> +bright1 = <% opt.term.bright1 %> +bright2 = <% opt.term.bright2 %> +bright3 = <% opt.term.bright3 %> +bright4 = <% opt.term.bright4 %> +bright5 = <% opt.term.bright5 %> +bright6 = <% opt.term.bright6 %> +bright7 = <% opt.term.bright7 %> +selection-foreground = <% opt.term.selection_foreground %> +selection-background = <% opt.term.selection_background %> + +urls=<% opt.term.urls %> diff --git a/.config/gtk-3.0/gtk.css b/.config/gtk-3.0/gtk.css new file mode 100644 index 0000000..96bfbdc --- /dev/null +++ b/.config/gtk-3.0/gtk.css @@ -0,0 +1,16 @@ +/* No (default) titlebar on wayland */ +headerbar.titlebar.default-decoration { + background: transparent; + padding: 0; + margin: 0 0 -17px 0; + border: 0; + min-height: 0; + font-size: 0; + box-shadow: none; +} + +/* rm -rf window shadows */ +window.csd, /* gtk4? */ +window.csd decoration { /* gtk3 */ + box-shadow: none; +} diff --git a/.config/gtk-3.0/settings.ini.cgt b/.config/gtk-3.0/settings.ini.cgt new file mode 100644 index 0000000..4e882ed --- /dev/null +++ b/.config/gtk-3.0/settings.ini.cgt @@ -0,0 +1,6 @@ +[Settings] +gtk-theme-name=<% opt.gtk_theme %> +gtk-icon-theme-name=<% opt.icon_theme %> +gtk-font-name=<% opt.term.font %> 12 +gtk-cursor-theme-name=<% opt.cursor.theme %> +gtk-cursor-theme-size=0 diff --git a/.config/gtk-4.0/gtk.css b/.config/gtk-4.0/gtk.css new file mode 100644 index 0000000..06bbcf6 --- /dev/null +++ b/.config/gtk-4.0/gtk.css @@ -0,0 +1,14 @@ +headerbar.titlebar.default-decoration { + background: transparent; + padding: 0; + margin: 0 0 -17px 0; + border: 0; + min-height: 0; + font-size: 0; + box-shadow: none; +} + +window.csd, +window.csd decoration { + box-shadow: none; +} diff --git a/.config/gtk-4.0/settings.ini.cgt b/.config/gtk-4.0/settings.ini.cgt new file mode 100644 index 0000000..87d6043 --- /dev/null +++ b/.config/gtk-4.0/settings.ini.cgt @@ -0,0 +1,5 @@ +[Settings] +gtk-theme-name=<% opt.term.font %> +gtk-icon-theme-name=<% opt.icon_theme %> 12 +gtk-cursor-theme-name=<% opt.cursor.theme %> +gtk-cursor-theme-size=0 diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf.cgt similarity index 87% rename from .config/hypr/hyprland.conf rename to .config/hypr/hyprland.conf.cgt index e92e916..6d16d38 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf.cgt @@ -1,22 +1,22 @@ monitor=,preferred,auto,auto +exec-once = echo 'cg.opt.compositor = "hyrland"' >~/confgenfs/_cgfs/eval exec-once = waybar -exec-once = hyprpaper +exec-once = aestuarium exec-once = swayidle -w timeout 150 'swaylock -f' timeout 200 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' -exec-once = gsettings set org.gnome.desktop.interface cursor-theme darkbolt-cursor +exec-once = gsettings set org.gnome.desktop.interface cursor-theme <% opt.icon_theme %> +exec-once = gsettings set org.gnome.desktop.interface text-scaling-factor 1.0 $terminal = foot $fileManager = thunar -$browser = firefox +$browser = brave $menu = rofi -show drun +$launcher = rofi -show run -#scripts -$rwallpaper = ~/scripts/r_wallpaper.sh - -# Some default env vars.b - -env = XCURSOR_SIZE,24 -env = QT_QPA_PLATFORMTHEME,qt5ct # change to qt6ct if you have that +env = HYPRCURSOR_THEME,<% opt.cursor.theme %> +env = HYPRCURSOR_SIZE,<% opt.cursor.size %> +env = GTK_THEME,<% opt.gtk_theme %> +env = GDK_BACKEND=wayland,x11 # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { @@ -32,7 +32,7 @@ input { natural_scroll = yes } - sensitivity = 0 # -1.0 - 1.0, 0 means no modification. + sensitivity = 0 } general { @@ -70,8 +70,8 @@ animations { } dwindle { - pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below - preserve_split = yes # you probably want this + pseudotile = yes + preserve_split = yes } master { @@ -90,13 +90,12 @@ device:epic-mouse-v1 { sensitivity = -0.5 } -windowrulev2 = nomaximizerequest, class:.* # You'll probably like this. +windowrulev2 = nomaximizerequest, class:.* $mainMod = SUPER $mainModS = SUPER SHIFT -# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, RETURN, exec, $terminal bind = $mainMod, C, killactive, bind = $mainMod, M, exit, @@ -105,11 +104,13 @@ bind = $mainMod, W, exec, wallpickr bind = $mainMod, V, togglefloating, bind = $mainMod, F, fullscreen, bind = $mainMod, T, fullscreen, 1 # maximize -bind = $mainMod, SPACE, exec, $menu +bind = $mainMod, SPACE, exec, $menu +bind = $mainModS, SPACE, exec, $launcher bind = $mainMod, B, exec, $browser -bind = $mainModS, R, exec, $rwallpaper bind = $mainMod, P, pseudo, # dwindle bind = $mainMod, J, togglesplit, # dwindle +bind = $mainMod, W, exec, wallpickr +bind = $mainMod, N, exec, nheko # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l diff --git a/.config/hypr/hyprpaper.conf b/.config/hypr/hyprpaper.conf deleted file mode 100644 index dbb9e00..0000000 --- a/.config/hypr/hyprpaper.conf +++ /dev/null @@ -1,7 +0,0 @@ -$wallpaper = $HOME/dev/wallpapers/noelle_silva.png - -preload = $wallpaper - -wallpaper = ,contain:$wallpaper -splash = false -ipc = on diff --git a/.config/hypr/hyprpaper.conf.cgt b/.config/hypr/hyprpaper.conf.cgt new file mode 100644 index 0000000..fc6c0cf --- /dev/null +++ b/.config/hypr/hyprpaper.conf.cgt @@ -0,0 +1,5 @@ +preload = <% opt.wallpaper %> + +wallpaper = ,contain:<% opt.wallpaper %> +splash = false +ipc = on diff --git a/.config/nvim/after/plugin/colorizer.lua b/.config/nvim/after/plugin/colorizer.lua index 185069c..21f4159 100644 --- a/.config/nvim/after/plugin/colorizer.lua +++ b/.config/nvim/after/plugin/colorizer.lua @@ -2,5 +2,7 @@ require'colorizer'.setup { 'ini', 'dosini', 'css', + 'cgt', + 'html', } diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua index d00a7c7..905fc87 100644 --- a/.config/nvim/after/plugin/lsp.lua +++ b/.config/nvim/after/plugin/lsp.lua @@ -33,6 +33,13 @@ require('mason-lspconfig').setup({ }, }) +lsp.set_sign_icons({ + error = '✘', + warn = '▲', + hint = '⚑', + info = '»' +}) + local cmp = require('cmp') cmp.setup({ diff --git a/.config/nvim/after/plugin/treesitter.lua b/.config/nvim/after/plugin/treesitter.lua index 36f3b74..f746433 100644 --- a/.config/nvim/after/plugin/treesitter.lua +++ b/.config/nvim/after/plugin/treesitter.lua @@ -1,6 +1,6 @@ require'nvim-treesitter.configs'.setup { -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = { "java", "zig", "javascript", "typescript", "c", "lua", "vim", "vimdoc", "query" }, + ensure_installed = { "all" }, -- Install parsers synchronously (only applied to `ensure_installed`) sync_install = false, diff --git a/.config/river/init b/.config/river/init index 22cbd47..a2db423 100755 --- a/.config/river/init +++ b/.config/river/init @@ -2,7 +2,7 @@ riverctl unmap normal Super Return riverctl map normal Super Return spawn 'foot' -riverctl map normal Super B spawn 'firefox' +riverctl map normal Super B spawn 'brave' riverctl map normal Super E spawn 'thunar' riverctl map normal Super W spawn 'wallpickr' riverctl map normal Super Space spawn 'rofi -show drun' @@ -38,10 +38,10 @@ riverctl map normal Super+Shift H send-layout-cmd rivertile "main-count +1" riverctl map normal Super+Shift L send-layout-cmd rivertile "main-count -1" # Super+Alt+{H,J,K,L} to move views -riverctl map -repeat normal Super+Alt H move left 50 -riverctl map -repeat normal Super+Alt J move down 50 -riverctl map -repeat normal Super+Alt K move up 50 -riverctl map -repeat normal Super+Alt L move right 50 +riverctl map -repeat normal Super+Alt H move left 10 +riverctl map -repeat normal Super+Alt J move down 10 +riverctl map -repeat normal Super+Alt K move up 10 +riverctl map -repeat normal Super+Alt L move right 10 # Super+Alt+Control+{H,J,K,L} to snap views to screen edges riverctl map normal Super+Alt+Control H snap left @@ -50,10 +50,10 @@ riverctl map normal Super+Alt+Control K snap up riverctl map normal Super+Alt+Control L snap right # Super+Alt+Shift+{H,J,K,L} to resize views -riverctl map -repeat normal Super+Alt+Shift h resize horizontal -50 -riverctl map -repeat normal Super+Alt+Shift j resize vertical 50 -riverctl map -repeat normal Super+Alt+Shift k resize vertical -50 -riverctl map -repeat normal Super+Alt+Shift l resize horizontal 50 +riverctl map -repeat normal Super+Alt+Shift h resize horizontal -10 +riverctl map -repeat normal Super+Alt+Shift j resize vertical 10 +riverctl map -repeat normal Super+Alt+Shift k resize vertical -10 +riverctl map -repeat normal Super+Alt+Shift l resize horizontal 10 # Super + Left Mouse Button to move views riverctl map-pointer normal Super BTN_LEFT move-view @@ -109,8 +109,8 @@ for mode in normal locked do riverctl map $mode None XF86Eject spawn 'eject -T' - riverctl map $mode None XF86AudioRaiseVolume spawn 'pactl set-sink-volume @DEFAULT_SINK@ +5%' - riverctl map $mode None XF86AudioLowerVolume spawn 'pactl set-sink-volume @DEFAULT_SINK@ -5%' + riverctl map -repeat $mode None XF86AudioRaiseVolume spawn 'pactl set-sink-volume @DEFAULT_SINK@ +1%' + riverctl map -repeat $mode None XF86AudioLowerVolume spawn 'pactl set-sink-volume @DEFAULT_SINK@ -1%' riverctl map $mode None XF86AudioMute spawn 'pactl set-sink-mute @DEFAULT_SINK@ toggle' riverctl map $mode None XF86AudioMedia spawn 'playerctl play-pause' @@ -126,13 +126,18 @@ done riverctl map normal Super Print spawn 'obs --startrecording --minimize-to-tray' riverctl map normal Super None spawn "grim $HOME/media/images/screenshot/$(date +'%screenshot.jpeg') | wl-copy" +# pre start up scripts +echo 'cg.opt.compositor = "river"' >~/confgenfs/_cgfs/eval + # start up scripts waybar & aestuarium & -swayidle -w timeout 150 ~/lock_screen_rand_wp.sh & +swayidle -w timeout 150 ~/lock_screen_rand_wp.sh timeout 200 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' & +gsettings set org.gnome.desktop.interface gtk-theme "Breeze-Dark" && 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" +gsettings set org.gnome.desktop.interface text-scaling-factor 1.5 # Set background and border color riverctl background-color 0x10002f diff --git a/.config/rofi/config.rasi b/.config/rofi/config.rasi.cgt similarity index 94% rename from .config/rofi/config.rasi rename to .config/rofi/config.rasi.cgt index 7409f81..118e06f 100644 --- a/.config/rofi/config.rasi +++ b/.config/rofi/config.rasi.cgt @@ -24,7 +24,7 @@ window { border: @w-border; border-color: @w-border-color; padding: @w-padding; - icon-theme: "Surn-Arch-Blue"; + icon-theme: "<% opt.icon_theme%>"; } prompt { @@ -37,7 +37,7 @@ inputbar { } entry { - placeholder: "Tell me what to open"; + placeholder: "Tell me what to open..."; text-color: @fg-color; placeholder-color: @fgp-color; } diff --git a/.config/rofi/theme.rasi b/.config/rofi/theme.rasi.cgt similarity index 79% rename from .config/rofi/theme.rasi rename to .config/rofi/theme.rasi.cgt index c6792d1..1fc83d5 100644 --- a/.config/rofi/theme.rasi +++ b/.config/rofi/theme.rasi.cgt @@ -1,5 +1,5 @@ * { - font: "HeavyData Nerd Font 13"; + font: "<% opt.font %> 12"; g-spacing: 10px; g-margin: 0; b-color: #000000FF; @@ -9,7 +9,7 @@ hl-color: #FFFFFFFF; hlt-color: #000000FF; alt-color: #000010FF; - wbg-color: #051020CC; + wbg-color: #<% opt.term.background %>CC; w-border: 2px solid; w-border-color: #1080eeee; w-padding: 12px; diff --git a/.config/swaylock/config b/.config/swaylock/config.cgt similarity index 76% rename from .config/swaylock/config rename to .config/swaylock/config.cgt index 287e1ad..250d7cf 100644 --- a/.config/swaylock/config +++ b/.config/swaylock/config.cgt @@ -2,7 +2,7 @@ indicator ignore-empty-password indicator-thickness=2 indicator-radius=100 -image=~/dev/wallpapers/rem_wallpaper.jpeg +image=<% opt.wallpapers_path %>/rem_wallpaper.jpeg clock effect-blur=7x5 effect-vignette=0.5:0.5 @@ -13,4 +13,4 @@ key-hl-color=bb60ff text-color=ffffff grace=2 fade-in=0.5 -font=HeavyData Nerd Font +font=<% opt.font %> diff --git a/.config/systemd/user/confgenfs.service b/.config/systemd/user/confgenfs.service index 70abd6c..87d5ceb 100644 --- a/.config/systemd/user/confgenfs.service +++ b/.config/systemd/user/confgenfs.service @@ -3,7 +3,7 @@ Description=ConfgenFS [Service] Type=exec -ExecStart="/home/coding-agent/.local/bin/confgenfs" "%h/dev/dotfiles/confgen.lua" "%h/confgenfs" +ExecStart="%h/.local/bin/confgenfs" "%h/dev/dotfiles/confgen.lua" "%h/confgenfs" [Install] WantedBy=default.target diff --git a/.config/wallpickr/config.ini b/.config/wallpickr/config.ini deleted file mode 100644 index 13e9c13..0000000 --- a/.config/wallpickr/config.ini +++ /dev/null @@ -1 +0,0 @@ -path=/home/coding-agent/dev/wallpapers/ diff --git a/.config/wallpickr/config.ini.cgt b/.config/wallpickr/config.ini.cgt new file mode 100644 index 0000000..96eadf8 --- /dev/null +++ b/.config/wallpickr/config.ini.cgt @@ -0,0 +1 @@ +path=<% opt.wallpapers_path %> diff --git a/.config/waybar/config.jsonc b/.config/waybar/config.jsonc.cgt similarity index 92% rename from .config/waybar/config.jsonc rename to .config/waybar/config.jsonc.cgt index 4e9d1f2..6acdd85 100644 --- a/.config/waybar/config.jsonc +++ b/.config/waybar/config.jsonc.cgt @@ -2,7 +2,11 @@ "spacing": 2, "layer": "top", "modules-left": [ + "river/tags" + + "hyprland/workspaces" + ], "modules-right": [ "network", @@ -50,7 +54,7 @@ "clock": { "format": "{:%H:%M}", "format-alt": "{:%d %B %Y}", - "tooltip-format": "{:%d %B}\n{calendar}", + "tooltip-format": "{:%d %B}\n{calendar}", "today-format": "{}", "format-calendar": "{}", "actions": { diff --git a/.config/waybar/style.css b/.config/waybar/style.css.cgt similarity index 96% rename from .config/waybar/style.css rename to .config/waybar/style.css.cgt index cfc4992..f66a96f 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css.cgt @@ -3,7 +3,7 @@ * { border: none; border-radius: 0; - font-family: "HeavyData Nerd Font"; + font-family: "<% opt.font %>"; min-height: 18px; transition: transform 250ms ease-in-out; } @@ -78,8 +78,7 @@ window#waybar.hidden { #tray, #window, #network { - padding-left: 8px; - padding-right: 8px; + padding: 8px; transition: transform 250ms ease-in-out; color: @text; background: @base; diff --git a/.config/waybar/theme.css b/.config/waybar/theme.css.cgt similarity index 100% rename from .config/waybar/theme.css rename to .config/waybar/theme.css.cgt diff --git a/.gtkrc-2.0.cgt b/.gtkrc-2.0.cgt new file mode 100644 index 0000000..d500a78 --- /dev/null +++ b/.gtkrc-2.0.cgt @@ -0,0 +1,5 @@ +gtk-icon-theme-name="<% opt.icon_theme %>" +gtk-cursor-theme-name="<% opt.cursor.theme %>" +gtk-theme-name="<% opt.gtk_theme %>" +gtk-font-name="<% opt.font %> 12" + diff --git a/cg_opts.lua b/cg_opts.lua index aac13e2..3046c43 100644 --- a/cg_opts.lua +++ b/cg_opts.lua @@ -1,19 +1,52 @@ -local opts = {} +local opt = {} -opts.font = "HeavyData Nerd Font" -opts.font_term = "Iosevka NFM" -opts.font_size = "12" +opt.default_editor = "nvim" -opts.gtk_theme = "Breeze-Dark" -opts.icon_theme = "Surn-Arch-Blue" +opt.font = "HeavyData Nerd Font" +opt.font_term = "Iosevka NFM" +opt.font_size = "12" -opts.scripts_folder = os.getenv("HOME") .. "/scripts" +opt.gtk_theme = "Breeze-Dark" +opt.icon_theme = "Surn-Arch-Blue" -opts.cursor = { +opt.scripts_folder = os.getenv("HOME") .. "/scripts" + +opt.cursor = { theme = "darkbolt-cursor", size = 24, } -opts.wallpaper = os.getenv("HOME") .. "/dev/wallpapers/aqua.png" +opt.wallpapers_path = os.getenv("HOME") .. "/dev/wallpapers" +opt.wallpaper = opt.wallpapers_path .. "/aqua.png" -return opts +opt.term = { + font = "Iosevka NFM", + alpha = 0.7, + foreground = "bbbbbb", + background = "090a18", + regular0 = "090a18", + regular1 = "f4fa8c", + regular2 = "f4fa8c", + regular3 = "bfa51a", + regular4 = "4ab2d7", + regular5 = "f4fa8c", + regular6 = "f4fa8c", + regular7 = "bfa51a", + bright0 = "2b1329", + bright1 = "faff75", + bright2 = "60ba80", + bright3 = "de9b1d", + bright4 = "8ba7ea", + bright5 = "f4fa8c", + bright6 = "f4fa8c", + bright7 = "bfa51a", + selection_foreground = "ffffff", + selection_background = "4C637A", + urls = "43EDC9", + cursor_foreground = "000000", + cursor_background = "ccccff", + border_focused = "1080ee", + border_unfocused = "595959" +} + +return opt diff --git a/confgen.lua b/confgen.lua index 1951258..bcf24b6 100644 --- a/confgen.lua +++ b/confgen.lua @@ -1,5 +1,6 @@ cg.addPath(".config") ---cg.addPath("scripts") +cg.addPath("scripts") +cg.addFile(".gtkrc-2.0") cg.opt = require "cg_opts" @@ -13,22 +14,23 @@ 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_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 + if cg.opt.compositor == "river" then + cg.opt.system('gsettings set org.gnome.desktop.interface text-scaling-factor 1.5') 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 + cg.opt.system('export GTK_THEME="'.. cg.opt.gtk_theme ..'"') 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() + 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) @@ -40,22 +42,22 @@ cg.opt.system = function(cmd) 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.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)