mirror of
https://gitlab.com/Zaney/zaneyos.git
synced 2025-06-26 15:01:45 +02:00
Trying to fix swaync reloading it's still a pain, and improve wallpaper script next
This commit is contained in:
parent
85c2e0e8c0
commit
e370d6dc9d
@ -1,4 +1,5 @@
|
|||||||
{ pkgs, config, lib, browser, deviceProfile, ... }:
|
{ pkgs, config, lib, browser,
|
||||||
|
deviceProfile, wallpaperDir, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
theme = config.colorScheme.colors;
|
theme = config.colorScheme.colors;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{ pkgs, config, browser, wallpaperDir, flakeDir, ... }:
|
{ pkgs, config, browser, wallpaperDir, flakeDir,
|
||||||
|
username, wallpaperGit, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
# Install Packages For The User
|
# Install Packages For The User
|
||||||
@ -12,7 +13,8 @@
|
|||||||
(import ./../scripts/emopicker9000.nix { inherit pkgs; })
|
(import ./../scripts/emopicker9000.nix { inherit pkgs; })
|
||||||
(import ./../scripts/task-waybar.nix { inherit pkgs; })
|
(import ./../scripts/task-waybar.nix { inherit pkgs; })
|
||||||
(import ./../scripts/squirtle.nix { inherit pkgs; })
|
(import ./../scripts/squirtle.nix { inherit pkgs; })
|
||||||
(import ./../scripts/wallsetter.nix { inherit pkgs; inherit wallpaperDir; })
|
(import ./../scripts/wallsetter.nix { inherit pkgs; inherit wallpaperDir;
|
||||||
|
inherit username; inherit wallpaperGit; })
|
||||||
(import ./../scripts/themechange.nix { inherit pkgs; inherit flakeDir; })
|
(import ./../scripts/themechange.nix { inherit pkgs; inherit flakeDir; })
|
||||||
(import ./../scripts/theme-selector.nix { inherit pkgs; })
|
(import ./../scripts/theme-selector.nix { inherit pkgs; })
|
||||||
];
|
];
|
||||||
|
@ -11,6 +11,6 @@ pkgs.writeShellScriptBin "theme-selector" ''
|
|||||||
themechange "$chosen"
|
themechange "$chosen"
|
||||||
else
|
else
|
||||||
${pkgs.libnotify}/bin/notify-send "$chosen is building please wait" &
|
${pkgs.libnotify}/bin/notify-send "$chosen is building please wait" &
|
||||||
kitty -e themechange "$chosen"
|
themechange "$chosen"
|
||||||
fi
|
fi
|
||||||
''
|
''
|
||||||
|
@ -6,9 +6,8 @@ pkgs.writeShellScriptBin "themechange" ''
|
|||||||
else
|
else
|
||||||
replacement="$1"
|
replacement="$1"
|
||||||
sed -i "/^\s*theme[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$replacement\"/" ${flakeDir}/flake.nix
|
sed -i "/^\s*theme[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$replacement\"/" ${flakeDir}/flake.nix
|
||||||
sudo nixos-rebuild switch --flake ${flakeDir}
|
pkexec nixos-rebuild switch --flake ${flakeDir}
|
||||||
sleep 1
|
${pkgs.swaynotificationcenter}/bin/swaync-client -R &
|
||||||
${pkgs.swaynotificationcenter}/bin/swaync-client -R
|
${pkgs.swaynotificationcenter}/bin/swaync-client -rs &
|
||||||
${pkgs.swaynotificationcenter}/bin/swaync-client -rs
|
|
||||||
fi
|
fi
|
||||||
''
|
''
|
||||||
|
@ -1,17 +1,20 @@
|
|||||||
{ pkgs, wallpaperDir, }:
|
{ pkgs, username, wallpaperDir, wallpaperGit, ... }:
|
||||||
|
|
||||||
pkgs.writeShellScriptBin "wallsetter" ''
|
pkgs.writeShellScriptBin "wallsetter" ''
|
||||||
TIMEOUT=720
|
TIMEOUT=720
|
||||||
TRANSITION1="--transition-type wave --transition-angle 120 --transition-step 30"
|
TRANSITION1="--transition-type wave --transition-angle 120 --transition-step 30"
|
||||||
TRANSITION2="--transition-type wipe --transition-angle 30 --transition-step 30"
|
TRANSITION2="--transition-type wipe --transition-angle 30 --transition-step 30"
|
||||||
TRANSITION3="--transition-type center --transition-step 30"
|
TRANSITION3="--transition-type center --transition-step 30"
|
||||||
TRANSITION4="--transition-type outer --transition-pos 0.3,0.8 --transition-step 30"
|
TRANSITION4="--transition-type outer --transition-pos 0.3,0.8 --transition-step 30"
|
||||||
TRANSITION5="--transition-type wipe --transition-angle 270 --transition-step 30"
|
TRANSITION5="--transition-type wipe --transition-angle 270 --transition-step 30"
|
||||||
WALLPAPER=$(find ${wallpaperDir}/* -type f | shuf -n 1)
|
WALLPAPER=$(find ${wallpaperDir}/* -type f | shuf -n 1)
|
||||||
PREVIOUS=$WALLPAPER
|
PREVIOUS=$WALLPAPER
|
||||||
|
rm -rf ${wallpaperDir}
|
||||||
while true;
|
${pkgs.git}/bin/git clone ${wallpaperGit} ${wallpaperDir}
|
||||||
do
|
sleep 1
|
||||||
|
chown -R ${username}:users ${wallpaperDir}
|
||||||
|
while true;
|
||||||
|
do
|
||||||
if [ $WALLPAPER == $PREVIOUS ]
|
if [ $WALLPAPER == $PREVIOUS ]
|
||||||
then
|
then
|
||||||
WALLPAPER=$(find ${wallpaperDir}/* -type f | shuf -n 1)
|
WALLPAPER=$(find ${wallpaperDir}/* -type f | shuf -n 1)
|
||||||
@ -38,5 +41,5 @@ do
|
|||||||
${pkgs.swww}/bin/swww img $WALLPAPER $TRANSITION
|
${pkgs.swww}/bin/swww img $WALLPAPER $TRANSITION
|
||||||
sleep $TIMEOUT
|
sleep $TIMEOUT
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
''
|
''
|
||||||
|
@ -2,15 +2,8 @@
|
|||||||
wallpaperGit, username, ... }:
|
wallpaperGit, username, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
system.activationScripts = {
|
# system.userActivationScripts = {
|
||||||
gitwallpapers.text = ''
|
# gitwallpapers.text = ''
|
||||||
if [ -d ${wallpaperDir} ]; then
|
# '';
|
||||||
cd ${wallpaperDir}
|
# };
|
||||||
${pkgs.git}/bin/git pull
|
|
||||||
else
|
|
||||||
${pkgs.git}/bin/git clone ${wallpaperGit} ${wallpaperDir}
|
|
||||||
chown -R ${username}:users ${wallpaperDir}
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
# List System Programs
|
# List System Programs
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
wget curl cmatrix lolcat neofetch htop btop libvirt
|
wget curl git cmatrix lolcat neofetch htop btop libvirt
|
||||||
polkit_gnome lm_sensors unzip unrar libnotify
|
polkit_gnome lm_sensors unzip unrar libnotify
|
||||||
v4l-utils ydotool wl-clipboard socat cowsay lsd
|
v4l-utils ydotool wl-clipboard socat cowsay lsd
|
||||||
pkg-config meson hugo gnumake ninja go nodejs symbola
|
pkg-config meson hugo gnumake ninja go nodejs symbola
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
gitEmail = "tylerzanekelley@gmail.com";
|
gitEmail = "tylerzanekelley@gmail.com";
|
||||||
theLocale = "en_US.UTF-8";
|
theLocale = "en_US.UTF-8";
|
||||||
theTimezone = "America/Chicago";
|
theTimezone = "America/Chicago";
|
||||||
theme = "catppuccin-mocha";
|
theme = "catppuccin-frappe";
|
||||||
browser = "firefox";
|
browser = "firefox";
|
||||||
wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git";
|
wallpaperGit = "https://gitlab.com/Zaney/my-wallpapers.git";
|
||||||
wallpaperDir = "/home/${username}/Pictures/Wallpapers";
|
wallpaperDir = "/home/${username}/Pictures/Wallpapers";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user