diff options
Diffstat (limited to 'hyprhide')
| -rwxr-xr-x | hyprhide | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/hyprhide b/hyprhide new file mode 100755 index 0000000..93ddaf2 --- /dev/null +++ b/hyprhide @@ -0,0 +1,30 @@ +#!/bin/bash + +stack_file="/tmp/hidden_pid_stack" + + +function hide_window(){ + pid=$(hyprctl activewindow -j | jq '.pid') + hyprctl dispatch movetoworkspacesilent 88,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 |
