scripts
This commit is contained in:
@@ -43,36 +43,26 @@
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
${pkgs.hyprpanel}/bin/hyprpanel sw ''$img
|
${pkgs.hyprpanel}/bin/hyprpanel sw ''$img
|
||||||
changeColors ''$img
|
changeColors ''$img ''$2
|
||||||
'')
|
'')
|
||||||
|
|
||||||
(pkgs.writeShellScriptBin "changeColors" ''
|
(pkgs.writeShellScriptBin "changeColors" ''
|
||||||
|
|
||||||
if [[ ! -d /tmp/nathan ]]; then
|
img=''$(realpath ''$1)
|
||||||
mkdir /tmp/nathan
|
alpha=''${2:-70}
|
||||||
|
|
||||||
|
if [[ ''$alpha -lt 0 ]]; then
|
||||||
|
''$alpha=0
|
||||||
|
elif [[ ''$alpha -gt 100 ]]; then
|
||||||
|
''$alpha=100
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -f /tmp/nathan/colorscheme && -z ''$1 ]]; then
|
if [[ -f "~/.config/wal/colorschemes/dark/''${''$(basename ''$img)}-''$alpha.json" ]]; then
|
||||||
${pkgs.pywal16}/bin/wal -f /tmp/nathan/colorscheme
|
${pkgs.pywal16}/bin/wal -n -f "''${''$(basename ''$img)}-''$alpha"
|
||||||
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 "''${${config.home.homeDirectory}/.config/wal/colorschemes/dark/''$(basename ''$img)-''$alpha}" ]]; then
|
|
||||||
${pkgs.pywal16}/bin/wal -f "''${${config.home.homeDirectory}/.config/wal/colorschemes/dark/''$(basename ''$img)-''$alpha}"
|
|
||||||
else
|
else
|
||||||
${pkgs.pywal16}/bin/wal -i ''$img -a ''$alpha --cols16 -n -p "''${''$(basename ''$img)}-''$alpha}"
|
${pkgs.pywal16}/bin/wal -n -i ''$img -a ''$alpha --cols16 -p "''${''$(basename ''$img)}-''$alpha"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp "''${${config.home.homeDirectory}/.config/wal/colorschemes/dark/''$(basename ''$img)-''$alpha}" /tmp/nathan/colorscheme
|
|
||||||
|
|
||||||
colorPrefix
|
colorPrefix
|
||||||
'')
|
'')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user