add background render screenshot

This commit is contained in:
Ingolf Wagner 2022-10-18 09:32:28 +02:00
parent 759db4e208
commit 990c392513
Signed by: palo
GPG key ID: 76BF5F1928B9618B

View file

@ -11,6 +11,21 @@ let
background = theme.base03;
};
backgroundCommand = pkgs.writers.writeDash "background" ''
${pkgs.xorg.xrandr}/bin/xrandr | grep " connected" | \
${pkgs.gnused}/bin/sed -E "s/primary //" | \
${pkgs.coreutils-full}/bin/cut -d' ' -f 3 | \
${pkgs.gnused}/bin/sed -E 's/\+.*$//g' | \
${pkgs.coreutils-full}/bin/sort -r | \
${pkgs.coreutils-full}/bin/head -n 1 | \
${pkgs.gawk}/bin/awk -F 'x' '{print "--width="$1" --height="$2}' | \
${pkgs.findutils}/bin/xargs \
${pkgs.polygon-art.polygon-art}/bin/rings \
/dev/shm/background.png && \
${pkgs.feh}/bin/feh --bg-scale /dev/shm/background.png
'';
in
{
home-manager.users.mainUser = {
@ -183,6 +198,8 @@ in
"${cfg.config.modifier}+Shift+f" = "floating toggle";
#"${cfg.config.modifier}+space" = "focus mode_toggle";
"${cfg.config.modifier}+b" = "exec ${backgroundCommand}";
"${cfg.config.modifier}+p" = "focus parent";
"${cfg.config.modifier}+Shift+minus" = "move scratchpad";