Compare commits

...

7 Commits

Author SHA1 Message Date
deadvey
f7c6be64f4 2024-12-13 18:43 : id 493 2024-12-13 18:43:04 +00:00
deadvey
f54201b3ee 2024-12-13 17:52 : id 488 2024-12-13 17:52:53 +00:00
deadvey
4d8e99746f 2024-12-13 17:52 : id 487 2024-12-13 17:52:29 +00:00
deadvey
22cfdcc29e 2024-12-13 17:30 : id 482 2024-12-13 17:30:49 +00:00
deadvey
669520cc66 2024-12-13 17:28 : id 480 2024-12-13 17:28:42 +00:00
deadvey
d17d81ca66 2024-12-13 17:20 : id 478 2024-12-13 17:20:50 +00:00
deadvey
86239308f2 2024-12-13 17:19 : id 475 2024-12-13 17:19:12 +00:00
3 changed files with 80 additions and 11 deletions

View File

@ -1,7 +1,7 @@
{config, pkgs, lib, ... }:
let
# Theme/Mode
THEME = "dracula";
THEME = "mocha";
MODE = "dark";
# Colours
@ -93,21 +93,53 @@ in
size = 16;
};
file = {
"theme.sh" = {
text = ''
THEME="${THEME}";
MODE="${MODE}";
# Colors
BG="${BG}"
FG="${RED}"
GRAY="${GRAY}"
DARK_GRAY="${DARK_GRAY}"
RED="${RED}"
DARK_RED="${DARK_RED}"
GREEN="${GREEN}"
DARK_GREEN="${DARK_GREEN}"
YELLOW="${YELLOW}"
DARK_YELLOW="${DARK_YELLOW}"
BLUE="${BLUE}"
DARK_BLUE="${DARK_BLUE}"
PURPLE="${PURPLE}"
DARK_PURPLE="${DARK_PURPLE}"
CYAN="${CYAN}"
DARK_CYAN="${DARK_CYAN}"
ACCENT="${ACCENT}"
# GTK
GTK_THEME="${GTK_THEME}";
GTK_THEME_NAME="${GTK_THEME_NAME}"
GTK_ICONS="${GTK_ICONS}"
GTK_CURSOR="${GTK_CURSOR}"
'';
};
"scripts/wallpaper-updater.sh" = {
text = ''
file_updated="";
file="";
while sleep 1; do
new_file_updated=$(date -r ${WALLPAPER_PATH})
if [[ "$new_file_updated" != "$file_updated" ]]; then
new_file=$(cat $HOME/theme.sh)
if [[ "$new_file" != "$file" ]]; then
source $HOME/theme.sh
magick ${WALLPAPER_PATH} \
-fuzz 10% -fill "#${BG}" -opaque "$(convert ${WALLPAPER_PATH} -format "%[pixel:u.p{0,0}]" info:-)" \
-fuzz 10% -fill "#${ACCENT}" -opaque "$(convert ${WALLPAPER_PATH} -format "%[pixel:u.p{3475,1627}]" info:-)" \
-fuzz 10% -fill "#$BG" -opaque "$(convert ${WALLPAPER_PATH} -format "%[pixel:u.p{0,0}]" info:-)" \
-fuzz 10% -fill "#$ACCENT" -opaque "$(convert ${WALLPAPER_PATH} -format "%[pixel:u.p{3475,1627}]" info:-)" \
${WALLPAPER_PATH}
oldid=$(pgrep wpaperd)
wpaperd &
kill $oldid
fi
file_updated=$(date -r ${WALLPAPER_PATH})
file=$new_file
done
'';
executable = true;
@ -116,8 +148,8 @@ in
text = ''
echo theme = $1
echo mode = $2
sed -i "s/THEME\ =\ ".*"/THEME\ =\ \"''${1}\";/" $HOME/.config/home-manager/home.nix
sed -i "s/MODE\ =\ ".*"/MODE\ =\ \"''${2}\";/" $HOME/.config/home-manager/home.nix
sed -i "s/THEME\ =\ ".*";/THEME\ =\ \"''${1}\";/" $HOME/.config/home-manager/home.nix
sed -i "s/MODE\ =\ ".*";/MODE\ =\ \"''${2}\";/" $HOME/.config/home-manager/home.nix
home-manager switch
'';
executable = true;
@ -369,7 +401,7 @@ in
width = SCREEN_WIDTH - 10;
modules-left = [ "network" ];
modules-right = [ "pulseaudio" ];
modules-center = ["custom/gruvbox" "custom/nord" "custom/solarized" "custom/dracula"];
modules-center = ["custom/gruvbox" "custom/nord" "custom/solarized" "custom/dracula" "custom/mocha"];
"network" = {
interface = "enp42s0";
interval = 10;
@ -393,6 +425,10 @@ in
on-click = "$HOME/scripts/theme-switcher.sh dracula ${MODE}";
format = "🧛";
};
"custom/mocha" = {
on-click = "$HOME/scripts/theme-switcher.sh mocha ${MODE}";
format = "🌿";
};
"pulseaudio" = {
format = "{icon} {volume}%";
format-muted = "X";
@ -471,7 +507,8 @@ in
#custom-gruvbox,
#custom-nord,
#custom-solarized,
#custom-dracula {
#custom-dracula,
#custom-mocha {
color: #${FG};
background: #${BG};
border: ${BORDER_WIDTH}px solid #${ACCENT};

View File

@ -0,0 +1,32 @@
{
BG="1e1e2e";
FG="cdd6f4";
GRAY="9399b2";
DARK_GRAY="45475a";
RED="eba0ac";
DARK_RED="f38ba8";
GREEN="94e2d5";
DARK_GREEN="a6e3a1";
YELLOW="f9e2af";
DARK_YELLOW="fab387";
BLUE="b4befe";
DARK_BLUE="89b4fa";
PURPLE="f5c2e7";
DARK_PURPLE="cba6f7";
CYAN="89dceb";
DARK_CYAN="74c7ec";
GTK_THEME = "catppuccin-gtk";
GTK_THEME_NAME = "catppuccin-frappe-blue-standard";
GTK_ICONS = "zafiro-icons";
GTK_ICONS_NAME = "Zafiro-icons-Dark";
GTK_CURSOR = "catppuccin-cursors";
GTK_CURSOR_NAME = "mochaGreen";
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 65 KiB