some more optimizations
This commit is contained in:
@ -6,6 +6,11 @@ in {
|
||||
options = {
|
||||
userSettings.emacs = {
|
||||
enable = lib.mkEnableOption "Enable emacs";
|
||||
opacity = lib.mkOption {
|
||||
default = 85;
|
||||
type = lib.types.number;
|
||||
description = "Emacs' percentage opacity as a whole number";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@ -70,6 +75,9 @@ in {
|
||||
template = builtins.readFile ./lib/doom-stylix-theme.el.mustache;
|
||||
extension = ".el";
|
||||
};
|
||||
home.file.".config/emacs/sysvars.el".text = ''
|
||||
(setq systemOpacity ${builtins.toString config.userSettings.emacs.opacity})
|
||||
'';
|
||||
wayland.windowManager.hyprland.settings.exec-once = lib.optionals config.wayland.windowManager.hyprland.enable [ "emacs --daemon" ];
|
||||
};
|
||||
}
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
;; organize everything with use-package
|
||||
(require 'use-package)
|
||||
(load (expand-file-name "~/.config/emacs/sysvars.el"))
|
||||
|
||||
;; use-package-ception
|
||||
(use-package use-package
|
||||
@ -28,9 +29,9 @@
|
||||
(setq inhibit-startup-message t)
|
||||
|
||||
;; Transparent background
|
||||
(set-frame-parameter nil 'alpha-background 85)
|
||||
(add-to-list 'default-frame-alist '(alpha-background . 85))
|
||||
(add-to-list 'default-frame-alist '(inhibit-double-buffering . t))
|
||||
(set-frame-parameter nil 'alpha-background systemOpacity)
|
||||
(add-to-list 'default-frame-alist '(alpha-background . systemOpacity))
|
||||
;;(add-to-list 'default-frame-alist '(inhibit-double-buffering . t))
|
||||
|
||||
;; I want declarative config, no custom
|
||||
(setq custom-file "/dev/null")
|
||||
|
@ -5,6 +5,7 @@ let
|
||||
term = config.userSettings.terminal;
|
||||
spawnEditor = config.userSettings.spawnEditor;
|
||||
spawnBrowser = config.userSettings.spawnBrowser;
|
||||
performance = config.userSettings.hyprland.performanceOptimizations;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
@ -20,7 +21,10 @@ in
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
userSettings.alacritty.enable = true;
|
||||
programs.alacritty.settings.window.opacity = lib.mkOverride 40 (if performance then 1.0 else 0.85);
|
||||
userSettings.kitty.enable = true;
|
||||
programs.kitty.settings.background_opacity = lib.mkOverride 40 (if performance then "1.0" else "0.85");
|
||||
userSettings.emacs.opacity = lib.mkOverride 40 (if performance then 100 else 85);
|
||||
userSettings.dmenuScripts = {
|
||||
enable = true;
|
||||
dmenuCmd = "fuzzel -d";
|
||||
@ -450,8 +454,8 @@ in
|
||||
then
|
||||
nwggrid -client
|
||||
else
|
||||
GDK_PIXBUF_MODULE_FILE=${pkgs.librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache nwggrid-server -layer-shell-exclusive-zone -1 -g adw-gtk3 -o 0.55 -b ${config.lib.stylix.colors.base00}
|
||||
sleep 0.5 && nwggrid -client
|
||||
GDK_PIXBUF_MODULE_FILE=${pkgs.librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache nwggrid-server -layer-shell-exclusive-zone -1 -g adw-gtk3 -o 0.55 -b ${config.lib.stylix.colors.base00} &
|
||||
sleep 0.6 && nwggrid -client
|
||||
fi
|
||||
'')
|
||||
(pkgs.writeScriptBin "hyprgamemode" ''
|
||||
|
Reference in New Issue
Block a user