mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2025-06-20 19:58:47 +02:00
Adding Theme Changing Script
This commit is contained in:
parent
3bb920a1df
commit
78f5931d70
@ -76,6 +76,8 @@ env = QT_QPA_PLATFORM, wayland
|
||||
env = QT_WAYLAND_DISABLE_WINDOWDECORATION, 1
|
||||
env = QT_AUTO_SCREEN_SCALE_FACTOR, 1
|
||||
env = MOZ_ENABLE_WAYLAND, 1
|
||||
#env = WLR_NO_HARDWARE_CURSORS,1
|
||||
#env = WLR_RENDERER_ALLOW_SOFTWARE,1
|
||||
|
||||
exec-once = dbus-update-activation-environment --systemd --all
|
||||
exec-once = systemctl --user import-environment QT_QPA_PLATFORMTHEME WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||
|
11
config/scripts/themechange.nix
Normal file
11
config/scripts/themechange.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{ pkgs, flakeDir, }:
|
||||
|
||||
pkgs.writeShellScriptBin "themechange" ''
|
||||
if [[ ! $@ ]];then
|
||||
echo "No Theme Given"
|
||||
else
|
||||
replacement="$1"
|
||||
sed -i "/^\s*theme[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$replacement\"/" ${flakeDir}/flake.nix
|
||||
fi
|
||||
|
||||
''
|
@ -22,8 +22,9 @@
|
||||
theTimezone = "America/Chicago";
|
||||
theme = "tokyo-night-storm";
|
||||
browser = "firefox";
|
||||
wallpaperDir = "/home/${username}/Pictures/Wallpapers";
|
||||
wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git";
|
||||
wallpaperDir = "/home/${username}/Pictures/Wallpapers";
|
||||
flakeDir = "/home/zaney/zaneyos";
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
@ -61,7 +62,7 @@
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.extraSpecialArgs = { inherit username;
|
||||
inherit gitUsername; inherit gitEmail; inherit inputs; inherit theme;
|
||||
inherit browser; inherit wallpaperDir; inherit wallpaperGit;
|
||||
inherit browser; inherit wallpaperDir; inherit wallpaperGit; inherit flakeDir;
|
||||
inherit (inputs.nix-colors.lib-contrib {inherit pkgs;}) gtkThemeFromScheme;
|
||||
};
|
||||
home-manager.useGlobalPkgs = true;
|
||||
|
4
home.nix
4
home.nix
@ -1,6 +1,7 @@
|
||||
{ config, pkgs, inputs, username,
|
||||
gitUsername, gitEmail, gtkThemeFromScheme,
|
||||
theme, browser, wallpaperDir, wallpaperGit, ... }:
|
||||
theme, browser, wallpaperDir, wallpaperGit,
|
||||
flakeDir, ... }:
|
||||
|
||||
{
|
||||
# Home Manager Settings
|
||||
@ -68,6 +69,7 @@
|
||||
(import ./config/scripts/task-waybar.nix { inherit pkgs; })
|
||||
(import ./config/scripts/squirtle.nix { inherit pkgs; })
|
||||
(import ./config/scripts/wallsetter.nix { inherit pkgs; inherit wallpaperDir; })
|
||||
(import ./config/scripts/themechange.nix { inherit pkgs; inherit flakeDir; })
|
||||
];
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user