swww -> awww

This commit is contained in:
EdenQwQ 2026-02-21 12:24:04 +08:00
parent 8275c96e4f
commit ce73753052
9 changed files with 143 additions and 68 deletions

View file

@ -13,7 +13,7 @@
# ./mango
];
home.packages = with pkgs; [
swww
awww
swaybg
kanshi
wlsunset

View file

@ -330,7 +330,7 @@
autostart_sh =
let
setWallpaper = monitor: ''
swww img --namespace background -o ${monitor} ~/Pictures/Wallpapers/generated/$(cat ~/.cache/swww/${monitor} | cut -d'/' -f7 | cut -d'-' -f2- | sd "\-blurred" "")
awww img --namespace background -o ${monitor} ~/Pictures/Wallpapers/generated/$(cat ~/.cache/awww/${monitor} | cut -d'/' -f7 | cut -d'-' -f2- | sd "\-blurred" "")
'';
in
''
@ -338,8 +338,8 @@
killall swhks
swhks &
doas swhkd -c ~/.config/mango/swhkdrc &
swww kill
swww-daemon --namespace background &
awww kill
awww-daemon --namespace background &
killall clash-meta
clash-meta -d ~/.config/clash &
wlsunset -s 00:00 -S 00:00 -t 5000 -T 5001 &

View file

@ -9,7 +9,7 @@ let
niri-autostart = pkgs.writeShellApplication {
name = "niri-autostart";
runtimeInputs = with pkgs; [
swww
awww
mihomo
wlsunset
systemd
@ -26,20 +26,20 @@ let
killall swhks
swhks &
doas swhkd -c ~/.config/niri/swhkd/niri.swhkdrc &
swww kill
swww-daemon --namespace "background" &
swww-daemon --namespace "backdrop" &
# swww restore --namespace "background"
# swww restore --namespace "backdrop"
awww kill
awww-daemon --namespace "background" &
awww-daemon --namespace "backdrop" &
# awww restore --namespace "background"
# awww restore --namespace "backdrop"
mihomo -d ~/.config/clash &
wlsunset -s 00:00 -S 00:00 -t 5000 -T 5001 &
''
+ (
builtins.attrNames config.monitors
|> map (monitor: [
"swww img --namespace background -o ${monitor} \"/home/${user}/Pictures/Wallpapers/generated/$(cat ~/Pictures/Wallpapers/${monitor}-file)\""
"awww img --namespace background -o ${monitor} \"/home/${user}/Pictures/Wallpapers/generated/$(cat ~/Pictures/Wallpapers/${monitor}-file)\""
"sleep 0.2"
"swww img --namespace backdrop -o ${monitor} \"/home/${user}/Pictures/Wallpapers/generated/$(cat ~/Pictures/Wallpapers/${monitor}-blurred-file)\""
"awww img --namespace backdrop -o ${monitor} \"/home/${user}/Pictures/Wallpapers/generated/$(cat ~/Pictures/Wallpapers/${monitor}-blurred-file)\""
"sleep 0.2"
])
|> builtins.concatLists

View file

@ -115,7 +115,7 @@
];
layer-rules = [
{
matches = [ { namespace = "swww-daemonbackdrop"; } ];
matches = [ { namespace = "awww-daemonbackdrop"; } ];
place-within-backdrop = true;
}
{

View file

@ -6,8 +6,8 @@ if [ -z $wall ]; then
exit 1
fi
output=$(niri msg -j focused-output | jq -r .name)
swww img -o $output $wallpapers_dir/$wall --transition-type random --transition-duration 1 --namespace background
awww img -o $output $wallpapers_dir/$wall --transition-type random --transition-duration 1 --namespace background
blurwall=$(echo $wall | sed 's/\.jpg$/-blurred.jpg/')
swww img -o $output $wallpapers_dir/$blurwall --transition-type fade --namespace backdrop
awww img -o $output $wallpapers_dir/$blurwall --transition-type fade --namespace backdrop
echo $wall > $HOME/Pictures/Wallpapers/"$output"-file
echo $blurwall > $HOME/Pictures/Wallpapers/"$output"-blurred-file

View file

@ -4,4 +4,4 @@ wall=$(yad --file)
if [[ $wall == "" ]]; then
exit
fi
swww img $wall --transition-type random --transition-duration 1
awww img $wall --transition-type random --transition-duration 1