some hyprland configs and other stuff
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
stack_file="/tmp/hide_window_pid_stack.txt"
|
||||
|
||||
function hide_window(){
|
||||
pid=$(hyprctl activewindow -j | jq '.pid')
|
||||
hyprctl dispatch movetoworkspacesilent 88,pid:$pid
|
||||
echo $pid >> $stack_file
|
||||
}
|
||||
|
||||
function show_window(){
|
||||
pid=$(tail -1 $stack_file && sed -i '$d' $stack_file)
|
||||
[ -z $pid ] && exit
|
||||
|
||||
current_workspace=$(hyprctl activeworkspace -j | jq '.id')
|
||||
hyprctl dispatch movetoworkspacesilent $current_workspace,pid:$pid
|
||||
}
|
||||
|
||||
|
||||
if [ ! -z $1 ]
|
||||
then
|
||||
if [ "$1" == "h" ]
|
||||
then
|
||||
hide_window
|
||||
else
|
||||
show_window
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user