{pkgs, ...}: let clock = pkgs.writeShellScriptBin "clock" '' # Prüfen, ob Clock-Fenster existiert WIN_ID=$(hyprctl clients -j | jq -r '.[] | select(.title=="clock") | .address') if [ -n "$WIN_ID" ]; then # Fenster existiert → direkt schließen hyprctl dispatch killwindow address:$WIN_ID else # Fenster existiert nicht → starten, detached setsid kitty --title clock -e zsh -c "watch -n1 -t date +%H:%M; exec zsh" >/dev/null 2>&1 & fi ''; theme-toggle = pkgs.writeShellScriptBin "theme-toggle" '' # Check current wallpaper by looking at a state file theme_file="$HOME/.theme" if [[ -f "$theme_file" && $(cat "$theme_file") == "dark" ]]; then # Switch to light mode hyprctl hyprpaper wallpaper , "/home/builder/wallpapers/white.png" kitty +kitten themes --reload-in=all zenwritten_light echo "light" > "$theme_file" # Update kitty theme for all instances for socket in /tmp/kitty-*; do ${pkgs.kitty}/bin/kitty @ --to unix:$socket set-colors --all --configured ~/.config/kitty/themes/zenwritten_light.conf done else # Switch to dark mode hyprctl hyprpaper wallpaper , "/home/builder/wallpapers/black.png" kitty +kitten themes --reload-in=all zenwritten_dark echo "dark" > "$theme_file" # Update kitty theme for all instances for socket in /tmp/kitty-*; do ${pkgs.kitty}/bin/kitty @ --to unix:$socket set-colors --all --configured ~/.config/kitty/themes/zenwritten_dark.conf done fi ''; in { home.packages = with pkgs; [ codex imagemagick protonplus #wine #wineWowPackages.waylandFull #winetricks #wine64 clock claude-code luajitPackages.magick keepassxc kitty khal sc-im sshfs profanity tmsu qutebrowser dmenu vdirsyncer theme-toggle udiskie ]; }