New paste Repaste Download
#! /usr/bin/env bash
handle () {
  line=$1
  regexSBPM='^windowtitlev2>>\w+,Steam Big Picture Mode$'
  regexRegular='windowtitlev2>>\w+,Steam'
  if [[ "$line" =~ $regexSBPM ]]; then
    hyprctl keyword windowrule 'workspace unset, class: steam_app_\d+'
  elif [[ "$line" =~ $regexRegular ]]; then
    hyprctl keyword windowrule 'workspace special silent, class: steam_app_\d+'
  fi
}
socat -U - UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock \
  | while read line; do handle "$line"; done
Filename: smart-steam-v0.1.sh. Size: 541b. View raw, , hex, or download this file.

This paste expires on 2025-05-15 10:02:03.441661. Pasted through web.