From 4f3129909cc22ffdc4a3db484d999a580605a69f Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Tue, 23 Jan 2024 21:19:15 -0500 Subject: Add a rather hacky method of adjusting the padding dynamically. --- river/.gitignore | 1 + river/init | 6 ++++++ river/padding_helper | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 river/.gitignore create mode 100755 river/padding_helper (limited to 'river') diff --git a/river/.gitignore b/river/.gitignore new file mode 100644 index 0000000..6275a75 --- /dev/null +++ b/river/.gitignore @@ -0,0 +1 @@ +padding_conf diff --git a/river/init b/river/init index 09a3b8c..2fa9893 100755 --- a/river/init +++ b/river/init @@ -163,6 +163,12 @@ riverctl rule-add -app-id "bar" csd riverctl default-layout rivertile rivertile -view-padding 0 -outer-padding 0 & +riverctl map normal Super Equal spawn "$HOME/.config/river/padding_helper 0 25" +riverctl map normal Super Minus spawn "$HOME/.config/river/padding_helper 0 -25" + +riverctl map normal Super+Shift Equal spawn "$HOME/.config/river/padding_helper 10 0" +riverctl map normal Super+Shift Minus spawn "$HOME/.config/river/padding_helper -10 0" + riverctl map normal Super+Control L spawn swaylock riverctl map normal Super D spawn bemenu-run riverctl map normal Super B spawn 'pkill -SIGUSR1 waybar' diff --git a/river/padding_helper b/river/padding_helper new file mode 100755 index 0000000..70feb70 --- /dev/null +++ b/river/padding_helper @@ -0,0 +1,36 @@ +#!/bin/sh +set -e +XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" + +conf="$XDG_CONFIG_HOME/river/padding_conf" + +if ! [ -e "$conf" ] ; then +cat > "$conf" < "$conf" <