feat: marking windows, then closing/moving them to current workspace
This commit is contained in:
15
hypr/scripts/close_marked.sh
Executable file
15
hypr/scripts/close_marked.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
count_closed = 0
|
||||
|
||||
while true; do
|
||||
result=$(hyprctl dispatch closewindow tag:marked)
|
||||
|
||||
if [ "$result" != "closeWindow: no window found" ]; then
|
||||
echo "closed window because '$result'"
|
||||
((count_closed++))
|
||||
else
|
||||
echo "exiting due to '$result'"
|
||||
break
|
||||
fi
|
||||
done
|
||||
17
hypr/scripts/move_marked.sh
Executable file
17
hypr/scripts/move_marked.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
count_moved = 0
|
||||
|
||||
while true; do
|
||||
result=$(hyprctl dispatch movetoworkspace e+0,tag:marked)
|
||||
|
||||
if [ "$result" != "Window not found" ]; then
|
||||
echo "moved window because '$result'"
|
||||
result=$(hyprctl dispatch tagwindow -- -marked tag:marked)
|
||||
echo "tried umarking and was told $result"
|
||||
((count_closed++))
|
||||
else
|
||||
echo "exiting due to '$result'"
|
||||
break
|
||||
fi
|
||||
done
|
||||
@@ -1,8 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
WALLPAPER_DIR="$HOME/Pictures/Wallpapers/current/"
|
||||
INTRO_DIR="$HOME/Pictures/Wallpapers/intro/"
|
||||
DELAY=5m
|
||||
|
||||
intro() {
|
||||
if [ -z "$(ls -A "$WALLPAPER_DIR")" ]; then
|
||||
echo "Current wallpaper folder is empty, nothing to do"
|
||||
sleep 1
|
||||
exit 0
|
||||
fi
|
||||
|
||||
WALLPAPER=$(find "$INTRO_DIR" -type l | shuf -n 1)
|
||||
|
||||
while true; do
|
||||
|
||||
if hyprctl hyprpaper reload ,"$WALLPAPER"; then
|
||||
sleep 1.5
|
||||
break
|
||||
fi
|
||||
|
||||
sleep 0.1
|
||||
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
random_wallpaper() {
|
||||
# Check if folder is not empty
|
||||
if [ -z "$(ls -A "$WALLPAPER_DIR")" ]; then
|
||||
@@ -23,6 +46,7 @@ random_wallpaper() {
|
||||
}
|
||||
|
||||
loop() {
|
||||
intro
|
||||
while true; do
|
||||
random_wallpaper
|
||||
sleep "$DELAY"
|
||||
|
||||
Reference in New Issue
Block a user