authorgravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2025-10-30 19:48:27-07:00
committergravatar for nmarks413@gmail.comNatalie Marks <nmarks413@gmail.com> 2025-10-30 19:48:27-07:00
logfae5c9bf47e8eede044c791bd50e8e21c3c40718
tree83304a83f3df1fedb3a28d4d950136c832ff7683
parenta4898824baec822428b5b531ddd26a479146a2be
signature Commit is signed but in an unrecognized format.

feat (natalie): add nice functions to support awakened poe trade in wayland


2 files changed, 61 insertions(+), 0 deletions(-)

users/natalie/home/hyprland/windowrules.nix+17
...@@ -8,6 +8,23 @@...@@ -8,6 +8,23 @@
8 "pin,class:^(waypaper)$"8 "pin,class:^(waypaper)$"
9 "float,title:^(Volume Control)$"9 "float,title:^(Volume Control)$"
1010
11 #awakened-poe-trade
12 # https://github.com/SnosMe/awakened-poe-trade/issues/1137#issuecomment-2992606569
13 "tag +apt, class:^(awakened-poe-trade)$"
14 "float, tag:apt"
15 "noblur, tag:apt"
16 "nofocus, tag:apt"
17 "noshadow, tag:apt"
18 "noborder, tag:apt"
19 "pin, tag:apt"
20 "renderunfocused, tag:apt"
21 "size 100% 100%, tag:apt"
22 "center, tag:apt"
23 "fullscreen, class:^(steam_app_238960)$"
24 # https://github.com/SnosMe/awakened-poe-trade/issues/1137#issuecomment-3037816727
25 "tag +fakefullscreen, title:(Path of Exile),class:(steam_app_238960)"
26 "tile, tag:fakefullscreen"
27 "noborder, tag:fakefullscreen"
11 # "float,title:^(Firefox — Sharing Indicator)$"28 # "float,title:^(Firefox — Sharing Indicator)$"
12 # "move 0 0,title:^(Firefox — Sharing Indicator)$"29 # "move 0 0,title:^(Firefox — Sharing Indicator)$"
13 # "size 700 450,title:^(Volume Control)$"30 # "size 700 450,title:^(Volume Control)$"
users/natalie/home/scripts/scripts/fakefullscreen.sh created+44
...@@ -0,0 +1,44 @@
1#!/usr/bin/env nix-shell
2#! nix-shell -i bash -p bash socat jq killall
3# shellcheck disable=all
4
5RUNDIR=/run/user/$EUID/hypr
6WAYBAR_FILE=$RUNDIR/.waybar_is_hidden
7
8function hide {
9 if [ ! -f $WAYBAR_FILE ]; then
10 hyprctl keyword workspace , gapsout:0 >/dev/null 2>&1
11 killall -SIGUSR1 .waybar-wrapped && touch $WAYBAR_FILE
12 fi
13}
14
15function show {
16 if [ -f $WAYBAR_FILE ]; then
17 hyprctl keyword workspace , gapsout:$(hyprctl getoption general:gaps_out -j | jq -r .custom | tr \ ,) >/dev/null 2>&1
18 killall -SIGUSR1 .waybar-wrapped && rm $WAYBAR_FILE >/dev/null 2>&1
19 fi
20}
21
22function fakefullscreen() {
23 local fullscreenclients=$(hyprctl clients -j | jq -r '.[] | select(.tags | contains(["fakefullscreen"])).workspace.id')
24 [ -z "$fullscreenclients" -a ! -f $WAYBAR_FILE ] && return
25 local active=$(hyprctl activeworkspace -j | jq -r .id)
26 for id in $fullscreenclients; do
27 if [ $active -eq $id -a $(hyprctl clients -j | jq -r "[.[] | select(.workspace.id == $id) | select(.floating | not)] | length") -eq 1 ]; then
28 hide
29 return
30 fi
31 done
32 show
33}
34
35sleep 1
36fakefullscreen
37
38socat -u "UNIX-CONNECT:$RUNDIR/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" STDOUT | while read -r event; do
39 case $event in
40 workspace\>\>* | openwindow\>\>* | closewindow\>\>*) fakefullscreen ;;
41 esac
42done
43
44show