big hyprland changes

This commit is contained in:
2025-09-15 22:35:05 -05:00
parent 9cb4e51316
commit 668e6117fd
3 changed files with 95 additions and 75 deletions

View File

@@ -19,23 +19,31 @@
(pkgs.writeShellScriptBin "randWallpaper" ''
file=$(ls ${config.home.homeDirectory}/Pictures/Wallpaper/ | shuf -n 1)
setWallpaper ${config.home.homeDirectory}/Pictures/Wallpaper/$file
file=''$(ls ${config.home.homeDirectory}/Pictures/Wallpaper/ | shuf -n 1)
setWallpaper ${config.home.homeDirectory}/Pictures/Wallpaper/''$file
'')
(pkgs.writeShellScriptBin "setWallpaper" ''
if [[ ! -d /tmp/nathan ]]; then
mkdir /tmp/nathan
fi
if [[ ! -f /tmp/nathan/bg ]]; then
cp ${config.home.homeDirectory}/Pictures/Wallpaper/bluescape.jpg /tmp/nathan/bg
chmod 600 /tmp/nathan/bg
img=''$(realpath ''${''$1:-${config.home.homeDirectory}/Pictures/Wallpaper/''$(${pkgs.eza}/bin/eza ${config.home.homeDirectory}/Pictures/Wallpaper -X | rofi -dmenu))}
ext="''${''$(basename ''$img)\##*.}"
if [[ ''$ext == "gif" || ''$ext == "mp4" ]]; then
${pkgs.ffmpeg}/bin/ffmpeg -i ''$img -vframes 1 /tmp/nathan/tmp.jpg
${pkgs.swww}/bin/swww img /tmp/nathan/tmp.jpg -t wipe
sleep 0.3
hyprctl dispatch exec "${pkgs.mpvpaper}/bin/mpvpaper ALL ''$img -o loop"
else
hyprctl dispatch exec ${pkgs.swww}/bin/swww img ''$img -t wipe
fi
img=''$(realpath ''${1:-/tmp/nathan/bg})
hyprctl dispatch exec ${pkgs.swww}/bin/swww img ''$img -t random
${pkgs.hyprpanel}/bin/hyprpanel sw ''$img
changeColors ''$img ''$2
changeColors ''$img
'')
(pkgs.writeShellScriptBin "changeColors" ''
@@ -44,43 +52,40 @@
mkdir /tmp/nathan
fi
if [[ ! -f /tmp/nathan/bg ]]; then
cp ${config.home.homeDirectory}/Pictures/Wallpaper/bluescape.jpg /tmp/nathan/bg
chmod 600 /tmp/nathan/bg
if [[ -f /tmp/nathan/colorscheme && -z ''$1 ]]; then
${pkgs.pywal16}/bin/wal -f /tmp/nathan/colorscheme
else
img=''$(realpath ''$1)
alpha=''${2:-70}
if [[ ''$alpha -lt 0 ]]; then
''$alpha=0
elif [[ ''$alpha -gt 100 ]]; then
''$alpha=100
fi
fi
if [[ ! -f /tmp/nathan/bga ]]; then
echo 70 > /tmp/nathan/bga
if [[ -f "${config.home.homeDirectory}/.config/wal/colorschemes/''${''$(basename ''$img)}-''$alpha" ]]; then
${pkgs.pywal16}/bin/wal -f "${config.home.homeDirectory}/.config/wal/colorschemes/''${''$(basename ''$img)}-''$alpha"
else
${pkgs.pywal16}/bin/wal -i ''$img -a ''$alpha --cols16 -n -p "''${''$(basename ''$img)}-''$alpha"
fi
alpha=''${2:-`cat /tmp/nathan/bga`}
img=''$(realpath ''${1:-/tmp/nathan/bg})
cp "${config.home.homeDirectory}/.config/wal/colorschemes/''${''$(basename ''$img)}-''$alpha" /tmp/nathan/colorscheme
if [[ $alpha -lt 0 ]]; then
$alpha=0
fi
if [[ $alpha -gt 100 ]]; then
$alpha=100
fi
${pkgs.pywal16}/bin/wal -i $img -a $alpha --cols16 -n
echo $alpha > /tmp/nathan/bga
cp $img /tmp/nathan/bg
sleep 0.4
${pkgs.pywalfox-native}/bin/pywalfox update &
[[ $(pidof cava) != "" ]] && pkill -USR1 cava &
for i in $(ls /run/user/1000 | grep nvim); do ${pkgs.neovim-remote}/bin/nvr -s --servername /run/user/1000/$i --remote-send '<cmd>colorscheme pywal<CR>'; done
pkill -USR1 kitty
colorPrefix
'')
(pkgs.writeShellScriptBin "colorPrefix" ''
exec -a "$0" "$@" &
sleep 0.4
${pkgs.pywalfox-native}/bin/pywalfox update &
pkill -USR1 kitty
pidof cava && pkill -USR1 cava
for i in ''$(ls /run/user/1000 | grep nvim); do
${pkgs.neovim-remote}/bin/nvr -s --servername /run/user/1000/''$i --remote-send '<cmd>colorscheme pywal<CR>';
done
'')
(pkgs.writeShellScriptBin "onSystemStart" ''
@@ -88,37 +93,24 @@
mkdir /tmp/nathan
fi
if [[ ! -f /tmp/nathan/bg ]]; then
cp ${config.home.homeDirectory}/Pictures/Wallpaper/bluescape.jpg /tmp/nathan/bg
chmod 600 /tmp/nathan/bg
fi
if [[ ! -f /tmp/nathan/bga ]]; then
echo 70 > /tmp/nathan/bga
fi
if [[ -f ${config.home.homeDirectory}/.local/share/calcurse/.calcurse.pid ]]; then
rm ${config.home.homeDirectory}/.local/share/calcurse/.calcurse.pid
fi
hyprctl dispatch exec ${pkgs.swww}/bin/swww-daemon
hyprctl dispatch exec "setWallpaper /tmp/nathan/bg"
hyprctl --batch "\
dispatch exec ${pkgs.swww}/bin/swww-daemon\
dispatch exec setWallpaper /tmp/nathan/bg\
hyprctl dispatch exec ${pkgs.pyprland}/bin/pypr
hyprctl dispatch exec ${pkgs.netbird-ui}/bin/netbird-ui
hyprctl dispatch exec ${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent
hyprctl setcursor Bibata-Modern-Classic 16
dispatch exec ${pkgs.pyprland}/bin/pypr\
dispatch exec ${pkgs.netbird-ui}/bin/netbird-ui\
dispatch exec ${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent\
setcursor Bibata-Modern-Classic 16"
sleep 3
hyprctl reload
hyprctl dispatch exec ${pkgs.pyprland}/bin/pypr toggle calendar
#tmux new-session -s hyprland
'')
(pkgs.writeShellScriptBin "colorPrefix" ''
exec -a "$0" "$@" &
sleep 0.4 && changeColors &
'')
] ++ (if config.homeconfig.standalone.enable then [
(pkgs.writeShellScriptBin "_homeRebuild" ''