fix window title, screenshots not working, added default window image
|
@ -19,7 +19,8 @@ trun() {
|
|||
img() {
|
||||
window=$1
|
||||
windows_images_dir=$HOME/.config/hyprmsn/windows
|
||||
window_img="$windows_images_dir/$(ls $windows_images_dir | grep -F $window)"
|
||||
window_no_slash=$(echo $window | sed 's|/|⁄|g')
|
||||
window_img="$windows_images_dir/$(ls $windows_images_dir | grep -F $window_no_slash | tail -1)"
|
||||
if [[ $window_img == "$windows_images_dir/" ]]; then
|
||||
window_img="$windows_images_dir/default.png"
|
||||
fi
|
||||
|
@ -34,6 +35,7 @@ windows=$(hyprctl clients | rg 'Window ([A-Fa-f0-9]+)' | sed -E 's/.*\-> (.*):/\
|
|||
for window in $windows; do
|
||||
window_str=$(trun $window)
|
||||
window_img=$(img $window)
|
||||
#echo $window_img
|
||||
eww="(box :orientation \"v\" :class \"window-box\" (image :path \"$window_img\" :image-width 192 :image-height 108) (button :onclick \"scripts/move_to_window.sh \'$window\'\" :class \"window-button\" (box :orientation \"v\" "
|
||||
for string in $(echo -e $window_str); do
|
||||
eww="$eww $(echo -e "(label :text \"$string\")")"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
missioncontroldir=$HOME/.config/hyprmsn
|
||||
mkdir $missioncontroldir/windows 2> /dev/null
|
||||
window=$(hyprctl activewindow -j | jq --raw-output .title)
|
||||
rm -rf $missioncontroldir/windows/* 2> /dev/null
|
||||
rm -rf $missioncontroldir/windows/*.jpeg 2> /dev/null
|
||||
|
||||
while true; do
|
||||
new_window=$(hyprctl activewindow -j | jq --raw-output .title)
|
||||
|
@ -13,11 +13,13 @@ while true; do
|
|||
fi
|
||||
window=$new_window
|
||||
|
||||
window_str=$(echo $new_window | sed -e 's/[]\/$*.^[]/\\&/g') #| sed 's/\[\([^]]*\)\]/\\[\1\\]/g') #add \ to []
|
||||
window_str=$(echo $window | sed -e 's/[]\/$*.^[]/\\&/g') #| sed 's/\[\([^]]*\)\]/\\[\1\\]/g') #add \ to []
|
||||
window_no_slash=$(echo $window | sed 's|/|⁄|g')
|
||||
echo $window_no_slash
|
||||
|
||||
at_size=$(hyprctl clients | sed -n "/$window_str/,/^\$/p" | grep -Ew 'at|size' | tr -d '[a-z]|:|\t| ')
|
||||
at=$(echo $at_size | tr ' ' '\n' | head -1 | tail -1)
|
||||
size=$(echo $at_size | tr ' ' '\n' | head -2 | tail -1 | tr ',' 'x')
|
||||
sleep 0.4
|
||||
grim -g "$at $size" -t jpeg -q 50 "$missioncontroldir/windows/$window.jpeg"
|
||||
grim -g "$at $size" -t jpeg -q 50 "$missioncontroldir/windows/$window_no_slash.jpeg"
|
||||
done
|
||||
|
|
BIN
windows/.config — Dolphin.jpeg
Normal file
After Width: | Height: | Size: 104 KiB |
BIN
windows/Friends - Discord.jpeg
Normal file
After Width: | Height: | Size: 68 KiB |
After Width: | Height: | Size: 94 KiB |
BIN
windows/Spotify.jpeg
Normal file
After Width: | Height: | Size: 94 KiB |
BIN
windows/Stremio - Freedom to Stream.jpeg
Normal file
After Width: | Height: | Size: 90 KiB |
BIN
windows/WhatsDesk.jpeg
Normal file
After Width: | Height: | Size: 115 KiB |
BIN
windows/daemon.sh - eww - Visual Studio Code.jpeg
Normal file
After Width: | Height: | Size: 98 KiB |
BIN
windows/default.png
Normal file
After Width: | Height: | Size: 99 KiB |
BIN
windows/windows — Dolphin.jpeg
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
windows/windows.sh - eww - Visual Studio Code.jpeg
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
windows/⁄ - Google Search — Mozilla Firefox.jpeg
Normal file
After Width: | Height: | Size: 91 KiB |
BIN
windows/● windows.sh - eww - Visual Studio Code.jpeg
Normal file
After Width: | Height: | Size: 94 KiB |