mirror of
https://github.com/EdenQwQ/nixos.git
synced 2026-02-22 21:05:50 +08:00
swww -> awww
This commit is contained in:
parent
8275c96e4f
commit
ce73753052
9 changed files with 143 additions and 68 deletions
|
|
@ -13,7 +13,7 @@
|
|||
# ./mango
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
swww
|
||||
awww
|
||||
swaybg
|
||||
kanshi
|
||||
wlsunset
|
||||
|
|
|
|||
|
|
@ -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 &
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@
|
|||
];
|
||||
layer-rules = [
|
||||
{
|
||||
matches = [ { namespace = "swww-daemonbackdrop"; } ];
|
||||
matches = [ { namespace = "awww-daemonbackdrop"; } ];
|
||||
place-within-backdrop = true;
|
||||
}
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue