Sway: Add wallpaper-video toggle.
This commit is contained in:
parent
894ae96b5e
commit
03fb7207c8
|
@ -1,13 +1,13 @@
|
||||||
{ config, lib, pkgs, ... }: let
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
cfg = config.module.wallpaper;
|
cfg = config.module.wallpaper;
|
||||||
in {
|
in
|
||||||
config = lib.mkMerge [
|
{
|
||||||
(lib.mkIf cfg.video {
|
config = {
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
(pkgs.writeShellScriptBin "wallpaper-video" ''
|
(pkgs.writeShellScriptBin "wallpaper-video" ''
|
||||||
mpvpaper -o 'no-audio --loop-file --panscan=1' '*' ${cfg.videoPath}
|
mpvpaper -o 'no-audio --loop-file --panscan=1' '*' ${cfg.videoPath}
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
})
|
};
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
output * bg @wallpaper@ fill
|
output * bg @wallpaper@ fill
|
||||||
|
bindsym --to-code $mod+z exec swayscript wallpaper_video
|
||||||
|
|
||||||
client.focused "#@accent@" "#@accent@" "#@fg@" "#@accent@" "#@accent@"
|
client.focused "#@accent@" "#@accent@" "#@fg@" "#@accent@" "#@accent@"
|
||||||
client.focused_inactive "#@border@" "#@border@" "#@fg@" "#@border@" "#@border@"
|
client.focused_inactive "#@border@" "#@border@" "#@fg@" "#@border@" "#@border@"
|
||||||
client.unfocused "#@border@" "#@border@" "#@fg@" "#@border@" "#@border@"
|
client.unfocused "#@border@" "#@border@" "#@fg@" "#@border@" "#@border@"
|
||||||
|
|
4
package/swayscript/script/Wallpaper.sh
Normal file
4
package/swayscript/script/Wallpaper.sh
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Toggle video wallpaper.
|
||||||
|
function wallpaper_video() {
|
||||||
|
pkill mpvpaper || wallpaper-video
|
||||||
|
}
|
Loading…
Reference in a new issue