From 2cd635bd198b217df772d145d287d0cb845fbcca Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Fri, 19 Feb 2021 11:13:46 +0100 Subject: [PATCH] Add optional Window-ID argument to decoration scripts --- bin/+decor | 9 ++++++++- bin/-decor | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/bin/+decor b/bin/+decor index 257e6be..56df9c7 100755 --- a/bin/+decor +++ b/bin/+decor @@ -1 +1,8 @@ -xprop -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x1, 0x0, 0x0" +#!/bin/sh + +if [ -z "$1" ] +then win_id=$(xwininfo | awk 'match($0, /Window id: (0x[0-9a-f]+)/, cap){print cap[1]}') +else win_id=$1 +fi + +xprop -id $win_id -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x1, 0x0, 0x0" diff --git a/bin/-decor b/bin/-decor index b2b4da3..b78465a 100755 --- a/bin/-decor +++ b/bin/-decor @@ -1 +1,8 @@ -xprop -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0" +#!/bin/sh + +if [ -z "$1" ] +then win_id=$(xwininfo | awk 'match($0, /Window id: (0x[0-9a-f]+)/, cap){print cap[1]}') +else win_id=$1 +fi + +xprop -id $win_id -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0"