Compare commits
7 Commits
d6aa6968a6
...
f7c6be64f4
Author | SHA1 | Date | |
---|---|---|---|
|
f7c6be64f4 | ||
|
f54201b3ee | ||
|
4d8e99746f | ||
|
22cfdcc29e | ||
|
669520cc66 | ||
|
d17d81ca66 | ||
|
86239308f2 |
@ -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};
|
||||
|
32
home-manager/themes/mocha_dark.nix
Normal file
32
home-manager/themes/mocha_dark.nix
Normal 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 |
Loading…
Reference in New Issue
Block a user