blob: b7f3641d67a813d4aa6eebcaf0499937a15614aa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/bin/bash
stack_file="/tmp/hidden_pid_stack"
function hide_window(){
pid=$(hyprctl activewindow -j | jq '.pid')
hyprctl dispatch movetoworkspacesilent 10,pid:$pid
echo $pid >> $stack_file
}
function show_window(){
current_workspace=$(hyprctl activeworkspace -j | jq '.id')
for i in $(cat $stack_file)
do
hyprctl dispatch movetoworkspacesilent $current_workspace,pid:$i
done
rm $stack_file
}
if [ ! -z $1 ]
then
if [ "$1" == "h" ]
then
hide_window
else
show_window
fi
fi
|