2024-12-13 17:20 : id 478
This commit is contained in:
parent
86239308f2
commit
d17d81ca66
@ -1,7 +1,7 @@
|
||||
{config, pkgs, lib, ... }:
|
||||
let
|
||||
# Theme/Mode
|
||||
THEME = "dracula";
|
||||
THEME = "solarized";
|
||||
MODE = "dark";
|
||||
|
||||
# Colours
|
||||
@ -95,8 +95,8 @@ in
|
||||
file = {
|
||||
"theme.txt" = {
|
||||
text = ''
|
||||
THEME = ${THEME}
|
||||
MODE = ${MODE}
|
||||
THEME = "solarized";
|
||||
MODE = "dark";
|
||||
|
||||
# Colors
|
||||
BG = ${BG}
|
||||
@ -117,7 +117,7 @@ in
|
||||
DARK_CYAN = ${DARK_CYAN}
|
||||
|
||||
# GTK
|
||||
GTK_THEME = ${GTK_THEME}
|
||||
GTK_THEME = "solarized";
|
||||
GTK_THEME_NAME = ${GTK_THEME_NAME}
|
||||
GTK_ICONS = ${GTK_ICONS}
|
||||
GTK_CURSOR = ${GTK_CURSOR}
|
||||
@ -125,10 +125,10 @@ in
|
||||
};
|
||||
"scripts/wallpaper-updater.sh" = {
|
||||
text = ''
|
||||
file_updated="";
|
||||
file="";
|
||||
while sleep 1; do
|
||||
new_file_updated=$(date -r $HOME/theme.txt)
|
||||
if [[ "$new_file_updated" != "$file_updated" ]]; then
|
||||
new_file=$(cat $HOME/theme.txt)
|
||||
if [[ "$new_file" != "$file" ]]; then
|
||||
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:-)" \
|
||||
@ -137,7 +137,7 @@ in
|
||||
wpaperd &
|
||||
kill $oldid
|
||||
fi
|
||||
file_updated=$new_file_updated
|
||||
file=$new_file
|
||||
done
|
||||
'';
|
||||
executable = true;
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 65 KiB |
Loading…
x
Reference in New Issue
Block a user