From c85b19b705ac931882900906edd52931a8bf7492 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Mon, 4 May 2020 14:58:17 +0200 Subject: [PATCH] Add optional WinID argument to front and back scripts --- bin/back | 7 ++++++- bin/front | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/bin/back b/bin/back index 06a2c9b..71c9871 100755 --- a/bin/back +++ b/bin/back @@ -1,4 +1,9 @@ -win_id=$(xwininfo | awk 'match($0, /Window id: (0x[0-9a-f]+)/, cap){print cap[1]}') +#!/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" wmctrl -i -r $win_id -b add,below diff --git a/bin/front b/bin/front index 144ebc7..5077fd6 100755 --- a/bin/front +++ b/bin/front @@ -1,4 +1,9 @@ -win_id=$(xwininfo | awk 'match($0, /Window id: (0x[0-9a-f]+)/, cap){print cap[1]}') +#!/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" wmctrl -i -r $win_id -b remove,below