feat: add open/close animations to widgets
This commit is contained in:
parent
8eabd0d05a
commit
230cb0df52
11 changed files with 66 additions and 18 deletions
eww/scripts
17
eww/scripts/close-opened.sh
Executable file
17
eww/scripts/close-opened.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Store the output of the command in an array, keeping only lines with '*'
|
||||
readarray -t array <<< "$(eww windows | grep '^\*')"
|
||||
|
||||
# Remove the '*' from each element
|
||||
for ((i=0; i<${#array[@]}; i++))
|
||||
do
|
||||
array[i]=${array[i]#'*'}
|
||||
array[i]=${array[i]%-reveal}
|
||||
done
|
||||
|
||||
# Print the elements of the array
|
||||
for element in "${array[@]}"
|
||||
do
|
||||
$HOME/.config/eww/scripts/close.sh "$element"
|
||||
done
|
8
eww/scripts/close.sh
Executable file
8
eww/scripts/close.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
WINDOW="$1"
|
||||
(
|
||||
eww update $WINDOW-visible=false
|
||||
sleep .55
|
||||
eww close $WINDOW-reveal
|
||||
) &
|
6
eww/scripts/open.sh
Executable file
6
eww/scripts/open.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
WINDOW="$1"
|
||||
|
||||
eww open $WINDOW-reveal
|
||||
eww update $WINDOW-visible=true
|
Loading…
Add table
Add a link
Reference in a new issue