hlfw.ca

hwwm

Download patch

ref: 6c1d9bdcb9fddf302b782df7981669dbbe8fd4a4
parent: b89728d4a8717ecf1721f3bf0c48e563e44f1ae6
author: Michael Misch <michealmisch1985@gmail.com>
date: Mon Jan 25 02:13:35 PST 2021

Add a work profile with a sideways monitor, just for me

--- /dev/null
+++ b/work
@@ -1,0 +1,23 @@
+#!/bin/sh
+
+width=$1; 
+heigh=$2
+gap=$3
+
+split() {
+	while read -r minw maxw minh maxh id; do
+	
+		case "$(xprop -id $id | awk '/WM_GROUP/ {print $NF}')" in
+		*7*)
+			continue ;;
+		*)
+			printf "%s %s %s %s %s\n" $minw $maxw $minh $maxh $id 
+		esac
+	done
+}
+
+split | binpack -x "$width" -y "$heigh" -g "$gaps"  
+lsgrp 7 | while read -r id; do
+	wtp $((1920 + gap)) $gap $((1080 - gap - gap)) $((1920 - gap - gap)) $id
+	break
+done
--- a/wshuf
+++ b/wshuf
@@ -23,6 +23,7 @@
 # window dimensions and gap
 . "$XDG_CONFIG_HOME"/x11/size
 case $screens in
+work) lsw | winsize | /usr/local/share/hwwm/work "$width" "$heigh" "$gaps" ;;
 3) lsw | winsize | /usr/local/share/hwwm/triplebinpack "$width" "$heigh" "$gaps" ;;
 2) lsw | winsize | /usr/local/share/hwwm/doublebinpack "$width" "$heigh" "$gaps" ;;
 *) lsw | winsize | binpack -x "$width" -y "$heigh" -g "$gaps" ;;