fix startup script
This commit is contained in:
@@ -24,21 +24,21 @@
|
|||||||
'')
|
'')
|
||||||
|
|
||||||
(pkgs.writeShellScriptBin "setWallpaper" ''
|
(pkgs.writeShellScriptBin "setWallpaper" ''
|
||||||
img=''$(realpath ''${1:-~/.cache/bg})
|
img=''$(realpath ''${1:-~/.config/background})
|
||||||
|
chmod 600 ~/.config/background
|
||||||
${pkgs.hyprpanel}/bin/hyprpanel sw ''$img
|
${pkgs.hyprpanel}/bin/hyprpanel sw ''$img
|
||||||
${pkgs.swww}/bin/swww img ''$img
|
|
||||||
changeColors ''$img ''$2
|
changeColors ''$img ''$2
|
||||||
'')
|
'')
|
||||||
|
|
||||||
(pkgs.writeShellScriptBin "changeColors" ''
|
(pkgs.writeShellScriptBin "changeColors" ''
|
||||||
|
|
||||||
if [[ $(ls ~/.cache/ | grep bga) != bga ]]; then
|
if [[ $(ls ~/.config/ | grep bga) != bga ]]; then
|
||||||
echo 100 > ~/.cache/bga
|
echo 100 > ~/.config/bga
|
||||||
fi
|
fi
|
||||||
|
|
||||||
alpha=''${2:-`cat ~/.cache/bga`}
|
alpha=''${2:-`cat ~/.config/bga`}
|
||||||
|
|
||||||
img=''$(realpath ''${1:-~/.cache/bg})
|
img=''$(realpath ''${1:-~/.config/background})
|
||||||
|
|
||||||
if [[ $alpha -lt 0 ]]; then
|
if [[ $alpha -lt 0 ]]; then
|
||||||
$alpha=0
|
$alpha=0
|
||||||
@@ -50,11 +50,8 @@
|
|||||||
|
|
||||||
wal -i $img -a $alpha --cols16 -n
|
wal -i $img -a $alpha --cols16 -n
|
||||||
|
|
||||||
echo $alpha > ~/.cache/bga
|
echo $alpha > ~/.config/bga
|
||||||
|
|
||||||
rm ~/.cache/bg
|
|
||||||
ln -s $img ~/.cache/bg
|
|
||||||
|
|
||||||
sleep 0.4
|
sleep 0.4
|
||||||
|
|
||||||
pywalfox update &
|
pywalfox update &
|
||||||
|
|||||||
Reference in New Issue
Block a user